This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Passing AM_CFLAGS to CC_FOR_BUILD compiler leads to errors when cross-compiling
- From: Vlad Zakharov <Vladislav dot Zakharov at synopsys dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>, "nickc at redhat dot com" <nickc at redhat dot com>, "Vladislav dot Zakharov at synopsys dot com" <Vladislav dot Zakharov at synopsys dot com>
- Cc: "Anton dot Kolesov at synopsys dot com" <Anton dot Kolesov at synopsys dot com>, "Eugeniy dot Paltsev at synopsys dot com" <Eugeniy dot Paltsev at synopsys dot com>, "Alexey dot Brodkin at synopsys dot com" <Alexey dot Brodkin at synopsys dot com>, "amodra at gmail dot com" <amodra at gmail dot com>, "hongjiu dot lu at intel dot com" <hongjiu dot lu at intel dot com>
- Date: Fri, 19 Aug 2016 16:14:00 +0000
- Subject: Re: Passing AM_CFLAGS to CC_FOR_BUILD compiler leads to errors when cross-compiling
- Authentication-results: sourceware.org; auth=none
- References: <1471431790.19853.112.camel@synopsys.com> <4e52dc32-d926-e1a5-7e72-1aa27dd7a2f8@redhat.com>
Hi Nick,
On Fri, 2016-08-19 at 14:04 +0100, Nick Clifton wrote:
> Hi Vlad,
>
> >
> > cc1: error: unrecognized command line option "-Wstack-usage=262144"
> >
> > $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \
> >
> > AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
> Have you tried configuring the toolchain with --enable-build-warnings=no ?
>
"--enable-build-warnings=no" option allows binutuils to be built without such failures,
thanks.
>
> >
> > So solutions could be either to have WARN_CFLAGS_FOR_BUILD or AM_CLFLAGS_FOR_BUILD
> > variable with corresponding options and verify CC_FOR_BUILD to be compatible with
> > such options
> Hmm, I think that I would prefer this option. Using both variables. Ie compute
> WARN_CFLAGS_FOR_BUILD and assign it to AM_CFLAGS_FOR_BUILD along with ZLIBINC.
>
> >
> > or just not to use AM_FLAGS with CC_FOR_BUILD compiler at all
> > as AM_FLAGS seems to be compatible only with CC compiler.
> I think that this is not a good idea as there may be important options in AM_CFLAGS
> which are really needed. For example the ZLIBINC flags.
>
> >
> > Any ideas or suggestions?
> Would you like to create a patch as outlined above ? My concern however is that
> you may not be able to use the AC_EGREP_CPP macro. Possibly you can override the
> definition of ac_cpp that is being used, or maybe there is another macro that you
> can use instead.
I will try to create such patch. Thank you for your advises.
>
> Cheers
> Nick
>
--
Best regards,
Vlad Zakharov <vzakhar@synopsys.com>