summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-28 01:37:24 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-28 01:37:24 +0000
commit319727714e2aa18749dd90cfb9490730dd9524cd (patch)
treee1dc68a1dd3eda602d655c2a861ed8f415a0163c /configure.in
parent1f1d05cfc68dce3b30b100077b6db491e90aafd3 (diff)
downloadgcc-319727714e2aa18749dd90cfb9490730dd9524cd.tar.gz
top level:
2001-11-27 DJ Delorie <dj@redhat.com> Zack Weinberg <zack@codesourcery.com> 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). libiberty: 2001-11-27 Zack Weinberg <zack@codesourcery.com> * _doprnt.c: Moved here from gcc/doprint.c. Adjust to build in libiberty context. Fix typo in leading comment. * configure.in: Fix various AC_DEFINEs so autoheader works. If any of vprintf, vsprintf, vfprintf is missing from libc, then AC_REPLACE_FUNCS(_doprnt). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47393 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in28
1 files changed, 25 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index 321215898dc..7df47b3a69d 100644
--- a/configure.in
+++ b/configure.in
@@ -445,6 +445,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
@@ -1349,7 +1361,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[^ ]*//' \
@@ -1358,6 +1371,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
@@ -1378,6 +1396,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 and libstdc++-v3 subdirectories.
@@ -1533,9 +1554,8 @@ 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}%" \
@@ -1543,6 +1563,8 @@ sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:"
-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