aboutsummaryrefslogtreecommitdiff
path: root/config/acx.m4
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2006-07-19 17:06:06 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2006-07-19 17:06:06 +0000
commit380e48e5f8296b2ea9a23f552e4dc4542c318c37 (patch)
treee52186df3ebea2ace3e2fe63fde3ead7f8860ed1 /config/acx.m4
parent9d272b3c31601772aac330c1e749587fa7fbc677 (diff)
downloadnewlib-380e48e5f8296b2ea9a23f552e4dc4542c318c37.zip
newlib-380e48e5f8296b2ea9a23f552e4dc4542c318c37.tar.gz
newlib-380e48e5f8296b2ea9a23f552e4dc4542c318c37.tar.bz2
2006-07-19 Paolo Bonzini <bonzini@gnu.org>
* Makefile.tpl (configure-stageN-MODULE): Pass --with-build-libsubdir for stages after the first. * Makefile.in: Regenerate. config: 2006-07-19 Paolo Bonzini <bonzini@gnu.org> * acx.m4: Support --with-build-libsubdir and AC_SUBST build_libsubdir.
Diffstat (limited to 'config/acx.m4')
-rw-r--r--config/acx.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/config/acx.m4 b/config/acx.m4
index 7c4c213..76456fb 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -74,8 +74,22 @@ dnl # amount to a lot more with autoconf 2.5x.
AC_DEFUN([GCC_TOPLEV_SUBDIRS],
[AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_TARGET]) []dnl
AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_BUILD]) []dnl
+
+# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
+# have matching libraries, they should use host libraries: Makefile.tpl
+# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
+# However, they still use the build modules, because the corresponding
+# host modules (e.g. bison) are only built for the host when bootstrap
+# finishes. So:
+# - build_subdir is where we find build modules, and never changes.
+# - build_libsubdir is where we find build libraries, and can be overridden.
+
# Prefix 'build-' so this never conflicts with target_subdir.
build_subdir="build-${build_noncanonical}"
+AC_ARG_WITH(build-libsubdir,
+[ --with-build-libsubdir=[DIR] Directory where to find libraries for build system],
+build_libsubdir="$withval",
+build_libsubdir="$build_subdir")
# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
if ( test $srcdir = . && test -d gcc ) \
|| test -d $srcdir/../host-${host_noncanonical}; then
@@ -85,6 +99,7 @@ else
fi
# No prefix.
target_subdir=${target_noncanonical}
+AC_SUBST([build_libsubdir]) []dnl
AC_SUBST([build_subdir]) []dnl
AC_SUBST([host_subdir]) []dnl
AC_SUBST([target_subdir]) []dnl