u-boot fails to build for powerpc with gcc 4.5.1
The u-boot recipe in Poky (OE core) fails to build u-boot for powerpc. I've tested the following versions:
v2010.09
v2010.12
v2011.03
All versions fail with:
$ make ARCH=powerpc
CROSS_COMPILE=/opt/poky/1.0/sysroots/x86_64-pokysdk-linux/usr/bin/ppc603e-poky-linux/powerpc-poky-linux-
MPC8315ERDB_config
awk '(NF && $1 !~ /^#/) { print $1 ": " $1 "_config; $(MAKE)" }' boards.cfg >
.boards.depend
Generating include/autoconf.mk
cc1: error: Do not use -Os option if --enable-target-optspace is not set.
Generating include/autoconf.mk.dep
cc1: error: Do not use -Os option if --enable-target-optspace is not set.
Configuring for MPC8315ERDB board...I got past this with:
config.mk +1 -1
@@ -151,7 +151,7 @@ ARFLAGS = crv endif RELFLAGS= $(PLATFORM_RELFLAGS) DBGFLAGS= -g # -DDEBUG -OPTFLAGS= -Os #-fomit-frame-pointer +OPTFLAGS= #-Os #-fomit-frame-pointer ifndef LDSCRIPT #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug ifeq ($(CONFIG_NAND_U_BOOT),y)
v2010.09 fails with:
crc32.c:85:1: error: initializer element is not constant crc32.c:85:1: error: (near initialization for 'crc_table[0]') This appears to be fixed in later versions.
v2010.12 and v2011.03 fail with:
ehci-hcd.c:59:3: error: initializer element is not constant
Full build logs are available in the bug report here:
http://bugzilla.pokylinux.org/show_bug.cgi?id=943
Thanks,
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel
Quoted 41 lines · Darren Hart
The u-boot recipe in Poky (OE core) fails to build u-boot for powerpc. I've tested the following versions:
v2010.09
v2010.12
v2011.03All versions fail with:
$ make ARCH=powerpc CROSS_COMPILE=/opt/poky/1.0/sysroots/x86_64-pokysdk-linux/usr/bin/ppc603e-poky-linux/powerpc-poky-linux- MPC8315ERDB_config awk '(NF && $1 !~ /^#/) { print $1 ": " $1 "_config; $(MAKE)" }' boards.cfg > .boards.depend Generating include/autoconf.mk cc1: error: Do not use -Os option if --enable-target-optspace is not set. Generating include/autoconf.mk.dep cc1: error: Do not use -Os option if --enable-target-optspace is not set. Configuring for MPC8315ERDB board...I got past this with:
config.mk +0
-0@@ -151,7 +151,7 @@ ARFLAGS = crvendif
RELFLAGS= $(PLATFORM_RELFLAGS)
DBGFLAGS= -g # -DDEBUGconfig.mk +1
-1-OPTFLAGS= -Os #-fomit-frame-pointer +OPTFLAGS= #-Os #-fomit-frame-pointerifndef LDSCRIPT
#LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug ifeq ($(CONFIG_NAND_U_BOOT),y)v2010.09 fails with:
crc32.c:85:1: error: initializer element is not constant crc32.c:85:1: error: (near initialization for 'crc_table[0]') This appears to be fixed in later versions.
Quoted 5 lines
v2010.12 and v2011.03 fail with:
ehci-hcd.c:59:3: error: initializer element is not constantFull build logs are available in the bug report here:
http://bugzilla.pokylinux.org/show_bug.cgi?id=943
This is interesting, we've been using a Code Sourcey based 4.5.1 (hard to tell exactly what it is)
gcc version 4.5.1 (Sourcery G++ Lite 2010.09-55)
and it builds just fine.
- k