When building something like u-boot with ADT toolchain we get: $ powerpc-poky-linux-gnuspe-ld -g -Ttext 0x40000 -o hello_world -e hello_world hello_world.o libstubs.o -L. -lgcc powerpc-poky-linux-gnuspe-ld: cannot find -lgcc Adding --verbose gets us: attempt to open ./libgcc.so failed attempt to open ./libgcc.a failed attempt to open /opt/poky/1.0+snapshot/sysroots/powerpc-poky-linux-gnuspe/usr/local/lib/libgcc.so failed attempt to open /opt/poky/1.0+snapshot/sysroots/powerpc-poky-linux-gnuspe/usr/local/lib/libgcc.a failed attempt to open /opt/poky/1.0+snapshot/sysroots/powerpc-poky-linux-gnuspe/lib/libgcc.so failed attempt to open /opt/poky/1.0+snapshot/sysroots/powerpc-poky-linux-gnuspe/lib/libgcc.a failed attempt to open /opt/poky/1.0+snapshot/sysroots/powerpc-poky-linux-gnuspe/usr/lib/libgcc.so failed attempt to open /opt/poky/1.0+snapshot/sysroots/powerpc-poky-linux-gnuspe/usr/lib/libgcc.a failed
This seems related to gcc(/binutils)-cross-canadian.
Some context from the oe-core list: Message-Id: <1A4B195B-C80C-4E0B-9FC2-DBB3E1FC3E2E@kernel.crashing.org> On Aug 10, 2011, at 4:19 AM, Phil Blundell wrote: > On Tue, 2011-08-09 at 23:20 -0500, Kumar Gala wrote: >> Trying to build something like u-boot w/the toolchain produced by meta-toolchain-sdk and get the following: >> >> $ powerpc-poky-linux-gnuspe-ld -g -Ttext 0x40000 -o hello_world -e hello_world hello_world.o libstubs.o -L. -lgcc >> powerpc-poky-linux-gnuspe-ld: cannot find -lgcc >> >> [...] >> >> What do we need to tweak so we can find libgcc.a? > The best/easiest fix is to link with gcc rather than calling ld > directly. You can use -nostartfiles to suppress crt1.o and the like. > If you must invoke ld manually for whatever reason then you will have to > use something like `$(CC) --print-libgcc-file-name` to obtain the path > to libgcc. While these are good suggestions, I still think the toolchain is broken as u-boot has been this way for sometime and numerous other cross toolchains work perfectly fine. - k
Kumar, how are you building uboot? can you provide me steps to reproduce. Thanks, Nitin
Instructions on how to build u-boot: $ source /opt/poky/1.0+snapshot/environment-setup-ppce500v2-poky-linux-gnuspe $ export CROSS_COMPILE=powerpc-poky-linux-gnuspe- $ export ARCH=powerpc $ make MPC8572DS_config $ make Generating include/autoconf.mk Generating include/autoconf.mk.dep powerpc-poky-linux-gnuspe-gcc -DDO_DEPS_ONLY \ -g -Os -fpic -mrelocatable -ffunction-sections -fdata-sections -meabi -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0xeff80000 -I/local/home/galak/git/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /local/opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/ppce500v2-poky-linux-gnuspe/../../lib/ppce500v2-poky-linux-gnuspe/gcc/powerpc-poky-linux-gnuspe/4.6.1/include -pipe -DCONFIG_PPC -D__powerpc__ -ffixed-r2 -Wa,-me500 -msoft-float -mno-string -mspe=yes -mno-spe -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security \ -o lib/asm-offsets.s lib/asm-offsets.c -c -S Generating include/generated/generic-asm-offsets.h tools/scripts/make-asm-offsets lib/asm-offsets.s include/generated/generic-asm-offsets.h for dir in tools examples/standalone examples/api arch/powerpc/cpu/mpc85xx /local/home/galak/git/u-boot/arch/powerpc/cpu/mpc85xx/ ; do \ make -C $dir _depend ; done make[1]: Entering directory `/local/home/galak/git/u-boot/tools' make[1]: Leaving directory `/local/home/galak/git/u-boot/tools' make[1]: Entering directory `/local/home/galak/git/u-boot/tools' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/local/home/galak/git/u-boot/tools' make[1]: Entering directory `/local/home/galak/git/u-boot/examples/standalone' make[1]: Leaving directory `/local/home/galak/git/u-boot/examples/standalone' make[1]: Entering directory `/local/home/galak/git/u-boot/examples/standalone' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/local/home/galak/git/u-boot/examples/standalone' make[1]: Entering directory `/local/home/galak/git/u-boot/examples/api' make[1]: Leaving directory `/local/home/galak/git/u-boot/examples/api' make[1]: Entering directory `/local/home/galak/git/u-boot/examples/api' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/local/home/galak/git/u-boot/examples/api' make[1]: Entering directory `/local/home/galak/git/u-boot/arch/powerpc/cpu/mpc85xx' make[1]: Leaving directory `/local/home/galak/git/u-boot/arch/powerpc/cpu/mpc85xx' make[1]: Entering directory `/local/home/galak/git/u-boot/arch/powerpc/cpu/mpc85xx' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/local/home/galak/git/u-boot/arch/powerpc/cpu/mpc85xx' make[1]: Entering directory `/local/home/galak/git/u-boot/arch/powerpc/cpu/mpc85xx' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/local/home/galak/git/u-boot/arch/powerpc/cpu/mpc85xx' make -C tools all make[1]: Entering directory `/local/home/galak/git/u-boot/tools' gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o bmp_logo.o bmp_logo.c -c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o bmp_logo bmp_logo.o strip bmp_logo gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -c -o crc32.o /local/home/galak/git/u-boot/lib/crc32.c gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -c -o env_embedded.o /local/home/galak/git/u-boot/common/env_embedded.c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o envcrc.o envcrc.c -c gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -c -o sha1.o /local/home/galak/git/u-boot/lib/sha1.c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o envcrc crc32.o env_embedded.o envcrc.o sha1.o gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o gen_eth_addr.o gen_eth_addr.c -c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o gen_eth_addr gen_eth_addr.o strip gen_eth_addr gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o img2srec.o img2srec.c -c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o img2srec img2srec.o strip img2srec gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -o default_image.o default_image.c -c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -o fit_image.o fit_image.c -c gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -c -o image.o /local/home/galak/git/u-boot/common/image.c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -o imximage.o imximage.c -c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -o kwbimage.o kwbimage.c -c gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -c -o md5.o /local/home/galak/git/u-boot/lib/md5.c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -o mkimage.o mkimage.c -c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -o os_support.o os_support.c -c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -o omapimage.o omapimage.c -c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -o ublimage.o ublimage.c -c gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -c -o fdt.o /local/home/galak/git/u-boot/lib/libfdt/fdt.c gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -c -o fdt_ro.o /local/home/galak/git/u-boot/lib/libfdt/fdt_ro.c gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -c -o fdt_rw.o /local/home/galak/git/u-boot/lib/libfdt/fdt_rw.c gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -c -o fdt_strerror.o /local/home/galak/git/u-boot/lib/libfdt/fdt_strerror.c gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -c -o fdt_wip.o /local/home/galak/git/u-boot/lib/libfdt/fdt_wip.c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /local/home/galak/git/u-boot/include -idirafter /local/home/galak/git/u-boot/include2 -idirafter /local/home/galak/git/u-boot/include -I /local/home/galak/git/u-boot/lib/libfdt -I /local/home/galak/git/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0xeff80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o mkimage crc32.o default_image.o fit_image.o image.o imximage.o kwbimage.o md5.o mkimage.o os_support.o omapimage.o sha1.o ublimage.o fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_wip.o strip mkimage ./bmp_logo logos/freescale.bmp >/local/home/galak/git/u-boot/include/bmp_logo.h make[1]: Leaving directory `/local/home/galak/git/u-boot/tools' make -C examples/standalone all make[1]: Entering directory `/local/home/galak/git/u-boot/examples/standalone' powerpc-poky-linux-gnuspe-gcc -g -Os -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0xeff80000 -I/local/home/galak/git/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /local/opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/ppce500v2-poky-linux-gnuspe/../../lib/ppce500v2-poky-linux-gnuspe/gcc/powerpc-poky-linux-gnuspe/4.6.1/include -pipe -DCONFIG_PPC -D__powerpc__ -ffixed-r2 -Wa,-me500 -msoft-float -mno-string -mspe=yes -mno-spe -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fno-toplevel-reorder -o hello_world.o hello_world.c -c powerpc-poky-linux-gnuspe-gcc -g -Os -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0xeff80000 -I/local/home/galak/git/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /local/opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/ppce500v2-poky-linux-gnuspe/../../lib/ppce500v2-poky-linux-gnuspe/gcc/powerpc-poky-linux-gnuspe/4.6.1/include -pipe -DCONFIG_PPC -D__powerpc__ -ffixed-r2 -Wa,-me500 -msoft-float -mno-string -mspe=yes -mno-spe -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fno-toplevel-reorder -o stubs.o stubs.c -c powerpc-poky-linux-gnuspe-ld --sysroot=/opt/poky/1.0+snapshot/sysroots/ppce500v2-poky-linux-gnuspe -n -n -r -o libstubs.o stubs.o powerpc-poky-linux-gnuspe-ld -g -Ttext 0x40000 \ -o hello_world -e hello_world hello_world.o libstubs.o \ -L. -lgcc powerpc-poky-linux-gnuspe-ld: cannot find -lgcc make[1]: *** [hello_world] Error 1 make[1]: Leaving directory `/local/home/galak/git/u-boot/examples/standalone' make: *** [examples/standalone] Error 2
I tried building u-boot inside the qemu with sdk image, and Met the following issue: make[1]: Entering directory `/home/root/u-boot-2011.06/drivers/usb/host' gcc -g -fpic -mrelocatable -ffunction-sections -fdata-sections -meabi -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0xeff80000 -I/home/root/u-boot-2011.06/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/powerpc-poky-linux/4.6.1/include -pipe -DCONFIG_PPC -D__powerpc__ -ffixed-r2 -Wa,-me500 -msoft-float -mno-string -mspe=yes -mno-spe -Wall -Wstrict-prototypes -fno-stack-protector -o ehci-hcd.o ehci-hcd.c -c ehci-hcd.c:59:3: error: initializer element is not constant ehci-hcd.c:59:3: error: (near initialization for 'descriptor.device.bcdUSB') ehci-hcd.c:66:3: error: initializer element is not constant ehci-hcd.c:66:3: error: (near initialization for 'descriptor.device.bcdDevice') ehci-hcd.c:75:3: error: initializer element is not constant ehci-hcd.c:75:3: error: (near initialization for 'descriptor.config.wTotalLength') make[1]: *** [ehci-hcd.o] Error 1 make[1]: Leaving directory `/home/root/u-boot-2011.06/drivers/usb/host' make: *** [drivers/usb/host/libusb_host.o] Error 2 So looks like sdk image's native toolchain does not have that specific issue. Nitin
(In reply to comment #5) > I tried building u-boot inside the qemu with sdk image, and Met the following > issue: > make[1]: Entering directory `/home/root/u-boot-2011.06/drivers/usb/host' > gcc -g -fpic -mrelocatable -ffunction-sections -fdata-sections -meabi > -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0xeff80000 > -I/home/root/u-boot-2011.06/include -fno-builtin -ffreestanding -nostdinc > -isystem /usr/lib/gcc/powerpc-poky-linux/4.6.1/include -pipe -DCONFIG_PPC > -D__powerpc__ -ffixed-r2 -Wa,-me500 -msoft-float -mno-string -mspe=yes -mno-spe > -Wall -Wstrict-prototypes -fno-stack-protector -o ehci-hcd.o ehci-hcd.c -c > ehci-hcd.c:59:3: error: initializer element is not constant > ehci-hcd.c:59:3: error: (near initialization for 'descriptor.device.bcdUSB') > ehci-hcd.c:66:3: error: initializer element is not constant > ehci-hcd.c:66:3: error: (near initialization for 'descriptor.device.bcdDevice') > ehci-hcd.c:75:3: error: initializer element is not constant > ehci-hcd.c:75:3: error: (near initialization for > 'descriptor.config.wTotalLength') > make[1]: *** [ehci-hcd.o] Error 1 > make[1]: Leaving directory `/home/root/u-boot-2011.06/drivers/usb/host' > make: *** [drivers/usb/host/libusb_host.o] Error 2 > > > So looks like sdk image's native toolchain does not have that specific issue. > > Nitin I was building a standalone checkout of u-boot git outside of poky.
Kumar, I am also doing outside poky build inside the qemu image, with the installed qemu native compilers in the image. POssibly the issue is only when you do cross compilation with the sdk toolchain. Nitin
Kumar, I was working with qemuppc machine so far. But I am noticing you are using differet ppc target. I was sourcing: source /opt/poky/1.0+snapshot/environment-setup-ppc603e-poky-linux while you are sourcing: source /opt/poky/1.0+snapshot/environment-setup-ppce500v2-poky-linux-gnuspe So which MACHINE was set to build the meta-toolchain for your setup ? Thanks, Nitin
BTW with meta-toolchain built for QEMUPPC machine I am seeing these compiler errors, which are different than your issue, and probably caused by newer compiler. powerpc-poky-linux-gcc -g -fpic -mrelocatable -ffunction-sections -fdata-sections -meabi -D__KERNEL__ -I/home/nitin/tmp/u-boot-2011.06/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/ppc603e-poky-linux/gcc/powerpc-poky-linux/4.6.1/include -pipe -DCONFIG_PPC -D__powerpc__ -ffixed-r2 -Wa,-me500 -msoft-float -mno-string -mspe=yes -mno-spe -Wall -Wstrict-prototypes -fno-stack-protector -o crc32.o crc32.c -c crc32.c:85:1: error: initializer element is not constant crc32.c:85:1: error: (near initialization for 'crc_table[0]') crc32.c:85:1: error: initializer element is not constant crc32.c:85:1: error: (near initialization for 'crc_table[1]') crc32.c:85:1: error: initializer element is not constant crc32.c:85:1: error: (near initialization for 'crc_table[2]') crc32.c:85:1: error: initializer element is not constant crc32.c:85:1: error: (near initialization for 'crc_table[3]') crc32.c:86:1: error: initializer element is not constant crc32.c:86:1: error: (near initialization for 'crc_table[4]') crc32.c:86:1: error: initializer element is not constant crc32.c:86:1: error: (near initialization for 'crc_table[5]') crc32.c:86:1: error: initializer element is not constant crc32.c:86:1: error: (near initialization for 'crc_table[6]') crc32.c:86:1: error: initializer element is not constant crc32.c:86:1: error: (near initialization for 'crc_table[7]') crc32.c:87:1: error: initializer element is not constant crc32.c:87:1: error: (near initialization for 'crc_table[8]') crc32.c:87:1: error: initializer element is not constant crc32.c:87:1: error: (near initialization for 'crc_table[9]') crc32.c:87:1: error: initializer element is not constant crc32.c:87:1: error: (near initialization for 'crc_table[10]') crc32.c:87:1: error: initializer element is not constant crc32.c:87:1: error: (near initialization for 'crc_table[11]') crc32.c:88:1: error: initializer element is not constant crc32.c:88:1: error: (near initialization for 'crc_table[12]') crc32.c:88:1: error: initializer element is not constant crc32.c:88:1: error: (near initialization for 'crc_table[13]') crc32.c:88:1: error: initializer element is not constant crc32.c:88:1: error: (near initialization for 'crc_table[14]') crc32.c:88:1: error: initializer element is not constant crc32.c:88:1: error: (near initialization for 'crc_table[15]') crc32.c:89:1: error: initializer element is not constant crc32.c:89:1: error: (near initialization for 'crc_table[16]') crc32.c:89:1: error: initializer element is not constant crc32.c:89:1: error: (near initialization for 'crc_table[17]') crc32.c:89:1: error: initializer element is not constant crc32.c:89:1: error: (near initialization for 'crc_table[18]') crc32.c:89:1: error: initializer element is not constant crc32.c:89:1: error: (near initialization for 'crc_table[19]') crc32.c:90:1: error: initializer element is not constant crc32.c:90:1: error: (near initialization for 'crc_table[20]') crc32.c:90:1: error: initializer element is not constant crc32.c:90:1: error: (near initialization for 'crc_table[21]') crc32.c:90:1: error: initializer element is not constant crc32.c:90:1: error: (near initialization for 'crc_table[22]') crc32.c:90:1: error: initializer element is not constant crc32.c:90:1: error: (near initialization for 'crc_table[23]') crc32.c:91:1: error: initializer element is not constant crc32.c:91:1: error: (near initialization for 'crc_table[24]') crc32.c:91:1: error: initializer element is not constant crc32.c:91:1: error: (near initialization for 'crc_table[25]') crc32.c:91:1: error: initializer element is not constant crc32.c:91:1: error: (near initialization for 'crc_table[26]') crc32.c:91:1: error: initializer element is not constant crc32.c:91:1: error: (near initialization for 'crc_table[27]') crc32.c:92:1: error: initializer element is not constant crc32.c:92:1: error: (near initialization for 'crc_table[28]') crc32.c:92:1: error: initializer element is not constant crc32.c:92:1: error: (near initialization for 'crc_table[29]') crc32.c:92:1: error: initializer element is not constant crc32.c:92:1: error: (near initialization for 'crc_table[30]') crc32.c:92:1: error: initializer element is not constant crc32.c:92:1: error: (near initialization for 'crc_table[31]') crc32.c:93:1: error: initializer element is not constant crc32.c:93:1: error: (near initialization for 'crc_table[32]') crc32.c:93:1: error: initializer element is not constant crc32.c:93:1: error: (near initialization for 'crc_table[33]') crc32.c:93:1: error: initializer element is not constant crc32.c:93:1: error: (near initialization for 'crc_table[34]') crc32.c:93:1: error: initializer element is not constant crc32.c:93:1: error: (near initialization for 'crc_table[35]') crc32.c:94:1: error: initializer element is not constant crc32.c:94:1: error: (near initialization for 'crc_table[36]') crc32.c:94:1: error: initializer element is not constant crc32.c:94:1: error: (near initialization for 'crc_table[37]') crc32.c:94:1: error: initializer element is not constant crc32.c:94:1: error: (near initialization for 'crc_table[38]') crc32.c:94:1: error: initializer element is not constant crc32.c:94:1: error: (near initialization for 'crc_table[39]') crc32.c:95:1: error: initializer element is not constant crc32.c:95:1: error: (near initialization for 'crc_table[40]') crc32.c:95:1: error: initializer element is not constant crc32.c:95:1: error: (near initialization for 'crc_table[41]') crc32.c:95:1: error: initializer element is not constant crc32.c:95:1: error: (near initialization for 'crc_table[42]') crc32.c:95:1: error: initializer element is not constant crc32.c:95:1: error: (near initialization for 'crc_table[43]') crc32.c:96:1: error: initializer element is not constant crc32.c:96:1: error: (near initialization for 'crc_table[44]') crc32.c:96:1: error: initializer element is not constant crc32.c:96:1: error: (near initialization for 'crc_table[45]') crc32.c:96:1: error: initializer element is not constant crc32.c:96:1: error: (near initialization for 'crc_table[46]') crc32.c:96:1: error: initializer element is not constant crc32.c:96:1: error: (near initialization for 'crc_table[47]') crc32.c:97:1: error: initializer element is not constant crc32.c:97:1: error: (near initialization for 'crc_table[48]') crc32.c:97:1: error: initializer element is not constant crc32.c:97:1: error: (near initialization for 'crc_table[49]') crc32.c:97:1: error: initializer element is not constant crc32.c:97:1: error: (near initialization for 'crc_table[50]') crc32.c:97:1: error: initializer element is not constant crc32.c:97:1: error: (near initialization for 'crc_table[51]') crc32.c:98:1: error: initializer element is not constant crc32.c:98:1: error: (near initialization for 'crc_table[52]') crc32.c:98:1: error: initializer element is not constant crc32.c:98:1: error: (near initialization for 'crc_table[53]') crc32.c:98:1: error: initializer element is not constant crc32.c:98:1: error: (near initialization for 'crc_table[54]') crc32.c:98:1: error: initializer element is not constant crc32.c:98:1: error: (near initialization for 'crc_table[55]') crc32.c:99:1: error: initializer element is not constant crc32.c:99:1: error: (near initialization for 'crc_table[56]') crc32.c:99:1: error: initializer element is not constant crc32.c:99:1: error: (near initialization for 'crc_table[57]') crc32.c:99:1: error: initializer element is not constant crc32.c:99:1: error: (near initialization for 'crc_table[58]') crc32.c:99:1: error: initializer element is not constant crc32.c:99:1: error: (near initialization for 'crc_table[59]') crc32.c:100:1: error: initializer element is not constant crc32.c:100:1: error: (near initialization for 'crc_table[60]') crc32.c:100:1: error: initializer element is not constant crc32.c:100:1: error: (near initialization for 'crc_table[61]') crc32.c:100:1: error: initializer element is not constant crc32.c:100:1: error: (near initialization for 'crc_table[62]') crc32.c:100:1: error: initializer element is not constant crc32.c:100:1: error: (near initialization for 'crc_table[63]') crc32.c:101:1: error: initializer element is not constant crc32.c:101:1: error: (near initialization for 'crc_table[64]') crc32.c:101:1: error: initializer element is not constant crc32.c:101:1: error: (near initialization for 'crc_table[65]') crc32.c:101:1: error: initializer element is not constant crc32.c:101:1: error: (near initialization for 'crc_table[66]') crc32.c:101:1: error: initializer element is not constant crc32.c:101:1: error: (near initialization for 'crc_table[67]') crc32.c:102:1: error: initializer element is not constant crc32.c:102:1: error: (near initialization for 'crc_table[68]') crc32.c:102:1: error: initializer element is not constant crc32.c:102:1: error: (near initialization for 'crc_table[69]') crc32.c:102:1: error: initializer element is not constant crc32.c:102:1: error: (near initialization for 'crc_table[70]') crc32.c:102:1: error: initializer element is not constant crc32.c:102:1: error: (near initialization for 'crc_table[71]') crc32.c:103:1: error: initializer element is not constant crc32.c:103:1: error: (near initialization for 'crc_table[72]') crc32.c:103:1: error: initializer element is not constant crc32.c:103:1: error: (near initialization for 'crc_table[73]') crc32.c:103:1: error: initializer element is not constant crc32.c:103:1: error: (near initialization for 'crc_table[74]') crc32.c:103:1: error: initializer element is not constant crc32.c:103:1: error: (near initialization for 'crc_table[75]') crc32.c:104:1: error: initializer element is not constant crc32.c:104:1: error: (near initialization for 'crc_table[76]') crc32.c:104:1: error: initializer element is not constant crc32.c:104:1: error: (near initialization for 'crc_table[77]') crc32.c:104:1: error: initializer element is not constant crc32.c:104:1: error: (near initialization for 'crc_table[78]') crc32.c:104:1: error: initializer element is not constant crc32.c:104:1: error: (near initialization for 'crc_table[79]') crc32.c:105:1: error: initializer element is not constant crc32.c:105:1: error: (near initialization for 'crc_table[80]') crc32.c:105:1: error: initializer element is not constant crc32.c:105:1: error: (near initialization for 'crc_table[81]') crc32.c:105:1: error: initializer element is not constant crc32.c:105:1: error: (near initialization for 'crc_table[82]') crc32.c:105:1: error: initializer element is not constant crc32.c:105:1: error: (near initialization for 'crc_table[83]') crc32.c:106:1: error: initializer element is not constant crc32.c:106:1: error: (near initialization for 'crc_table[84]') crc32.c:106:1: error: initializer element is not constant crc32.c:106:1: error: (near initialization for 'crc_table[85]') crc32.c:106:1: error: initializer element is not constant crc32.c:106:1: error: (near initialization for 'crc_table[86]') crc32.c:106:1: error: initializer element is not constant crc32.c:106:1: error: (near initialization for 'crc_table[87]') crc32.c:107:1: error: initializer element is not constant crc32.c:107:1: error: (near initialization for 'crc_table[88]') crc32.c:107:1: error: initializer element is not constant crc32.c:107:1: error: (near initialization for 'crc_table[89]') crc32.c:107:1: error: initializer element is not constant crc32.c:107:1: error: (near initialization for 'crc_table[90]') crc32.c:107:1: error: initializer element is not constant crc32.c:107:1: error: (near initialization for 'crc_table[91]') crc32.c:108:1: error: initializer element is not constant crc32.c:108:1: error: (near initialization for 'crc_table[92]') crc32.c:108:1: error: initializer element is not constant crc32.c:108:1: error: (near initialization for 'crc_table[93]') crc32.c:108:1: error: initializer element is not constant crc32.c:108:1: error: (near initialization for 'crc_table[94]') crc32.c:108:1: error: initializer element is not constant crc32.c:108:1: error: (near initialization for 'crc_table[95]') crc32.c:109:1: error: initializer element is not constant crc32.c:109:1: error: (near initialization for 'crc_table[96]') crc32.c:109:1: error: initializer element is not constant crc32.c:109:1: error: (near initialization for 'crc_table[97]') crc32.c:109:1: error: initializer element is not constant crc32.c:109:1: error: (near initialization for 'crc_table[98]') crc32.c:109:1: error: initializer element is not constant crc32.c:109:1: error: (near initialization for 'crc_table[99]') crc32.c:110:1: error: initializer element is not constant crc32.c:110:1: error: (near initialization for 'crc_table[100]') crc32.c:110:1: error: initializer element is not constant crc32.c:110:1: error: (near initialization for 'crc_table[101]') crc32.c:110:1: error: initializer element is not constant crc32.c:110:1: error: (near initialization for 'crc_table[102]') crc32.c:110:1: error: initializer element is not constant crc32.c:110:1: error: (near initialization for 'crc_table[103]') crc32.c:111:1: error: initializer element is not constant crc32.c:111:1: error: (near initialization for 'crc_table[104]') crc32.c:111:1: error: initializer element is not constant crc32.c:111:1: error: (near initialization for 'crc_table[105]') crc32.c:111:1: error: initializer element is not constant crc32.c:111:1: error: (near initialization for 'crc_table[106]') crc32.c:111:1: error: initializer element is not constant crc32.c:111:1: error: (near initialization for 'crc_table[107]') crc32.c:112:1: error: initializer element is not constant crc32.c:112:1: error: (near initialization for 'crc_table[108]') crc32.c:112:1: error: initializer element is not constant crc32.c:112:1: error: (near initialization for 'crc_table[109]') crc32.c:112:1: error: initializer element is not constant crc32.c:112:1: error: (near initialization for 'crc_table[110]') crc32.c:112:1: error: initializer element is not constant crc32.c:112:1: error: (near initialization for 'crc_table[111]') crc32.c:113:1: error: initializer element is not constant crc32.c:113:1: error: (near initialization for 'crc_table[112]') crc32.c:113:1: error: initializer element is not constant crc32.c:113:1: error: (near initialization for 'crc_table[113]') crc32.c:113:1: error: initializer element is not constant crc32.c:113:1: error: (near initialization for 'crc_table[114]') crc32.c:113:1: error: initializer element is not constant crc32.c:113:1: error: (near initialization for 'crc_table[115]') crc32.c:114:1: error: initializer element is not constant crc32.c:114:1: error: (near initialization for 'crc_table[116]') crc32.c:114:1: error: initializer element is not constant crc32.c:114:1: error: (near initialization for 'crc_table[117]') crc32.c:114:1: error: initializer element is not constant crc32.c:114:1: error: (near initialization for 'crc_table[118]') crc32.c:114:1: error: initializer element is not constant crc32.c:114:1: error: (near initialization for 'crc_table[119]') crc32.c:115:1: error: initializer element is not constant crc32.c:115:1: error: (near initialization for 'crc_table[120]') crc32.c:115:1: error: initializer element is not constant crc32.c:115:1: error: (near initialization for 'crc_table[121]') crc32.c:115:1: error: initializer element is not constant crc32.c:115:1: error: (near initialization for 'crc_table[122]') crc32.c:115:1: error: initializer element is not constant crc32.c:115:1: error: (near initialization for 'crc_table[123]') crc32.c:116:1: error: initializer element is not constant crc32.c:116:1: error: (near initialization for 'crc_table[124]') crc32.c:116:1: error: initializer element is not constant crc32.c:116:1: error: (near initialization for 'crc_table[125]') crc32.c:116:1: error: initializer element is not constant crc32.c:116:1: error: (near initialization for 'crc_table[126]') crc32.c:116:1: error: initializer element is not constant crc32.c:116:1: error: (near initialization for 'crc_table[127]') crc32.c:117:1: error: initializer element is not constant crc32.c:117:1: error: (near initialization for 'crc_table[128]') crc32.c:117:1: error: initializer element is not constant crc32.c:117:1: error: (near initialization for 'crc_table[129]') crc32.c:117:1: error: initializer element is not constant crc32.c:117:1: error: (near initialization for 'crc_table[130]') crc32.c:117:1: error: initializer element is not constant crc32.c:117:1: error: (near initialization for 'crc_table[131]') crc32.c:118:1: error: initializer element is not constant crc32.c:118:1: error: (near initialization for 'crc_table[132]') crc32.c:118:1: error: initializer element is not constant crc32.c:118:1: error: (near initialization for 'crc_table[133]') crc32.c:118:1: error: initializer element is not constant crc32.c:118:1: error: (near initialization for 'crc_table[134]') crc32.c:118:1: error: initializer element is not constant crc32.c:118:1: error: (near initialization for 'crc_table[135]') crc32.c:119:1: error: initializer element is not constant crc32.c:119:1: error: (near initialization for 'crc_table[136]') crc32.c:119:1: error: initializer element is not constant crc32.c:119:1: error: (near initialization for 'crc_table[137]') crc32.c:119:1: error: initializer element is not constant crc32.c:119:1: error: (near initialization for 'crc_table[138]') crc32.c:119:1: error: initializer element is not constant crc32.c:119:1: error: (near initialization for 'crc_table[139]') crc32.c:120:1: error: initializer element is not constant crc32.c:120:1: error: (near initialization for 'crc_table[140]') crc32.c:120:1: error: initializer element is not constant crc32.c:120:1: error: (near initialization for 'crc_table[141]') crc32.c:120:1: error: initializer element is not constant crc32.c:120:1: error: (near initialization for 'crc_table[142]') crc32.c:120:1: error: initializer element is not constant crc32.c:120:1: error: (near initialization for 'crc_table[143]') crc32.c:121:1: error: initializer element is not constant crc32.c:121:1: error: (near initialization for 'crc_table[144]') crc32.c:121:1: error: initializer element is not constant crc32.c:121:1: error: (near initialization for 'crc_table[145]') crc32.c:121:1: error: initializer element is not constant crc32.c:121:1: error: (near initialization for 'crc_table[146]') crc32.c:121:1: error: initializer element is not constant crc32.c:121:1: error: (near initialization for 'crc_table[147]') crc32.c:122:1: error: initializer element is not constant crc32.c:122:1: error: (near initialization for 'crc_table[148]') crc32.c:122:1: error: initializer element is not constant crc32.c:122:1: error: (near initialization for 'crc_table[149]') crc32.c:122:1: error: initializer element is not constant crc32.c:122:1: error: (near initialization for 'crc_table[150]') crc32.c:122:1: error: initializer element is not constant crc32.c:122:1: error: (near initialization for 'crc_table[151]') crc32.c:123:1: error: initializer element is not constant crc32.c:123:1: error: (near initialization for 'crc_table[152]') crc32.c:123:1: error: initializer element is not constant crc32.c:123:1: error: (near initialization for 'crc_table[153]') crc32.c:123:1: error: initializer element is not constant crc32.c:123:1: error: (near initialization for 'crc_table[154]') crc32.c:123:1: error: initializer element is not constant crc32.c:123:1: error: (near initialization for 'crc_table[155]') crc32.c:124:1: error: initializer element is not constant crc32.c:124:1: error: (near initialization for 'crc_table[156]') crc32.c:124:1: error: initializer element is not constant crc32.c:124:1: error: (near initialization for 'crc_table[157]') crc32.c:124:1: error: initializer element is not constant crc32.c:124:1: error: (near initialization for 'crc_table[158]') crc32.c:124:1: error: initializer element is not constant crc32.c:124:1: error: (near initialization for 'crc_table[159]') crc32.c:125:1: error: initializer element is not constant crc32.c:125:1: error: (near initialization for 'crc_table[160]') crc32.c:125:1: error: initializer element is not constant crc32.c:125:1: error: (near initialization for 'crc_table[161]') crc32.c:125:1: error: initializer element is not constant crc32.c:125:1: error: (near initialization for 'crc_table[162]') crc32.c:125:1: error: initializer element is not constant crc32.c:125:1: error: (near initialization for 'crc_table[163]') crc32.c:126:1: error: initializer element is not constant crc32.c:126:1: error: (near initialization for 'crc_table[164]') crc32.c:126:1: error: initializer element is not constant crc32.c:126:1: error: (near initialization for 'crc_table[165]') crc32.c:126:1: error: initializer element is not constant crc32.c:126:1: error: (near initialization for 'crc_table[166]') crc32.c:126:1: error: initializer element is not constant crc32.c:126:1: error: (near initialization for 'crc_table[167]') crc32.c:127:1: error: initializer element is not constant crc32.c:127:1: error: (near initialization for 'crc_table[168]') crc32.c:127:1: error: initializer element is not constant crc32.c:127:1: error: (near initialization for 'crc_table[169]') crc32.c:127:1: error: initializer element is not constant crc32.c:127:1: error: (near initialization for 'crc_table[170]') crc32.c:127:1: error: initializer element is not constant crc32.c:127:1: error: (near initialization for 'crc_table[171]') crc32.c:128:1: error: initializer element is not constant crc32.c:128:1: error: (near initialization for 'crc_table[172]') crc32.c:128:1: error: initializer element is not constant crc32.c:128:1: error: (near initialization for 'crc_table[173]') crc32.c:128:1: error: initializer element is not constant crc32.c:128:1: error: (near initialization for 'crc_table[174]') crc32.c:128:1: error: initializer element is not constant crc32.c:128:1: error: (near initialization for 'crc_table[175]') crc32.c:129:1: error: initializer element is not constant crc32.c:129:1: error: (near initialization for 'crc_table[176]') crc32.c:129:1: error: initializer element is not constant crc32.c:129:1: error: (near initialization for 'crc_table[177]') crc32.c:129:1: error: initializer element is not constant crc32.c:129:1: error: (near initialization for 'crc_table[178]') crc32.c:129:1: error: initializer element is not constant crc32.c:129:1: error: (near initialization for 'crc_table[179]') crc32.c:130:1: error: initializer element is not constant crc32.c:130:1: error: (near initialization for 'crc_table[180]') crc32.c:130:1: error: initializer element is not constant crc32.c:130:1: error: (near initialization for 'crc_table[181]') crc32.c:130:1: error: initializer element is not constant crc32.c:130:1: error: (near initialization for 'crc_table[182]') crc32.c:130:1: error: initializer element is not constant crc32.c:130:1: error: (near initialization for 'crc_table[183]') crc32.c:131:1: error: initializer element is not constant crc32.c:131:1: error: (near initialization for 'crc_table[184]') crc32.c:131:1: error: initializer element is not constant crc32.c:131:1: error: (near initialization for 'crc_table[185]') crc32.c:131:1: error: initializer element is not constant crc32.c:131:1: error: (near initialization for 'crc_table[186]') crc32.c:131:1: error: initializer element is not constant crc32.c:131:1: error: (near initialization for 'crc_table[187]') crc32.c:132:1: error: initializer element is not constant crc32.c:132:1: error: (near initialization for 'crc_table[188]') crc32.c:132:1: error: initializer element is not constant crc32.c:132:1: error: (near initialization for 'crc_table[189]') crc32.c:132:1: error: initializer element is not constant crc32.c:132:1: error: (near initialization for 'crc_table[190]') crc32.c:132:1: error: initializer element is not constant crc32.c:132:1: error: (near initialization for 'crc_table[191]') crc32.c:133:1: error: initializer element is not constant crc32.c:133:1: error: (near initialization for 'crc_table[192]') crc32.c:133:1: error: initializer element is not constant crc32.c:133:1: error: (near initialization for 'crc_table[193]') crc32.c:133:1: error: initializer element is not constant crc32.c:133:1: error: (near initialization for 'crc_table[194]') crc32.c:133:1: error: initializer element is not constant crc32.c:133:1: error: (near initialization for 'crc_table[195]') crc32.c:134:1: error: initializer element is not constant crc32.c:134:1: error: (near initialization for 'crc_table[196]') crc32.c:134:1: error: initializer element is not constant crc32.c:134:1: error: (near initialization for 'crc_table[197]') crc32.c:134:1: error: initializer element is not constant crc32.c:134:1: error: (near initialization for 'crc_table[198]') crc32.c:134:1: error: initializer element is not constant crc32.c:134:1: error: (near initialization for 'crc_table[199]') crc32.c:135:1: error: initializer element is not constant crc32.c:135:1: error: (near initialization for 'crc_table[200]') crc32.c:135:1: error: initializer element is not constant crc32.c:135:1: error: (near initialization for 'crc_table[201]') crc32.c:135:1: error: initializer element is not constant crc32.c:135:1: error: (near initialization for 'crc_table[202]') crc32.c:135:1: error: initializer element is not constant crc32.c:135:1: error: (near initialization for 'crc_table[203]') crc32.c:136:1: error: initializer element is not constant crc32.c:136:1: error: (near initialization for 'crc_table[204]') crc32.c:136:1: error: initializer element is not constant crc32.c:136:1: error: (near initialization for 'crc_table[205]') crc32.c:136:1: error: initializer element is not constant crc32.c:136:1: error: (near initialization for 'crc_table[206]') crc32.c:136:1: error: initializer element is not constant crc32.c:136:1: error: (near initialization for 'crc_table[207]') crc32.c:137:1: error: initializer element is not constant crc32.c:137:1: error: (near initialization for 'crc_table[208]') crc32.c:137:1: error: initializer element is not constant crc32.c:137:1: error: (near initialization for 'crc_table[209]') crc32.c:137:1: error: initializer element is not constant crc32.c:137:1: error: (near initialization for 'crc_table[210]') crc32.c:137:1: error: initializer element is not constant crc32.c:137:1: error: (near initialization for 'crc_table[211]') crc32.c:138:1: error: initializer element is not constant crc32.c:138:1: error: (near initialization for 'crc_table[212]') crc32.c:138:1: error: initializer element is not constant crc32.c:138:1: error: (near initialization for 'crc_table[213]') crc32.c:138:1: error: initializer element is not constant crc32.c:138:1: error: (near initialization for 'crc_table[214]') crc32.c:138:1: error: initializer element is not constant crc32.c:138:1: error: (near initialization for 'crc_table[215]') crc32.c:139:1: error: initializer element is not constant crc32.c:139:1: error: (near initialization for 'crc_table[216]') crc32.c:139:1: error: initializer element is not constant crc32.c:139:1: error: (near initialization for 'crc_table[217]') crc32.c:139:1: error: initializer element is not constant crc32.c:139:1: error: (near initialization for 'crc_table[218]') crc32.c:139:1: error: initializer element is not constant crc32.c:139:1: error: (near initialization for 'crc_table[219]') crc32.c:140:1: error: initializer element is not constant crc32.c:140:1: error: (near initialization for 'crc_table[220]') crc32.c:140:1: error: initializer element is not constant crc32.c:140:1: error: (near initialization for 'crc_table[221]') crc32.c:140:1: error: initializer element is not constant crc32.c:140:1: error: (near initialization for 'crc_table[222]') crc32.c:140:1: error: initializer element is not constant crc32.c:140:1: error: (near initialization for 'crc_table[223]') crc32.c:141:1: error: initializer element is not constant crc32.c:141:1: error: (near initialization for 'crc_table[224]') crc32.c:141:1: error: initializer element is not constant crc32.c:141:1: error: (near initialization for 'crc_table[225]') crc32.c:141:1: error: initializer element is not constant crc32.c:141:1: error: (near initialization for 'crc_table[226]') crc32.c:141:1: error: initializer element is not constant crc32.c:141:1: error: (near initialization for 'crc_table[227]') crc32.c:142:1: error: initializer element is not constant crc32.c:142:1: error: (near initialization for 'crc_table[228]') crc32.c:142:1: error: initializer element is not constant crc32.c:142:1: error: (near initialization for 'crc_table[229]') crc32.c:142:1: error: initializer element is not constant crc32.c:142:1: error: (near initialization for 'crc_table[230]') crc32.c:142:1: error: initializer element is not constant crc32.c:142:1: error: (near initialization for 'crc_table[231]') crc32.c:143:1: error: initializer element is not constant crc32.c:143:1: error: (near initialization for 'crc_table[232]') crc32.c:143:1: error: initializer element is not constant crc32.c:143:1: error: (near initialization for 'crc_table[233]') crc32.c:143:1: error: initializer element is not constant crc32.c:143:1: error: (near initialization for 'crc_table[234]') crc32.c:143:1: error: initializer element is not constant crc32.c:143:1: error: (near initialization for 'crc_table[235]') crc32.c:144:1: error: initializer element is not constant crc32.c:144:1: error: (near initialization for 'crc_table[236]') crc32.c:144:1: error: initializer element is not constant crc32.c:144:1: error: (near initialization for 'crc_table[237]') crc32.c:144:1: error: initializer element is not constant crc32.c:144:1: error: (near initialization for 'crc_table[238]') crc32.c:144:1: error: initializer element is not constant crc32.c:144:1: error: (near initialization for 'crc_table[239]') crc32.c:145:1: error: initializer element is not constant crc32.c:145:1: error: (near initialization for 'crc_table[240]') crc32.c:145:1: error: initializer element is not constant crc32.c:145:1: error: (near initialization for 'crc_table[241]') crc32.c:145:1: error: initializer element is not constant crc32.c:145:1: error: (near initialization for 'crc_table[242]') crc32.c:145:1: error: initializer element is not constant crc32.c:145:1: error: (near initialization for 'crc_table[243]') crc32.c:146:1: error: initializer element is not constant crc32.c:146:1: error: (near initialization for 'crc_table[244]') crc32.c:146:1: error: initializer element is not constant crc32.c:146:1: error: (near initialization for 'crc_table[245]') crc32.c:146:1: error: initializer element is not constant crc32.c:146:1: error: (near initialization for 'crc_table[246]') crc32.c:146:1: error: initializer element is not constant crc32.c:146:1: error: (near initialization for 'crc_table[247]') crc32.c:147:1: error: initializer element is not constant crc32.c:147:1: error: (near initialization for 'crc_table[248]') crc32.c:147:1: error: initializer element is not constant crc32.c:147:1: error: (near initialization for 'crc_table[249]') crc32.c:147:1: error: initializer element is not constant crc32.c:147:1: error: (near initialization for 'crc_table[250]') crc32.c:147:1: error: initializer element is not constant crc32.c:147:1: error: (near initialization for 'crc_table[251]') crc32.c:148:1: error: initializer element is not constant crc32.c:148:1: error: (near initialization for 'crc_table[252]') crc32.c:148:1: error: initializer element is not constant crc32.c:148:1: error: (near initialization for 'crc_table[253]') crc32.c:148:1: error: initializer element is not constant crc32.c:148:1: error: (near initialization for 'crc_table[254]') crc32.c:149:1: error: initializer element is not constant crc32.c:149:1: error: (near initialization for 'crc_table[255]') make[1]: *** [crc32.o] Error 1 make[1]: Leaving directory `/home/nitin/tmp/u-boot-2011.06/lib' make: *** [lib/libgeneric.o] Error 2
make distclean; make MPC8315ERDB_config; make getting this error: make[1]: Entering directory `/home/nitin/tmp/u-boot-2011.06/drivers/usb/host' make[1]: Leaving directory `/home/nitin/tmp/u-boot-2011.06/drivers/usb/host' make[1]: Entering directory `/home/nitin/tmp/u-boot-2011.06/drivers/usb/host' powerpc-poky-linux-gcc -g -fpic -mrelocatable -ffunction-sections -fdata-sections -meabi -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0xFE000000 -I/home/nitin/tmp/u-boot-2011.06/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/ppc603e-poky-linux/gcc/powerpc-poky-linux/4.6.1/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC83xx -DCONFIG_E300 -ffixed-r2 -msoft-float -Wall -Wstrict-prototypes -fno-stack-protector -o ehci-hcd.o ehci-hcd.c -c ehci-hcd.c:59:3: error: initializer element is not constant ehci-hcd.c:59:3: error: (near initialization for 'descriptor.device.bcdUSB') ehci-hcd.c:66:3: error: initializer element is not constant ehci-hcd.c:66:3: error: (near initialization for 'descriptor.device.bcdDevice') ehci-hcd.c:75:3: error: initializer element is not constant ehci-hcd.c:75:3: error: (near initialization for 'descriptor.config.wTotalLength') make[1]: *** [ehci-hcd.o] Error 1 make[1]: Leaving directory `/home/nitin/tmp/u-boot-2011.06/drivers/usb/host' make: *** [drivers/usb/host/libusb_host.o] Error 2
Hi Kumar, I am still not able to reproduce the issue, anything else you want me to try to get the issue resolved? Nitin
As there is no responce from the bug submitter, and I am not seeing any issue, closing the bug.
Issue re-occurs w/edison release. This commit appears to fix: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-devtools/gcc/gcc-configure-sdk.inc?id=53f7342562a66d1b14ecee234aa76be07951dedc Should be pulled into a edison bug fix branch
(In reply to comment #13) > Issue re-occurs w/edison release. > > This commit appears to fix: > > http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-devtools/gcc/gcc-configure-sdk.inc?id=53f7342562a66d1b14ecee234aa76be07951dedc > > Should be pulled into a edison bug fix branch This fixes the meta-toolchain stuff. However there is still an issue with sstate-cache I've been able to isolate. For example, lets say we build gcc-cross on one machine, it works fine on that machine and it also builds a working sstate-cache for that gcc. The path for this build env is something like /opt/poky. Now, I got to another machine and point at the sstate-cache from the other machine. Everything builds fine because most things don't work quite like u-boot in how they build things. But u-boot can't find libgcc because it's looking for it in /opt/poky --- demonstration below --- The easiest way to demonstrate the issue is to build gcc-cross on a machine, then you can simple copy the entire sysroot somewhere else. The run gcc again and it will still point at the libgcc in the OTHER path. Basically the libgcc path is hard coded when it should be relative... $ pwd /home/mattsm/git/poky/build_p1020rdb_release $ cp -ar ./tmp/sysroots/x86_64-linux ~/ $ ~/x86_64-linux/usr/libexec/ppce500v2-fsl-linux-gnuspe/gcc/powerpc-fsl-linux-gnuspe/4.6.1/gcc -print-libgcc-file-name /local/home/mattsm/git/poky/build_p1020rdb_release/tmp/sysroots/p1020rdb/usr/lib/powerpc-fsl-linux-gnuspe/4.6.1/libgcc.a The relocated gcc should say the following instead: /local/home/mattsm/x86_64-linux/../ppe500v2/usr/lib/powerpc-fsl-linux-gnuspe/4.6.1/libgcc.a Two things are wrong 1) the machine is hard coded to the path - 'p1020rdb' is the machine in this case solution: ship a symlink with the gcc sstate-cache should solve this issue for the same 'arch' ? 2) the path is not relative solution: do we need a wrapper of some sort or is this a gcc config option being done wrong? i know other cross gcc from codesourcery for instance are relocatable
In general we should be passing the --sysroot option to tools, just like we pass other compiler and linker flags. Certainly bitbake sets up the environment to pass in the correct options as/where needed as far as I know. If that option is specified it should show the correct paths. If software isn't passing in the flags it should be, that is a problem with the specific software. The only other way I know of to solve this is to have wrappers of the toolchain which add in missing options if they weren't there already. To me this is ugly and I'd prefer not to have to do it. We've survived well so far without it but we can reconsider that if this is a major problem. If its just isolated pieces of software, we should look at fixing them though.
(In reply to comment #15) > In general we should be passing the --sysroot option to tools, just like we > pass other compiler and linker flags. Certainly bitbake sets up the environment > to pass in the correct options as/where needed as far as I know. If that option > is specified it should show the correct paths. If software isn't passing in the > flags it should be, that is a problem with the specific software. > > The only other way I know of to solve this is to have wrappers of the toolchain > which add in missing options if they weren't there already. To me this is ugly > and I'd prefer not to have to do it. We've survived well so far without it but > we can reconsider that if this is a major problem. If its just isolated pieces > of software, we should look at fixing them though. I'll try making sure --sysroot is being passed for the failing recipe and report back. Thanks.
(In reply to comment #16) > (In reply to comment #15) > > In general we should be passing the --sysroot option to tools, just like we > > pass other compiler and linker flags. Certainly bitbake sets up the environment > > to pass in the correct options as/where needed as far as I know. If that option > > is specified it should show the correct paths. If software isn't passing in the > > flags it should be, that is a problem with the specific software. > > > > The only other way I know of to solve this is to have wrappers of the toolchain > > which add in missing options if they weren't there already. To me this is ugly > > and I'd prefer not to have to do it. We've survived well so far without it but > > we can reconsider that if this is a major problem. If its just isolated pieces > > of software, we should look at fixing them though. > > I'll try making sure --sysroot is being passed for the failing recipe and > report back. > Fixing the recipe (u-boot in this case) to use the correct --sysroot flags fixed the issue. Thanks.
(In reply to comment #17) > (In reply to comment #16) > > (In reply to comment #15) > > > In general we should be passing the --sysroot option to tools, just like we > > > pass other compiler and linker flags. Certainly bitbake sets up the environment > > > to pass in the correct options as/where needed as far as I know. If that option > > > is specified it should show the correct paths. If software isn't passing in the > > > flags it should be, that is a problem with the specific software. > > > > > > The only other way I know of to solve this is to have wrappers of the toolchain > > > which add in missing options if they weren't there already. To me this is ugly > > > and I'd prefer not to have to do it. We've survived well so far without it but > > > we can reconsider that if this is a major problem. If its just isolated pieces > > > of software, we should look at fixing them though. > > > > I'll try making sure --sysroot is being passed for the failing recipe and > > report back. > > > > Fixing the recipe (u-boot in this case) to use the correct --sysroot flags > fixed the issue. > > Thanks. Did you add --sysroot to u-boot recipe or somewhere else? It seems like this should be handled in a generic or common way so every recipe doesn't have to do this.
(In reply to comment #18) > Did you add --sysroot to u-boot recipe or somewhere else? It seems like this > should be handled in a generic or common way so every recipe doesn't have to do > this. Sort of... I used CC instead of just CROSS_COMPILE in the u-boot make invocation. Normal builds with u-boot people usually only define CROSS_COMPILE$=prefix, so we are modify the default slightly. Most build systems use CC and not CROSS_COMPILE so u-boot is actually the special case here... -M