diff options
author | DJ Delorie <dj@redhat.com> | 2001-11-28 19:55:01 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2001-11-28 19:55:01 +0000 |
commit | 49b7683babf4cebb078064df005d3e76b6062a85 (patch) | |
tree | cb02038a191f27cd03d7ede8c05032457fca087e /configure.in | |
parent | f7460f5f7689262ad24e7e28c9d6662169cd3549 (diff) | |
download | gdb-49b7683babf4cebb078064df005d3e76b6062a85.zip gdb-49b7683babf4cebb078064df005d3e76b6062a85.tar.gz gdb-49b7683babf4cebb078064df005d3e76b6062a85.tar.bz2 |
When build != host, create libiberty for the build machine.
* Makefile.in (TARGET_CONFIGARGS, BUILD_CONFIGARGS): Replace
CONFIG_ARGUMENTS.
(ALL_BUILD_MODULES_LIST, BUILD_CONFIGDIRS, BUILD_SUBDIR):
New variables.
(ALL_BUILD_MODULES, CONFIGURE_BUILD_MODULES): New variables
and rules.
(all.normal): Depend on ALL_BUILD_MODULES.
(CONFIGURE_TARGET_MODULES rule): Use TARGET_CONFIGARGS.
(all-build-libiberty): Depend on configure-build-libiberty.
* configure: Calculate and substitute proper value for
ALL_BUILD_MODULES.
* configure.in: Create the build subdirectory.
Calculate and substitute TARGET_CONFIGARGS (formerly
CONFIG_ARGUMENTS); also BUILD_SUBDIR and BUILD_CONFIGARGS (new).
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/configure.in b/configure.in index 7b7e4bb..fa83ced 100644 --- a/configure.in +++ b/configure.in @@ -434,6 +434,18 @@ if [ ! -d ${target_subdir} ] ; then fi fi +build_subdir=${build_alias} + +if [ x"${build_alias}" != x"${host}" ] ; then + if [ ! -d ${build_subdir} ] ; then + if mkdir ${build_subdir} ; then true + else + echo "'*** could not make ${PWD=`pwd`}/${build_subdir}" 1>&2 + exit 1 + fi + fi +fi + copy_dirs= # Handle --with-headers=XXX. The contents of the named directory are @@ -1260,7 +1272,8 @@ if [ "${shared}" = "yes" ]; then esac fi -# Record target_configdirs and the configure arguments in Makefile. +# Record target_configdirs and the configure arguments for target and +# build configuration in Makefile. target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'` targargs=`echo "${arguments}" | \ sed -e 's/--no[^ ]*//' \ @@ -1269,6 +1282,11 @@ targargs=`echo "${arguments}" | \ -e 's/--bu[a-z-]*=[^ ]*//' \ -e 's/--ta[a-z-]*=[^ ]*//'` +# For the build-side libraries, we just need to pretend we're native, +# and not use the same cache file. Multilibs are neither needed nor +# desired. +buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${targargs}" + # Passing a --with-cross-host argument lets the target libraries know # whether they are being built with a cross-compiler or being built # native. However, it would be better to use other mechanisms to make the @@ -1289,6 +1307,9 @@ if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " newlib " targargs="--with-newlib ${targargs}" fi +# Pass the appropriate --host, --build, and --cache-file arguments. +targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${targargs}" + # provide a proper gxx_include_dir. # Note, if you change the default, make sure to fix both here and in # the gcc, libio, and libstdc++ subdirectories. @@ -1426,15 +1447,16 @@ qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'` # macros. qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'` -targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${targargs}" sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \ - -e "s%^CONFIG_ARGUMENTS[ ]*=.*$%CONFIG_ARGUMENTS = ${targargs}%" \ + -e "s%^TARGET_CONFIGARGS[ ]*=.*$%TARGET_CONFIGARGS = ${targargs}%" \ -e "s%^FLAGS_FOR_TARGET[ ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%" \ -e "s%^CC_FOR_TARGET[ ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%" \ -e "s%^CHILL_FOR_TARGET[ ]*=.*$%CHILL_FOR_TARGET = ${CHILL_FOR_TARGET}%" \ -e "s%^CXX_FOR_TARGET[ ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%" \ -e "s%^CXX_FOR_TARGET_FOR_RECURSIVE_MAKE[ ]*=.*$%CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = ${qqCXX_FOR_TARGET}%" \ -e "s%^TARGET_SUBDIR[ ]*=.*$%TARGET_SUBDIR = ${target_subdir}%" \ + -e "s%^BUILD_SUBDIR[ ]*=.*$%BUILD_SUBDIR = ${build_subdir}%" \ + -e "s%^BUILD_CONFIGARGS[ ]*=.*$%BUILD_CONFIGARGS = ${buildargs}%" \ -e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \ Makefile > Makefile.tem rm -f Makefile |