summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac17
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 9cc51d5c99f..d9f2167ad44 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -681,6 +681,10 @@ AC_ARG_ENABLE(shared,
], [enable_shared=yes])
AC_SUBST(enable_shared)
+AC_ARG_WITH(build-sysroot,
+ [ --with-build-sysroot=sysroot
+ use sysroot as the system root during the build])
+
AC_ARG_WITH(sysroot,
[ --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR.],
[
@@ -691,7 +695,12 @@ AC_ARG_WITH(sysroot,
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
-
+ if test "x$with_build_sysroot" != x; then
+ build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)'
+ else
+ build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
+ fi
+
if test "x$exec_prefix" = xNONE; then
if test "x$prefix" = xNONE; then
test_prefix=/usr/local
@@ -1643,7 +1652,7 @@ if test x$host != x$target
then
CROSS="-DCROSS_COMPILE"
ALL=all.cross
- SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
+ SYSTEM_HEADER_DIR=$build_system_header_dir
case "$host","$target" in
# Darwin crosses can use the host system's libraries and headers,
# because of the fat library support. Of course, it must be the
@@ -1677,11 +1686,11 @@ fi
# then define inhibit_libc in LIBGCC2_CFLAGS.
# This prevents libgcc2 from containing any code which requires libc
# support.
-inhibit_libc=
+inhibit_libc=false
if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
test x$with_newlib = xyes ; } &&
{ test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
- inhibit_libc=-Dinhibit_libc
+ inhibit_libc=true
fi
AC_SUBST(inhibit_libc)