public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ktietz at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/41943] include search path composition is bogus
Date: Sun, 06 Dec 2009 11:47:00 -0000	[thread overview]
Message-ID: <20091206114703.29716.qmail@sourceware.org> (raw)
In-Reply-To: <bug-41943-11564@http.gcc.gnu.org/bugzilla/>



------- Comment #6 from ktietz at gcc dot gnu dot org  2009-12-06 11:47 -------
By rethinking this issue I came to the point that this would lead to pretty
havy incompatibilities between -pc-mingw32 and -w64-mingw32. Also it would
disallow to use the default /usr/local prefix for installtion without setting
up a sysroot.
So I think to change gcc.c here is the better variant and fixes both venture
targets here. As win32 paths are pretty unique for native windows targets, I
think this patch here is minimal intrusive for *nix targets.

Index: gcc/gcc/gcc.c
===================================================================
--- gcc.orig/gcc/gcc.c  2009-11-26 17:37:26.000000000 +0100
+++ gcc/gcc/gcc.c       2009-12-06 12:37:38.213190000 +0100
@@ -2900,8 +2900,11 @@
 {
   if (!IS_ABSOLUTE_PATH (prefix))
     fatal ("system path '%s' is not absolute", prefix);
-
-  if (target_system_root)
+  if (target_system_root
+#if HAVE_DOS_BASED_FILE_SYSTEM == 1
+      && (!prefix[0] || prefix[1] != ':')
+#endif
+     )
     {
       if (target_sysroot_suffix)
          prefix = concat (target_sysroot_suffix, prefix, NULL);

I tested this patch and it seems to do what you expects it should do.

Cheers,
Kai


-- 

ktietz at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |ktietz at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-11-29 20:47:06         |2009-12-06 11:47:02
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41943


  parent reply	other threads:[~2009-12-06 11:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04 21:16 [Bug preprocessor/41943] New: " rainer at emrich-ebersheim dot de
2009-11-04 21:19 ` [Bug preprocessor/41943] " pinskia at gcc dot gnu dot org
2009-11-05  8:17 ` rainer at emrich-ebersheim dot de
2009-11-07 11:05 ` rainer at emrich-ebersheim dot de
2009-11-29 20:47 ` ktietz at gcc dot gnu dot org
2009-12-03 21:56 ` ktietz at gcc dot gnu dot org
2009-12-04  8:24 ` rainer at emrich-ebersheim dot de
2009-12-06 11:47 ` ktietz at gcc dot gnu dot org [this message]
2009-12-06 20:01 ` ktietz at gcc dot gnu dot org
2010-07-23 18:32 ` ktietz at gcc dot gnu dot org
2010-08-31 14:31 ` ktietz at gcc dot gnu dot org

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=20091206114703.29716.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).