From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29750 invoked by alias); 6 Dec 2009 11:47:19 -0000 Received: (qmail 29717 invoked by uid 48); 6 Dec 2009 11:47:03 -0000 Date: Sun, 06 Dec 2009 11:47:00 -0000 Message-ID: <20091206114703.29716.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug preprocessor/41943] include search path composition is bogus In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ktietz at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-12/txt/msg00594.txt.bz2 ------- 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