mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-23 10:54:07 +08:00
Makefile.tpl (AR_FOR_BUILD, [...]): Use autoconf substitutions.
2007-10-01 Paolo Bonzini <bonzini@gnu.org> * Makefile.tpl (AR_FOR_BUILD, AS_FOR_BUILD, CXX_FOR_BUILD, DLLTOOL_FOR_BUILD, GCJ_FOR_BUILD, GFORTRAN_FOR_BUILD, LDFLAGS_FOR_BUILD, LD_FOR_BUILD, NM_FOR_BUILD, RANLIB_FOR_BUILD, WINDMC_FOR_BUILD, WINDRES_FOR_BUILD): Use autoconf substitutions. * configure.ac: Default them to host tools for $host = $build. Subst them. * configure: Regenerate. * Makefile.in: Regenerate. From-SVN: r128902
This commit is contained in:
parent
c2ffa91a3a
commit
0999159b4f
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2007-10-01 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* Makefile.tpl (AR_FOR_BUILD, AS_FOR_BUILD, CXX_FOR_BUILD,
|
||||
DLLTOOL_FOR_BUILD, GCJ_FOR_BUILD, GFORTRAN_FOR_BUILD,
|
||||
LDFLAGS_FOR_BUILD, LD_FOR_BUILD, NM_FOR_BUILD, RANLIB_FOR_BUILD,
|
||||
WINDMC_FOR_BUILD, WINDRES_FOR_BUILD): Use autoconf substitutions.
|
||||
* configure.ac: Default them to host tools for $host = $build.
|
||||
Subst them.
|
||||
|
||||
* configure: Regenerate.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2006-09-24 Peter Bergner <bergner@vnet.ibm.com>
|
||||
|
||||
* MAINTAINERS (Register allocation reviewer): Add myself.
|
||||
|
15
Makefile.in
15
Makefile.in
@ -251,10 +251,21 @@ PWD_COMMAND = $${PWDCMD-pwd}
|
||||
|
||||
# compilers to use to create programs which must be run in the build
|
||||
# environment.
|
||||
AR_FOR_BUILD = @AR_FOR_BUILD@
|
||||
AS_FOR_BUILD = @AS_FOR_BUILD@
|
||||
CC_FOR_BUILD = @CC_FOR_BUILD@
|
||||
CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
|
||||
|
||||
CXX_FOR_BUILD = $(CXX)
|
||||
CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
|
||||
CXX_FOR_BUILD = @CXX_FOR_BUILD@
|
||||
DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
|
||||
GCJ_FOR_BUILD = @GCJ_FOR_BUILD@
|
||||
GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
|
||||
LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
|
||||
LD_FOR_BUILD = @LD_FOR_BUILD@
|
||||
NM_FOR_BUILD = @NM_FOR_BUILD@
|
||||
RANLIB_FOR_BUILD = @RANLIB_FOR_BUILD@
|
||||
WINDMC_FOR_BUILD = @WINDMC_FOR_BUILD@
|
||||
WINDRES_FOR_BUILD = @WINDRES_FOR_BUILD@
|
||||
|
||||
# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
|
||||
# here so that they can be overridden by Makefile fragments.
|
||||
|
15
Makefile.tpl
15
Makefile.tpl
@ -254,10 +254,21 @@ PWD_COMMAND = $${PWDCMD-pwd}
|
||||
|
||||
# compilers to use to create programs which must be run in the build
|
||||
# environment.
|
||||
AR_FOR_BUILD = @AR_FOR_BUILD@
|
||||
AS_FOR_BUILD = @AS_FOR_BUILD@
|
||||
CC_FOR_BUILD = @CC_FOR_BUILD@
|
||||
CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
|
||||
|
||||
CXX_FOR_BUILD = $(CXX)
|
||||
CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
|
||||
CXX_FOR_BUILD = @CXX_FOR_BUILD@
|
||||
DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
|
||||
GCJ_FOR_BUILD = @GCJ_FOR_BUILD@
|
||||
GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
|
||||
LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
|
||||
LD_FOR_BUILD = @LD_FOR_BUILD@
|
||||
NM_FOR_BUILD = @NM_FOR_BUILD@
|
||||
RANLIB_FOR_BUILD = @RANLIB_FOR_BUILD@
|
||||
WINDMC_FOR_BUILD = @WINDMC_FOR_BUILD@
|
||||
WINDRES_FOR_BUILD = @WINDRES_FOR_BUILD@
|
||||
|
||||
# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
|
||||
# here so that they can be overridden by Makefile fragments.
|
||||
|
56
configure
vendored
56
configure
vendored
@ -272,7 +272,7 @@ PACKAGE_STRING=
|
||||
PACKAGE_BUGREPORT=
|
||||
|
||||
ac_unique_file="move-if-change"
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs CC_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CFLAGS_FOR_BUILD CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files='serialization_dependencies host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag'
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@ -2806,9 +2806,31 @@ if test -z "${CC}" && test "${build}" = "${host}" ; then
|
||||
fi
|
||||
|
||||
if test "${build}" != "${host}" ; then
|
||||
AR_FOR_BUILD=${AR_FOR_BUILD-ar}
|
||||
AS_FOR_BUILD=${AS_FOR_BUILD-as}
|
||||
CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
|
||||
CXX_FOR_BUILD=${CXX_FOR_BUILD-g++}
|
||||
GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
|
||||
GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
|
||||
DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
|
||||
LD_FOR_BUILD=${LD_FOR_BUILD-ld}
|
||||
NM_FOR_BUILD=${NM_FOR_BUILD-nm}
|
||||
RANLIB_FOR_BUILD=${RANLIB_FOR_BUILD-ranlib}
|
||||
WINDRES_FOR_BUILD=${WINDRES_FOR_BUILD-windres}
|
||||
WINDMC_FOR_BUILD=${WINDMC_FOR_BUILD-windmc}
|
||||
else
|
||||
AR_FOR_BUILD="\$(AR)"
|
||||
AS_FOR_BUILD="\$(AS)"
|
||||
CC_FOR_BUILD="\$(CC)"
|
||||
CXX_FOR_BUILD="\$(CXX)"
|
||||
GCJ_FOR_BUILD="\$(GCJ)"
|
||||
GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
|
||||
DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
|
||||
LD_FOR_BUILD="\$(LD)"
|
||||
NM_FOR_BUILD="\$(NM)"
|
||||
RANLIB_FOR_BUILD="\$(RANLIB)"
|
||||
WINDRES_FOR_BUILD="\$(WINDRES)"
|
||||
WINDMC_FOR_BUILD="\$(WINDMC)"
|
||||
fi
|
||||
|
||||
ac_ext=c
|
||||
@ -5855,6 +5877,8 @@ esac
|
||||
# Allow the user to override the flags for
|
||||
# our build compiler if desired.
|
||||
CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
|
||||
CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CFLAGS}}
|
||||
LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${CFLAGS}}
|
||||
|
||||
# On Canadian crosses, we'll be searching the right directories for
|
||||
# the previously-installed cross compiler, so don't bother to add
|
||||
@ -5915,6 +5939,20 @@ done
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Generate default definitions for YACC, M4, LEX and other programs that run
|
||||
# on the build machine. These are used if the Makefile can't locate these
|
||||
# programs in objdir.
|
||||
@ -7922,7 +7960,6 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Target tools.
|
||||
|
||||
# Check whether --with-build-time-tools or --without-build-time-tools was given.
|
||||
@ -12793,7 +12830,21 @@ s,@build_configdirs@,$build_configdirs,;t t
|
||||
s,@host_configargs@,$host_configargs,;t t
|
||||
s,@configdirs@,$configdirs,;t t
|
||||
s,@target_configargs@,$target_configargs,;t t
|
||||
s,@AR_FOR_BUILD@,$AR_FOR_BUILD,;t t
|
||||
s,@AS_FOR_BUILD@,$AS_FOR_BUILD,;t t
|
||||
s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
|
||||
s,@CFLAGS_FOR_BUILD@,$CFLAGS_FOR_BUILD,;t t
|
||||
s,@CXXFLAGS_FOR_BUILD@,$CXXFLAGS_FOR_BUILD,;t t
|
||||
s,@CXX_FOR_BUILD@,$CXX_FOR_BUILD,;t t
|
||||
s,@DLLTOOL_FOR_BUILD@,$DLLTOOL_FOR_BUILD,;t t
|
||||
s,@GCJ_FOR_BUILD@,$GCJ_FOR_BUILD,;t t
|
||||
s,@GFORTRAN_FOR_BUILD@,$GFORTRAN_FOR_BUILD,;t t
|
||||
s,@LDFLAGS_FOR_BUILD@,$LDFLAGS_FOR_BUILD,;t t
|
||||
s,@LD_FOR_BUILD@,$LD_FOR_BUILD,;t t
|
||||
s,@NM_FOR_BUILD@,$NM_FOR_BUILD,;t t
|
||||
s,@RANLIB_FOR_BUILD@,$RANLIB_FOR_BUILD,;t t
|
||||
s,@WINDMC_FOR_BUILD@,$WINDMC_FOR_BUILD,;t t
|
||||
s,@WINDRES_FOR_BUILD@,$WINDRES_FOR_BUILD,;t t
|
||||
s,@config_shell@,$config_shell,;t t
|
||||
s,@YACC@,$YACC,;t t
|
||||
s,@BISON@,$BISON,;t t
|
||||
@ -12815,7 +12866,6 @@ s,@WINDRES@,$WINDRES,;t t
|
||||
s,@WINDMC@,$WINDMC,;t t
|
||||
s,@OBJCOPY@,$OBJCOPY,;t t
|
||||
s,@OBJDUMP@,$OBJDUMP,;t t
|
||||
s,@CFLAGS_FOR_BUILD@,$CFLAGS_FOR_BUILD,;t t
|
||||
s,@CC_FOR_TARGET@,$CC_FOR_TARGET,;t t
|
||||
s,@CXX_FOR_TARGET@,$CXX_FOR_TARGET,;t t
|
||||
s,@GCC_FOR_TARGET@,$GCC_FOR_TARGET,;t t
|
||||
|
40
configure.ac
40
configure.ac
@ -41,6 +41,7 @@ AC_CANONICAL_SYSTEM
|
||||
AC_ARG_PROGRAM
|
||||
|
||||
m4_pattern_allow([^AS_FOR_TARGET$])dnl
|
||||
m4_pattern_allow([^AS_FOR_BUILD$])dnl
|
||||
|
||||
# Get 'install' or 'install-sh' and its variants.
|
||||
AC_PROG_INSTALL
|
||||
@ -1082,9 +1083,31 @@ if test -z "${CC}" && test "${build}" = "${host}" ; then
|
||||
fi
|
||||
|
||||
if test "${build}" != "${host}" ; then
|
||||
AR_FOR_BUILD=${AR_FOR_BUILD-ar}
|
||||
AS_FOR_BUILD=${AS_FOR_BUILD-as}
|
||||
CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
|
||||
CXX_FOR_BUILD=${CXX_FOR_BUILD-g++}
|
||||
GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
|
||||
GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
|
||||
DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
|
||||
LD_FOR_BUILD=${LD_FOR_BUILD-ld}
|
||||
NM_FOR_BUILD=${NM_FOR_BUILD-nm}
|
||||
RANLIB_FOR_BUILD=${RANLIB_FOR_BUILD-ranlib}
|
||||
WINDRES_FOR_BUILD=${WINDRES_FOR_BUILD-windres}
|
||||
WINDMC_FOR_BUILD=${WINDMC_FOR_BUILD-windmc}
|
||||
else
|
||||
AR_FOR_BUILD="\$(AR)"
|
||||
AS_FOR_BUILD="\$(AS)"
|
||||
CC_FOR_BUILD="\$(CC)"
|
||||
CXX_FOR_BUILD="\$(CXX)"
|
||||
GCJ_FOR_BUILD="\$(GCJ)"
|
||||
GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
|
||||
DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
|
||||
LD_FOR_BUILD="\$(LD)"
|
||||
NM_FOR_BUILD="\$(NM)"
|
||||
RANLIB_FOR_BUILD="\$(RANLIB)"
|
||||
WINDRES_FOR_BUILD="\$(WINDRES)"
|
||||
WINDMC_FOR_BUILD="\$(WINDMC)"
|
||||
fi
|
||||
|
||||
AC_PROG_CC
|
||||
@ -2365,6 +2388,8 @@ esac
|
||||
# Allow the user to override the flags for
|
||||
# our build compiler if desired.
|
||||
CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
|
||||
CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CFLAGS}}
|
||||
LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${CFLAGS}}
|
||||
|
||||
# On Canadian crosses, we'll be searching the right directories for
|
||||
# the previously-installed cross compiler, so don't bother to add
|
||||
@ -2422,7 +2447,21 @@ AC_SUBST(target_configargs)
|
||||
|
||||
|
||||
# Build tools.
|
||||
AC_SUBST(AR_FOR_BUILD)
|
||||
AC_SUBST(AS_FOR_BUILD)
|
||||
AC_SUBST(CC_FOR_BUILD)
|
||||
AC_SUBST(CFLAGS_FOR_BUILD)
|
||||
AC_SUBST(CXXFLAGS_FOR_BUILD)
|
||||
AC_SUBST(CXX_FOR_BUILD)
|
||||
AC_SUBST(DLLTOOL_FOR_BUILD)
|
||||
AC_SUBST(GCJ_FOR_BUILD)
|
||||
AC_SUBST(GFORTRAN_FOR_BUILD)
|
||||
AC_SUBST(LDFLAGS_FOR_BUILD)
|
||||
AC_SUBST(LD_FOR_BUILD)
|
||||
AC_SUBST(NM_FOR_BUILD)
|
||||
AC_SUBST(RANLIB_FOR_BUILD)
|
||||
AC_SUBST(WINDMC_FOR_BUILD)
|
||||
AC_SUBST(WINDRES_FOR_BUILD)
|
||||
AC_SUBST(config_shell)
|
||||
|
||||
# Generate default definitions for YACC, M4, LEX and other programs that run
|
||||
@ -2507,7 +2546,6 @@ NCN_STRICT_CHECK_TOOLS(OBJDUMP, objdump)
|
||||
AC_SUBST(CC)
|
||||
AC_SUBST(CXX)
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(CFLAGS_FOR_BUILD)
|
||||
AC_SUBST(CXXFLAGS)
|
||||
|
||||
# Target tools.
|
||||
|
Loading…
Reference in New Issue
Block a user