this is documented in doc/install.texi:
"""
This option is only useful when you are already using
@option{--with-sysroot}."""
now, lets error out if you configure --with-build-sysroot without
--with-sysroot. Ok for the trunk?
This was hit in PR55743. I think the patch in
http://gcc.gnu.org/ml/gcc-patches/2013-01/msg00198.html is still valid, but
independent of this.
Matthias
gcc/
2013-01-14 Matthias Klose <[email protected]>
* configure.ac: fail --with-build-sysroot without --with-sysroot.
* configure: Regenerate.
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac (Revision 195151)
+++ gcc/configure.ac (Arbeitskopie)
@@ -755,15 +755,6 @@
configured_native_system_header_dir="${withval}"
], [configured_native_system_header_dir=])
-AC_ARG_WITH(build-sysroot,
- [AS_HELP_STRING([--with-build-sysroot=sysroot],
- [use sysroot as the system root during the build])],
- [if test x"$withval" != x ; then
- SYSROOT_CFLAGS_FOR_TARGET="--sysroot=$withval"
- fi],
- [SYSROOT_CFLAGS_FOR_TARGET=])
-AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)
-
if test "x$prefix" = xNONE; then
test_prefix=/usr/local
else
@@ -805,6 +796,19 @@
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
AC_SUBST(CROSS_SYSTEM_HEADER_DIR)
+AC_ARG_WITH(build-sysroot,
+ [AS_HELP_STRING([--with-build-sysroot=sysroot],
+ [use sysroot as the system root during the build])],
+ [if test x"$withval" != x ; then
+ SYSROOT_CFLAGS_FOR_TARGET="--sysroot=$withval"
+ fi],
+ [SYSROOT_CFLAGS_FOR_TARGET=])
+AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)
+if test x"$TARGET_SYSTEM_ROOT" = x && test x"$SYSROOT_CFLAGS_FOR_TARGET" != x
+then
+ AC_MSG_ERROR([option --with-build-sysroot requires --with-sysroot])
+fi
+
AC_ARG_WITH(specs,
[AS_HELP_STRING([--with-specs=SPECS],
[add SPECS to driver command-line processing])],