[Bug preprocessor/41943] include search path composition is bogus
ktietz at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Dec 6 11:47:00 GMT 2009
------- 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
More information about the Gcc-bugs
mailing list