[patch] Fix PR/41943 include search path composition is bogus for *-*-mingw32 targets
Kai Tietz
ktietz70@googlemail.com
Sun Dec 6 18:50:00 GMT 2009
2009/12/6 Joseph S. Myers <joseph@codesourcery.com>:
> On Sun, 6 Dec 2009, Kai Tietz wrote:
>
>> Well, the issue happens (as described in the bug-report), when you try
>> to build a relocatable native toolchain for mingw. For this you need
>> to specify --prefix and --with-sysroot together. By current logic this
>> leads to $sysroot/$prefix/include. As prefix and sysroot are full
>> paths, for this targets the concatenation of those two paths makes no
>> sense, as they will result in something X:/sysroot/Y:/prefix/include.
>> More details you can see in the bug
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41943 reported by Emrich.
>
> How is $prefix getting inside $sysroot? Paths inside sysroots should be
> native paths - for example, on a toolchain targetting GNU/Linux, paths
> such as /usr/include and /usr/lib are always used inside the sysroot,
> regardless of the prefix with which the toolchain is configured. This
> works fine for GNU/Linux-target tools, so you need to explain how the
> search paths end up being different in your case.
For linux it makes sense to concat $sysroot/$prefix, as both paths
are absolute and have no additional drive letters within, but this
patch is for native Windows gcc. For DOS based file-systems there is
also the drive letter within $prefix and within $sysroot, as both have
to be absolute paths. So here by concatenation of prefix and sysroot,
it leads to an unusable path. Eg. prefix=C:/toolchain/prefix
sysroot=C:/toolchain/prefix/target (for windows) gets to a final path
C:/toolchain/prefix/C:/toolchain/prefix/target
Kai
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
More information about the Gcc-patches
mailing list