Skip to contentSkip to conversation

Pass empty CFLAGS on invocation of libfdt/setup.py

PATCH New Max Filippov 2 participants 3 messages Mar 16, 2017 – Mar 21, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 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. 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"

---
Changes v1->v2:
- remove "" after CFLAGS=

 tools/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/Makefile +1 -1
index 1c840d7..f3de657 100644
@@ -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
#1 lore raw

PATCH v2 1/1 Pass empty CFLAGS on invocation of libfdt/setup.py

Quoted 11 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. 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"

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/20170317/cd927754/attachment.sig>
#2 lore raw

PATCH v2 1/1 Pass empty CFLAGS on invocation of libfdt/setup.py

In reply to Max Filippov
Quoted 4 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. Make it empty on invocation of python.

Quoted 8 lines

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"

Applied to u-boot/master, 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/20170321/00dfbe6f/attachment.sig>