Pass empty CFLAGS on invocation of libfdt/setup.py
PATCH 1/1 Pass empty CFLAGS on invocation of libfdt/setup.py
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. Set it to 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"
--- tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/Makefile +1 -1
@@ -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 $@
Signature · 1 line
2.1.4
PATCH 1/1 Pass empty CFLAGS on invocation of libfdt/setup.py
Quoted 19 lines · Max Filippov
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. Set it to 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 <[email protected]>--- tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/Makefile +0
-0
tools/Makefile _libfdt.so-sharedobjs += $(LIBFDT_OBJS) · line 123
Quoted 5 lines
tools/Makefile +1
-1@@ -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 \
I think we need to be passing in HOSTCFLAGS or we'll end up being broken on certain other cases (which are broken today I suspect). Can you test that out? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170316/4d52fc2b/attachment.sig>
PATCH 1/1 Pass empty CFLAGS on invocation of libfdt/setup.py
Quoted 23 lines · Tom Rini
Quoted 21 lines · Max Filippov
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. Set it to 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 <[email protected]>--- tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/Makefile +0
-0@@ -120,7 +120,7 @@ _libfdt.so-sharedobjs += $(LIBFDT_OBJS) libfdt:
Quoted 6 lines
tools/Makefile _libfdt.so-sharedobjs += $(LIBFDT_OBJS) · line 123
Quoted 3 lines
tools/Makefile +1
-1tools/_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 \I think we need to be passing in HOSTCFLAGS or we'll end up being broken on certain other cases (which are broken today I suspect).
I believe that the $(_hostc_flags) in the next line is meant to do exactly that. There's code in the lib/libfdt/setup.py that uses that parameter.
Signature · 2 lines
Thanks. -- Max
PATCH 1/1 Pass empty CFLAGS on invocation of libfdt/setup.py
In reply to Max FilippovHi Max,
Quoted 7 lines · Max Filippov
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. Set it to empty on invocation of python.
This fixes the following build errors when cross-compiling for xtensa:
Quoted 7 lines
cc1: error: unrecognized command line option "-mlongcalls"
cc1: error: unrecognized command line option "-mauto-litpools"Signed-off-by Max Filippov <[email protected]>--- tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Please see below
tools/Makefile _libfdt.so-sharedobjs += $(LIBFDT_OBJS) · line 123
Quoted 11 lines
tools/Makefile +1
-1@@ -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 \
Can we drop the "" ?
Quoted 6 lines
tools/Makefile +0
-1"$(_hostc_flags)" $^ mv _libfdt.so $@ --2.1.4
Regards,
Simon