[patch] Fix PR/41943 include search path composition is bogus for *-*-mingw32 targets
Kai Tietz
ktietz70@googlemail.com
Sun Dec 6 18:38:00 GMT 2009
2009/12/6 Joseph S. Myers <joseph@codesourcery.com>:
> On Sun, 6 Dec 2009, Kai Tietz wrote:
>
>> Hello,
>>
>> this patch prevents for DOS based systems, that the sysroot gets add
>> to a prefix, which has already an absolute path with drive-letter.
>> This fixes the native build of *-*-mingw32 relocatable toolchains
>> using --prefix and --with-sysroot. This patch doesn't change behavior
>> for *nix based OSes.
>
> Why do you think there is a bug here?
>
> Suppose that the "native" (non-sysroot) layout places certain headers or
> libraries in a patch C:/foo/bar. Then a sysrooted configuration places
> those headers or libraries somewhere under $sysroot, and the natural place
> is $sysroot/c:/foo/bar. If the ":" isn't valid there in a path, you could
> instead define the mapping to be $sysroot/c/foo/bar or $sysroot/foo/bar if
> there will never be ambiguities between different drive letters, but if
> the path is searched in the sysroot on one host it should be searched in
> the sysroot under the same conditions on all hosts.
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
>
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.
Cheers,
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