This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Passing AM_CFLAGS to CC_FOR_BUILD compiler leads to errors when cross-compiling


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 ?


> 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.

Cheers
  Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]