This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[RFC, toplevel] Change default cross-tools names for non-ubertree cross builds


Bootstrapped i686-pc-linux-gnu.

Alex, DJ, is this OK?  I think it's the right thing to do, but I could
be convinced otherwise.  I believe that program_transform_name should be
strictly for the tools being built, not for finding stuff.  (Configure
finds ${target_alias}-ar, etc.)

	* Makefile.tpl: If we don't have built-in-tree target tools,
	use the ones found by configure rather than hacking around with
	program_transform_name.
	* configure.in: Give Makefile.tpl the information necessary
	to do that.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.89
diff -u -r1.89 Makefile.tpl
--- Makefile.tpl	25 Mar 2004 01:37:39 -0000	1.89
+++ Makefile.tpl	6 Apr 2004 23:44:22 -0000
@@ -249,6 +249,7 @@
 FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
 
 AR_FOR_TARGET=@AR_FOR_TARGET@
+CONFIGURED_AR_FOR_TARGET=@CONFIGURED_AR_FOR_TARGET@
 USUAL_AR_FOR_TARGET = ` \
   if [ -f $$r/binutils/ar ] ; then \
     echo $$r/binutils/ar ; \
@@ -256,11 +257,12 @@
     if [ '$(host)' = '$(target)' ] ; then \
       echo $(AR); \
     else \
-       echo ar | sed '$(program_transform_name)' ; \
+      echo $(CONFIGURED_AR_FOR_TARGET) ; \
     fi; \
   fi`
 
 AS_FOR_TARGET=@AS_FOR_TARGET@
+CONFIGURED_AS_FOR_TARGET=@CONFIGURED_AS_FOR_TARGET@
 USUAL_AS_FOR_TARGET = ` \
   if [ -f $$r/gas/as-new ] ; then \
     echo $$r/gas/as-new ; \
@@ -270,7 +272,7 @@
     if [ '$(host)' = '$(target)' ] ; then \
       echo $(AS); \
     else \
-       echo as | sed '$(program_transform_name)' ; \
+      echo $(CONFIGURED_AS_FOR_TARGET) ; \
     fi; \
   fi`
 
@@ -296,6 +298,7 @@
 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
 
 DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
+CONFIGURED_DLLTOOL_FOR_TARGET=@CONFIGURED_DLLTOOL_FOR_TARGET@
 USUAL_DLLTOOL_FOR_TARGET = ` \
   if [ -f $$r/binutils/dlltool ] ; then \
     echo $$r/binutils/dlltool ; \
@@ -303,13 +306,14 @@
     if [ '$(host)' = '$(target)' ] ; then \
       echo $(DLLTOOL); \
     else \
-       echo dlltool | sed '$(program_transform_name)' ; \
+      echo $(CONFIGURED_DLLTOOL_FOR_TARGET) ; \
     fi; \
   fi`
 
 GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
 
 LD_FOR_TARGET=@LD_FOR_TARGET@
+CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@
 USUAL_LD_FOR_TARGET = ` \
   if [ -f $$r/ld/ld-new ] ; then \
     echo $$r/ld/ld-new ; \
@@ -319,13 +323,14 @@
     if [ '$(host)' = '$(target)' ] ; then \
       echo $(LD); \
     else \
-       echo ld | sed '$(program_transform_name)' ; \
+      echo $(CONFIGURED_LD_FOR_TARGET) ; \
     fi; \
   fi`
 
 LDFLAGS_FOR_TARGET = 
 
 NM_FOR_TARGET=@NM_FOR_TARGET@
+CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@
 USUAL_NM_FOR_TARGET = ` \
   if [ -f $$r/binutils/nm-new ] ; then \
     echo $$r/binutils/nm-new ; \
@@ -335,11 +340,12 @@
     if [ '$(host)' = '$(target)' ] ; then \
       echo $(NM); \
     else \
-       echo nm | sed '$(program_transform_name)' ; \
+      echo $(CONFIGURED_NM_FOR_TARGET) ; \
     fi; \
   fi`
 
 RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
+CONFIGURED_RANLIB_FOR_TARGET=@CONFIGURED_RANLIB_FOR_TARGET@
 USUAL_RANLIB_FOR_TARGET = ` \
   if [ -f $$r/binutils/ranlib ] ; then \
     echo $$r/binutils/ranlib ; \
@@ -351,11 +357,12 @@
          echo ranlib; \
       fi; \
     else \
-       echo ranlib | sed '$(program_transform_name)' ; \
+      echo $(CONFIGURED_RANLIB_FOR_TARGET) ; \
     fi; \
   fi`
 
 WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
+CONFIGURED_WINDRES_FOR_TARGET=@CONFIGURED_WINDRES_FOR_TARGET@
 USUAL_WINDRES_FOR_TARGET = ` \
   if [ -f $$r/binutils/windres ] ; then \
     echo $$r/binutils/windres ; \
@@ -363,7 +370,7 @@
     if [ '$(host)' = '$(target)' ] ; then \
       echo $(WINDRES); \
     else \
-       echo windres | sed '$(program_transform_name)' ; \
+      echo $(CONFIGURED_WINDRES_FOR_TARGET) ; \
     fi; \
   fi`
 
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.281
diff -u -r1.281 configure.in
--- configure.in	6 Apr 2004 17:16:51 -0000	1.281
+++ configure.in	6 Apr 2004 23:44:23 -0000
@@ -2045,13 +2045,13 @@
 AC_SUBST(DEFAULT_M4)
 
 # Target tools.
-NCN_STRICT_CHECK_TARGET_TOOL(AR_FOR_TARGET, ar)
-NCN_STRICT_CHECK_TARGET_TOOL(AS_FOR_TARGET, as)
-NCN_STRICT_CHECK_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool)
-NCN_STRICT_CHECK_TARGET_TOOL(LD_FOR_TARGET, ld)
-NCN_STRICT_CHECK_TARGET_TOOL(NM_FOR_TARGET, nm)
-NCN_STRICT_CHECK_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :)
-NCN_STRICT_CHECK_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
+NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_AR_FOR_TARGET, ar)
+NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_AS_FOR_TARGET, as)
+NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_DLLTOOL_FOR_TARGET, dlltool)
+NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_LD_FOR_TARGET, ld)
+NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_NM_FOR_TARGET, nm)
+NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_RANLIB_FOR_TARGET, ranlib, :)
+NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_WINDRES_FOR_TARGET, windres)
 
 AC_SUBST(GCC_FOR_TARGET)
 AC_SUBST(FLAGS_FOR_TARGET)
@@ -2077,7 +2077,24 @@
   NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
   RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
   WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
+else
+  # Just use the ones we found.
+  AR_FOR_TARGET="\$(CONFIGURED_AR_FOR_TARGET)"
+  AS_FOR_TARGET="\$(CONFIGURED_AS_FOR_TARGET)"
+  DLLTOOL_FOR_TARGET="\$(CONFIGURED_DLLTOOL_FOR_TARGET)"
+  LD_FOR_TARGET="\$(CONFIGURED_LD_FOR_TARGET)"
+  NM_FOR_TARGET="\$(CONFIGURED_NM_FOR_TARGET)"
+  RANLIB_FOR_TARGET="\$(CONFIGURED_RANLIB_FOR_TARGET)"
+  WINDRES_FOR_TARGET="\$(CONFIGURED_WINDRES_FOR_TARGET)"  
 fi
+AC_SUBST(AR_FOR_TARGET)
+AC_SUBST(AS_FOR_TARGET)
+AC_SUBST(DLLTOOL_FOR_TARGET)
+AC_SUBST(LD_FOR_TARGET)
+AC_SUBST(NM_FOR_TARGET)
+AC_SUBST(RANLIB_FOR_TARGET)
+AC_SUBST(WINDRES_FOR_TARGET)
+
 # Certain tools may need extra flags.
 AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
 RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}

-- 
Make sure your vote will count.
http://www.verifiedvoting.org/


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