[U-Boot] u-boot fails to build for powerpc with gcc 4.5.1

Darren Hart dvhart at linux.intel.com
Fri Apr 1 00:27:12 CEST 2011


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:
diff --git a/config.mk b/config.mk
index eb95093..374b262 100644
--- a/config.mk
+++ b/config.mk
@@ -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,

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


More information about the U-Boot mailing list