public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] --with-build-sysroot requires --with-sysroot
@ 2013-01-14 20:23 Matthias Klose
  0 siblings, 0 replies; only message in thread
From: Matthias Klose @ 2013-01-14 20:23 UTC (permalink / raw)
  To: GCC Patches; +Cc: wookey

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

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


[-- Attachment #2: sysroot.diff --]
[-- Type: text/x-diff, Size: 1524 bytes --]

gcc/

2013-01-14  Matthias Klose <doko@ubuntu.com>

	* 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])],

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-14 20:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-14 20:23 [patch] --with-build-sysroot requires --with-sysroot Matthias Klose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).