This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] gcc: Fix sysroot relative paths for MinGW
- From: Jeff Law <law at redhat dot com>
- To: Tadek Kijkowski <tkijkowski at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 2 Dec 2016 09:34:33 -0700
- Subject: Re: [PATCH] gcc: Fix sysroot relative paths for MinGW
- Authentication-results: sourceware.org; auth=none
- References: <CAOj9pe9zHrAPx1NfweFSwLbf0CrmTRB+Rz5cq=S-QD7R7YusWQ@mail.gmail.com> <57cef11a-db04-16e0-e643-c1e3a3bc1605@redhat.com> <c615d28b-52a7-cdee-ebc0-9ddd0f74a118@gmail.com>
On 10/08/2016 04:26 AM, Tadek Kijkowski wrote:
Prevent paths relative to sysroot directory from being transformed to
Windows form with MSYS prefix.
Second attempt:
Moved most changes to x-mingw32. Only thing added to Makefile.in are new
variables to ease overriding in included file.
Disabled overriding standard lib and include paths (with /mingw/lib and
/mingw/include) in mingw32.h when TARGET_SYSTEM_ROOT is defined.
Host fragments (x-foo files) are strongly discouraged. The developer
docs suggest they should only be used for makefile dependencies.
Practice is somewhat looser than that. This stuff is so ugly that I'd
really prefer it be buried, so I think it deserves an exception to the
guidelines. But if you need further stuff in this space, let's try to
avoid additional host fragments.
There's several other directories that are not over-ridden, presumably
because they're not relative to sysroot?
Target s-selftest in gcc fails on MinGW:
/home/tadek/gcc/gcc-build-mingw32-sysroot/./gcc/xgcc
-B/home/tadek/gcc/gcc-build-mingw32-sysroot/./gcc/ -xc -S -c /dev/null
-fself-test
cc1.exe: fatal error: input file 'nul.s' is the same as output file
It's enough to specify any output file, like '-o self-test-result.s' to
fix the issue. Specifying '-o /dev/null' works as well, but I'm not sure
if it's safe on all systems. It's a topic for separate patch.
I think you're supposed to use HOST_BIT_BUCKET instead of /dev/null.
That can be a follow-up patch.
Manual at "https://gcc.gnu.org/install/configure.html" does mention that
path specified with|--with-native-system-header-dir is located within
sysroot, but it fails to mention that the same applies to
||--with-local-prefix.
Changelog: 2016-10-08 Tadek Kijkowski> <tkijkowski@gmail.com>
* gcc/Makefile.in, gcc/config/i386/x-mingw32:
|Fix sysroot relative paths for MinGW
* gcc/config/i386/mingw32.h: Disable overriding default library and
include paths when sysroot is defined
I'm going to go ahead and installon the trunk. Thanks for updating the
documentation on what those little makefile fragments do. It'll be
helpful if anyone ever needs to change them in the future.
Thanks,
Jeff