]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Pass empty CFLAGS on invocation of libfdt/setup.py
authorMax Filippov <jcmvbkbc@gmail.com>
Thu, 16 Mar 2017 22:23:55 +0000 (15:23 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 20 Mar 2017 22:04:43 +0000 (18:04 -0400)
When building u-boot tools in cross-build environment CFLAGS environment
variable set up for target is taken into an account when building code
for host. Make it empty on invocation of python.

This fixes the following build errors when cross-compiling for xtensa:

  cc1: error: unrecognized command line option "-mlongcalls"
  cc1: error: unrecognized command line option "-mauto-litpools"

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
tools/Makefile

index a894b5c9d235a8f4181b506f4e37d9aff8b353d7..e9cde02c906c56fa4611b6ca440e820484a58953 100644 (file)
@@ -120,7 +120,7 @@ _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
 libfdt:
 
 tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c
-       LDFLAGS="$(HOSTLDFLAGS)" python $(srctree)/lib/libfdt/setup.py \
+       LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= python $(srctree)/lib/libfdt/setup.py \
                "$(_hostc_flags)" $^
        mv _libfdt.so $@