From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 16 Mar 2017 17:11:55 -0400 Subject: [U-Boot] [PATCH] Pass empty CFLAGS on invocation of libfdt/setup.py In-Reply-To: <1489689480-23775-1-git-send-email-jcmvbkbc@gmail.com> References: <1489689480-23775-1-git-send-email-jcmvbkbc@gmail.com> Message-ID: <20170316211155.GO19897@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Mar 16, 2017 at 11:38:00AM -0700, Max Filippov wrote: > 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 > --- > tools/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/Makefile b/tools/Makefile > index 1c840d7..c224e8a 100644 > --- a/tools/Makefile > +++ b/tools/Makefile > @@ -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! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: