Commit be912515 by Nathanael Nerode

re PR bootstrap/14871 (Non-unified-tree ordinary cross-compiler builds default…

re PR bootstrap/14871 (Non-unified-tree ordinary cross-compiler builds default to stupid names for tools)

	PR bootstrap/14871
	* 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.

From-SVN: r80542
parent 84264cb6
2004-04-09 Nathanael Nerode <neroden@gcc.gnu.org>
PR bootstrap/14871
* 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.
2004-04-06 Nathanael Nerode <neroden@gcc.gnu.org> 2004-04-06 Nathanael Nerode <neroden@gcc.gnu.org>
PR bootstrap/14760 PR bootstrap/14760
......
...@@ -246,6 +246,7 @@ TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs: ...@@ -246,6 +246,7 @@ TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
AR_FOR_TARGET=@AR_FOR_TARGET@ AR_FOR_TARGET=@AR_FOR_TARGET@
CONFIGURED_AR_FOR_TARGET=@CONFIGURED_AR_FOR_TARGET@
USUAL_AR_FOR_TARGET = ` \ USUAL_AR_FOR_TARGET = ` \
if [ -f $$r/binutils/ar ] ; then \ if [ -f $$r/binutils/ar ] ; then \
echo $$r/binutils/ar ; \ echo $$r/binutils/ar ; \
...@@ -253,11 +254,12 @@ USUAL_AR_FOR_TARGET = ` \ ...@@ -253,11 +254,12 @@ USUAL_AR_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \ if [ '$(host)' = '$(target)' ] ; then \
echo $(AR); \ echo $(AR); \
else \ else \
echo ar | sed '$(program_transform_name)' ; \ echo $(CONFIGURED_AR_FOR_TARGET) ; \
fi; \ fi; \
fi` fi`
AS_FOR_TARGET=@AS_FOR_TARGET@ AS_FOR_TARGET=@AS_FOR_TARGET@
CONFIGURED_AS_FOR_TARGET=@CONFIGURED_AS_FOR_TARGET@
USUAL_AS_FOR_TARGET = ` \ USUAL_AS_FOR_TARGET = ` \
if [ -f $$r/gas/as-new ] ; then \ if [ -f $$r/gas/as-new ] ; then \
echo $$r/gas/as-new ; \ echo $$r/gas/as-new ; \
...@@ -267,7 +269,7 @@ USUAL_AS_FOR_TARGET = ` \ ...@@ -267,7 +269,7 @@ USUAL_AS_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \ if [ '$(host)' = '$(target)' ] ; then \
echo $(AS); \ echo $(AS); \
else \ else \
echo as | sed '$(program_transform_name)' ; \ echo $(CONFIGURED_AS_FOR_TARGET) ; \
fi; \ fi; \
fi` fi`
...@@ -293,6 +295,7 @@ CXXFLAGS_FOR_TARGET = $(CXXFLAGS) ...@@ -293,6 +295,7 @@ CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
CONFIGURED_DLLTOOL_FOR_TARGET=@CONFIGURED_DLLTOOL_FOR_TARGET@
USUAL_DLLTOOL_FOR_TARGET = ` \ USUAL_DLLTOOL_FOR_TARGET = ` \
if [ -f $$r/binutils/dlltool ] ; then \ if [ -f $$r/binutils/dlltool ] ; then \
echo $$r/binutils/dlltool ; \ echo $$r/binutils/dlltool ; \
...@@ -300,13 +303,14 @@ USUAL_DLLTOOL_FOR_TARGET = ` \ ...@@ -300,13 +303,14 @@ USUAL_DLLTOOL_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \ if [ '$(host)' = '$(target)' ] ; then \
echo $(DLLTOOL); \ echo $(DLLTOOL); \
else \ else \
echo dlltool | sed '$(program_transform_name)' ; \ echo $(CONFIGURED_DLLTOOL_FOR_TARGET) ; \
fi; \ fi; \
fi` fi`
GCJ_FOR_TARGET = @GCJ_FOR_TARGET@ GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
LD_FOR_TARGET=@LD_FOR_TARGET@ LD_FOR_TARGET=@LD_FOR_TARGET@
CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@
USUAL_LD_FOR_TARGET = ` \ USUAL_LD_FOR_TARGET = ` \
if [ -f $$r/ld/ld-new ] ; then \ if [ -f $$r/ld/ld-new ] ; then \
echo $$r/ld/ld-new ; \ echo $$r/ld/ld-new ; \
...@@ -316,13 +320,14 @@ USUAL_LD_FOR_TARGET = ` \ ...@@ -316,13 +320,14 @@ USUAL_LD_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \ if [ '$(host)' = '$(target)' ] ; then \
echo $(LD); \ echo $(LD); \
else \ else \
echo ld | sed '$(program_transform_name)' ; \ echo $(CONFIGURED_LD_FOR_TARGET) ; \
fi; \ fi; \
fi` fi`
LDFLAGS_FOR_TARGET = LDFLAGS_FOR_TARGET =
NM_FOR_TARGET=@NM_FOR_TARGET@ NM_FOR_TARGET=@NM_FOR_TARGET@
CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@
USUAL_NM_FOR_TARGET = ` \ USUAL_NM_FOR_TARGET = ` \
if [ -f $$r/binutils/nm-new ] ; then \ if [ -f $$r/binutils/nm-new ] ; then \
echo $$r/binutils/nm-new ; \ echo $$r/binutils/nm-new ; \
...@@ -332,11 +337,12 @@ USUAL_NM_FOR_TARGET = ` \ ...@@ -332,11 +337,12 @@ USUAL_NM_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \ if [ '$(host)' = '$(target)' ] ; then \
echo $(NM); \ echo $(NM); \
else \ else \
echo nm | sed '$(program_transform_name)' ; \ echo $(CONFIGURED_NM_FOR_TARGET) ; \
fi; \ fi; \
fi` fi`
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
CONFIGURED_RANLIB_FOR_TARGET=@CONFIGURED_RANLIB_FOR_TARGET@
USUAL_RANLIB_FOR_TARGET = ` \ USUAL_RANLIB_FOR_TARGET = ` \
if [ -f $$r/binutils/ranlib ] ; then \ if [ -f $$r/binutils/ranlib ] ; then \
echo $$r/binutils/ranlib ; \ echo $$r/binutils/ranlib ; \
...@@ -348,11 +354,12 @@ USUAL_RANLIB_FOR_TARGET = ` \ ...@@ -348,11 +354,12 @@ USUAL_RANLIB_FOR_TARGET = ` \
echo ranlib; \ echo ranlib; \
fi; \ fi; \
else \ else \
echo ranlib | sed '$(program_transform_name)' ; \ echo $(CONFIGURED_RANLIB_FOR_TARGET) ; \
fi; \ fi; \
fi` fi`
WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@ WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
CONFIGURED_WINDRES_FOR_TARGET=@CONFIGURED_WINDRES_FOR_TARGET@
USUAL_WINDRES_FOR_TARGET = ` \ USUAL_WINDRES_FOR_TARGET = ` \
if [ -f $$r/binutils/windres ] ; then \ if [ -f $$r/binutils/windres ] ; then \
echo $$r/binutils/windres ; \ echo $$r/binutils/windres ; \
...@@ -360,7 +367,7 @@ USUAL_WINDRES_FOR_TARGET = ` \ ...@@ -360,7 +367,7 @@ USUAL_WINDRES_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \ if [ '$(host)' = '$(target)' ] ; then \
echo $(WINDRES); \ echo $(WINDRES); \
else \ else \
echo windres | sed '$(program_transform_name)' ; \ echo $(CONFIGURED_WINDRES_FOR_TARGET) ; \
fi; \ fi; \
fi` fi`
......
...@@ -249,6 +249,7 @@ TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs: ...@@ -249,6 +249,7 @@ TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
AR_FOR_TARGET=@AR_FOR_TARGET@ AR_FOR_TARGET=@AR_FOR_TARGET@
CONFIGURED_AR_FOR_TARGET=@CONFIGURED_AR_FOR_TARGET@
USUAL_AR_FOR_TARGET = ` \ USUAL_AR_FOR_TARGET = ` \
if [ -f $$r/binutils/ar ] ; then \ if [ -f $$r/binutils/ar ] ; then \
echo $$r/binutils/ar ; \ echo $$r/binutils/ar ; \
...@@ -256,11 +257,12 @@ USUAL_AR_FOR_TARGET = ` \ ...@@ -256,11 +257,12 @@ USUAL_AR_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \ if [ '$(host)' = '$(target)' ] ; then \
echo $(AR); \ echo $(AR); \
else \ else \
echo ar | sed '$(program_transform_name)' ; \ echo $(CONFIGURED_AR_FOR_TARGET) ; \
fi; \ fi; \
fi` fi`
AS_FOR_TARGET=@AS_FOR_TARGET@ AS_FOR_TARGET=@AS_FOR_TARGET@
CONFIGURED_AS_FOR_TARGET=@CONFIGURED_AS_FOR_TARGET@
USUAL_AS_FOR_TARGET = ` \ USUAL_AS_FOR_TARGET = ` \
if [ -f $$r/gas/as-new ] ; then \ if [ -f $$r/gas/as-new ] ; then \
echo $$r/gas/as-new ; \ echo $$r/gas/as-new ; \
...@@ -270,7 +272,7 @@ USUAL_AS_FOR_TARGET = ` \ ...@@ -270,7 +272,7 @@ USUAL_AS_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \ if [ '$(host)' = '$(target)' ] ; then \
echo $(AS); \ echo $(AS); \
else \ else \
echo as | sed '$(program_transform_name)' ; \ echo $(CONFIGURED_AS_FOR_TARGET) ; \
fi; \ fi; \
fi` fi`
...@@ -296,6 +298,7 @@ CXXFLAGS_FOR_TARGET = $(CXXFLAGS) ...@@ -296,6 +298,7 @@ CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
CONFIGURED_DLLTOOL_FOR_TARGET=@CONFIGURED_DLLTOOL_FOR_TARGET@
USUAL_DLLTOOL_FOR_TARGET = ` \ USUAL_DLLTOOL_FOR_TARGET = ` \
if [ -f $$r/binutils/dlltool ] ; then \ if [ -f $$r/binutils/dlltool ] ; then \
echo $$r/binutils/dlltool ; \ echo $$r/binutils/dlltool ; \
...@@ -303,13 +306,14 @@ USUAL_DLLTOOL_FOR_TARGET = ` \ ...@@ -303,13 +306,14 @@ USUAL_DLLTOOL_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \ if [ '$(host)' = '$(target)' ] ; then \
echo $(DLLTOOL); \ echo $(DLLTOOL); \
else \ else \
echo dlltool | sed '$(program_transform_name)' ; \ echo $(CONFIGURED_DLLTOOL_FOR_TARGET) ; \
fi; \ fi; \
fi` fi`
GCJ_FOR_TARGET = @GCJ_FOR_TARGET@ GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
LD_FOR_TARGET=@LD_FOR_TARGET@ LD_FOR_TARGET=@LD_FOR_TARGET@
CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@
USUAL_LD_FOR_TARGET = ` \ USUAL_LD_FOR_TARGET = ` \
if [ -f $$r/ld/ld-new ] ; then \ if [ -f $$r/ld/ld-new ] ; then \
echo $$r/ld/ld-new ; \ echo $$r/ld/ld-new ; \
...@@ -319,13 +323,14 @@ USUAL_LD_FOR_TARGET = ` \ ...@@ -319,13 +323,14 @@ USUAL_LD_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \ if [ '$(host)' = '$(target)' ] ; then \
echo $(LD); \ echo $(LD); \
else \ else \
echo ld | sed '$(program_transform_name)' ; \ echo $(CONFIGURED_LD_FOR_TARGET) ; \
fi; \ fi; \
fi` fi`
LDFLAGS_FOR_TARGET = LDFLAGS_FOR_TARGET =
NM_FOR_TARGET=@NM_FOR_TARGET@ NM_FOR_TARGET=@NM_FOR_TARGET@
CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@
USUAL_NM_FOR_TARGET = ` \ USUAL_NM_FOR_TARGET = ` \
if [ -f $$r/binutils/nm-new ] ; then \ if [ -f $$r/binutils/nm-new ] ; then \
echo $$r/binutils/nm-new ; \ echo $$r/binutils/nm-new ; \
...@@ -335,11 +340,12 @@ USUAL_NM_FOR_TARGET = ` \ ...@@ -335,11 +340,12 @@ USUAL_NM_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \ if [ '$(host)' = '$(target)' ] ; then \
echo $(NM); \ echo $(NM); \
else \ else \
echo nm | sed '$(program_transform_name)' ; \ echo $(CONFIGURED_NM_FOR_TARGET) ; \
fi; \ fi; \
fi` fi`
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
CONFIGURED_RANLIB_FOR_TARGET=@CONFIGURED_RANLIB_FOR_TARGET@
USUAL_RANLIB_FOR_TARGET = ` \ USUAL_RANLIB_FOR_TARGET = ` \
if [ -f $$r/binutils/ranlib ] ; then \ if [ -f $$r/binutils/ranlib ] ; then \
echo $$r/binutils/ranlib ; \ echo $$r/binutils/ranlib ; \
...@@ -351,11 +357,12 @@ USUAL_RANLIB_FOR_TARGET = ` \ ...@@ -351,11 +357,12 @@ USUAL_RANLIB_FOR_TARGET = ` \
echo ranlib; \ echo ranlib; \
fi; \ fi; \
else \ else \
echo ranlib | sed '$(program_transform_name)' ; \ echo $(CONFIGURED_RANLIB_FOR_TARGET) ; \
fi; \ fi; \
fi` fi`
WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@ WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
CONFIGURED_WINDRES_FOR_TARGET=@CONFIGURED_WINDRES_FOR_TARGET@
USUAL_WINDRES_FOR_TARGET = ` \ USUAL_WINDRES_FOR_TARGET = ` \
if [ -f $$r/binutils/windres ] ; then \ if [ -f $$r/binutils/windres ] ; then \
echo $$r/binutils/windres ; \ echo $$r/binutils/windres ; \
...@@ -363,7 +370,7 @@ USUAL_WINDRES_FOR_TARGET = ` \ ...@@ -363,7 +370,7 @@ USUAL_WINDRES_FOR_TARGET = ` \
if [ '$(host)' = '$(target)' ] ; then \ if [ '$(host)' = '$(target)' ] ; then \
echo $(WINDRES); \ echo $(WINDRES); \
else \ else \
echo windres | sed '$(program_transform_name)' ; \ echo $(CONFIGURED_WINDRES_FOR_TARGET) ; \
fi; \ fi; \
fi` fi`
......
...@@ -2045,13 +2045,13 @@ AC_SUBST(DEFAULT_LEX) ...@@ -2045,13 +2045,13 @@ AC_SUBST(DEFAULT_LEX)
AC_SUBST(DEFAULT_M4) AC_SUBST(DEFAULT_M4)
# Target tools. # Target tools.
NCN_STRICT_CHECK_TARGET_TOOL(AR_FOR_TARGET, ar) NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_AR_FOR_TARGET, ar)
NCN_STRICT_CHECK_TARGET_TOOL(AS_FOR_TARGET, as) NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_AS_FOR_TARGET, as)
NCN_STRICT_CHECK_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool) NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_DLLTOOL_FOR_TARGET, dlltool)
NCN_STRICT_CHECK_TARGET_TOOL(LD_FOR_TARGET, ld) NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_LD_FOR_TARGET, ld)
NCN_STRICT_CHECK_TARGET_TOOL(NM_FOR_TARGET, nm) NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_NM_FOR_TARGET, nm)
NCN_STRICT_CHECK_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :) NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_RANLIB_FOR_TARGET, ranlib, :)
NCN_STRICT_CHECK_TARGET_TOOL(WINDRES_FOR_TARGET, windres) NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_WINDRES_FOR_TARGET, windres)
AC_SUBST(GCC_FOR_TARGET) AC_SUBST(GCC_FOR_TARGET)
AC_SUBST(FLAGS_FOR_TARGET) AC_SUBST(FLAGS_FOR_TARGET)
...@@ -2077,7 +2077,24 @@ if test "x${build}" = "x${host}" ; then ...@@ -2077,7 +2077,24 @@ if test "x${build}" = "x${host}" ; then
NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)" NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)" RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
WINDRES_FOR_TARGET="\$(USUAL_WINDRES_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 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. # Certain tools may need extra flags.
AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target} AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target} RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment