Two build != host fixes
Thu Jan 23 23:02:00 GMT 2014
On Wed, Jan 22, 2014 at 09:21:46PM -0700, Jeff Law wrote:
> > * Makefile.in (BUILD_CPPFLAGS): Do not use ALL_CPPFLAGS.
> > * configure.ac <recursive call for build != host>: Define
> > GENERATOR_FILE. Comment. Use CXX_FOR_BUILD, CXXFLAGS_FOR_BUILD
> > and LD_FOR_BUILD too.
> > * configure: Regenerate.
> The configure.ac changes look fine to me.
Thanks! That part alone ought to fix the in-tree gmp breakage.
> Not sure about the Makefile.in changes, probably because I simply
> don't understand this mess anymore. Is it the $INCLUDES or
> $CPPFLAGS from ALL_CPPFLAGS that causes the problem? I'm guessing
> the latter since it's substituted via @CPPFLAGS@.
> If so, shouldn't we use BUILD_CPPFLAGS=$INCLUDES $(CPPINC)?
INCLUDES is the problem.
INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
-I$(srcdir)/../include @INCINTL@ \
$(CPPINC) $(GMPINC) $(DECNUMINC) $(BACKTRACEINC) \
That's where we potentially have GMPINC fouling the build compile with
host headers, ditto for GLOOGINC and ISLINC. DECNUMINC and
BACKTRACEINC are in-tree so don't cause any problem, but we don't need
either of those when running COMPILER_FOR_BUILD for any of gen*.
Of course, then your question becomes, why exclude CPPFLAGS? (And if
CPPFLAGS needs to be excluded here, then I should have just used
CPPFLAGS=-DGENERATOR_FILE for the recursive configure call..) I'm not
sure now, I'll have to do some digging. Also as to why @INCINTL@ was
removed, when gettext is potentially needed for the gen programs.
Australia Development Lab, IBM
More information about the Gcc-patches