This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [toplevel] Overhaul detection of target compilers
- From: DJ Delorie <dj at redhat dot com>
- To: paolo dot bonzini at lu dot unisi dot ch
- Cc: paul at codesourcery dot com, gcc-patches at gcc dot gnu dot org, newlib at sourceware dot org
- Date: Wed, 10 Aug 2005 16:18:44 -0400
- Subject: Re: [toplevel] Overhaul detection of target compilers
- References: <42D7E3CC.8070109@lu.unisi.ch> <42DE95FA.6000006@codesourcery.com> <dc07jr$ejh$1@sea.gmane.org> <200508092028.54017.paul@codesourcery.com> <42F9C2E3.6060709@lu.unisi.ch>
> >This breaks newlib cross builds.
> >
> I am looking at it.
Try this. *GCC defaults to *CC's value so it should be safe, but
that's just from a brief review. Plus, my cross build is working with
this patch ;-)
Index: Makefile.tpl
===================================================================
RCS file: /cvs/src/src/Makefile.tpl,v
retrieving revision 1.143
diff -p -U3 -r1.143 Makefile.tpl
--- Makefile.tpl 8 Aug 2005 09:21:05 -0000 1.143
+++ Makefile.tpl 10 Aug 2005 20:17:31 -0000
@@ -365,7 +365,7 @@ USUAL_AS_FOR_TARGET = ` \
fi`
CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@ $(FLAGS_FOR_TARGET)
-CONFIGURED_CC_FOR_TARGET=@CONFIGURED_CC_FOR_TARGET@
+CONFIGURED_GCC_FOR_TARGET=@CONFIGURED_GCC_FOR_TARGET@
USUAL_CC_FOR_TARGET = ` \
if [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ] ; then \
echo $$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc ; \
@@ -373,7 +373,7 @@ USUAL_CC_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \
echo $(CC); \
else \
- echo $(CONFIGURED_CC_FOR_TARGET) ; \
+ echo $(CONFIGURED_GCC_FOR_TARGET) ; \
fi; \
fi`