
On Mon, Jan 23, 2017 at 01:56:25PM +0100, Emmanuel Vadot wrote:
Hi Simon,
On Mon, 23 Jan 2017 05:37:50 -0700 Simon Glass sjg@chromium.org wrote:
This appears to cause problems with powerpc:
+x86_64-linux-gnu-gcc: error: unrecognized command line option ?-melf32ppclinux? +error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 +make[2]: *** [tools/_libfdt.so] Error 1 +make[1]: *** [tools] Error 2 +make: *** [sub-make] Error 2
Why does your hostcc have this cflags ?
Looking into this, because it's python doing the building here: swig -python -o tools/libfdt_wrap.c ../lib/libfdt/libfdt.swig python ../lib/libfdt/setup.py "-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include ../include/libfdt_env.h -idirafterinclude -idirafter../include -idirafter../arch/powerpc/include -I../lib/libfdt -I../tools -DCONFIG_SYS_TEXT_BASE=0xFC000000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE " ../lib/libfdt/fdt.c ../lib/libfdt/fdt_ro.c ../lib/libfdt/fdt_rw.c ../lib/libfdt/fdt_strerror.c ../lib/libfdt/fdt_wip.c ../lib/libfdt/fdt_region.c ../lib/libfdt/fdt_sw.c tools/libfdt_wrap.c gcc-4.8.real: error: unrecognized command line option ‘-melf32ppclinux’
I suspect that what's going on is that python is seeing LDFLAGS being set to $(PLATFORM_LDFLAGS) and passing that along. ARM (and sandbox) do not set PLATFORM_LDFLAGS so don't run into this problem.