public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Matthias Klose <doko@ubuntu.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: wookey@debian.org
Subject: [patch] --with-build-sysroot requires --with-sysroot
Date: Mon, 14 Jan 2013 20:23:00 -0000	[thread overview]
Message-ID: <50F46920.1030000@ubuntu.com> (raw)

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

                 reply	other threads:[~2013-01-14 20:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50F46920.1030000@ubuntu.com \
    --to=doko@ubuntu.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=wookey@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).