* [PATCH][GCC][mingw-w64][Ada] Fix Ada native bootstrap (PR81878).
@ 2018-10-25 13:53 Tamar Christina
2018-10-26 9:07 ` Arnaud Charlet
2018-10-26 11:21 ` Eric Botcazou
0 siblings, 2 replies; 4+ messages in thread
From: Tamar Christina @ 2018-10-25 13:53 UTC (permalink / raw)
To: gcc-patches; +Cc: nd, charlet, ebotcazou, derodat
[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]
Hi All,
Due to the changes in PR81878 builds of GCC8 and trunk are impossible
with Ada enabled[1][2].
The reason the patch breaks the bootstrap is due to how gnatlink receives it's
arguments.
gnatlink is usually invoked as
$(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS)
so it passes $(CC) and $(GCC_LINK) as quoted arguments to the program.
Because of this quotation the msys2 shell does not translate any paths in
$(CC) and $(GCC_LINK) from their Unix version to their Windows version.
Furthermore because there are multiple paths in the values separated by space
and because the paths often contain a prefix like -L (e.g. -L/f/foo) we can't
use `fix_srcfile_path` to fix this.
An alternative solution would have been to create a stub program that echos the
commandline options it receives back, and calling this program with $(CC) and $(GCC_LINK)
unquoted to get them translated. However this was a bit more invasive.
So instead for native compilations we add -B../../ such that it picks up the lto plugin
from the previous built compiler. Since it's native there shouldn't be a mismatch here.
[1] https://github.com/Alexpux/MINGW-packages/pull/3877#issuecomment-408651809
[2] https://gcc.gnu.org/ml/gcc/2018-07/msg00410.html
Bootstrapped on x86_64-pc-linux-gnu and mingw-w64-x86_64.
Ok for trunk?
Thanks,
Tamar
gnattools/ChangeLog:
2018-10-25 Tamar Christina <tamar.christina@arm.com>
PR ada/81878
* Makefile.in (TOOLS_FLAGS_TO_PASS_NATIVE): Add -B ../../.
--
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: rb10136.patch --]
[-- Type: text/x-diff; name="rb10136.patch", Size: 793 bytes --]
diff --git a/gnattools/Makefile.in b/gnattools/Makefile.in
index d19147fe5d74753249d9b9d8dceab79da72b1537..8a98a2d0b1895b1798e22a31b44c6e0c9bc4ab73 100644
--- a/gnattools/Makefile.in
+++ b/gnattools/Makefile.in
@@ -70,9 +70,12 @@ INCLUDES_FOR_SUBDIR = -iquote . -iquote .. -iquote ../.. \
ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
# Variables for gnattools, native
+# Due to Windows path translations (See PR ada/81878) we need to add
+# -B../../ to the compiler paths as a workaround for that $(CXX) contains
+# Unix style paths that won't be translated by the runtime.
TOOLS_FLAGS_TO_PASS_NATIVE= \
"CC=../../xgcc -B../../" \
- "CXX=$(CXX)" \
+ "CXX=$(CXX) -B../../" \
"CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
"LDFLAGS=$(LDFLAGS)" \
"ADAFLAGS=$(ADAFLAGS)" \
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][GCC][mingw-w64][Ada] Fix Ada native bootstrap (PR81878).
2018-10-25 13:53 [PATCH][GCC][mingw-w64][Ada] Fix Ada native bootstrap (PR81878) Tamar Christina
@ 2018-10-26 9:07 ` Arnaud Charlet
2018-10-26 11:21 ` Eric Botcazou
1 sibling, 0 replies; 4+ messages in thread
From: Arnaud Charlet @ 2018-10-26 9:07 UTC (permalink / raw)
To: Tamar Christina; +Cc: gcc-patches, nd, ebotcazou, derodat
> Bootstrapped on x86_64-pc-linux-gnu and mingw-w64-x86_64.
>
> Ok for trunk?
OK, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][GCC][mingw-w64][Ada] Fix Ada native bootstrap (PR81878).
2018-10-25 13:53 [PATCH][GCC][mingw-w64][Ada] Fix Ada native bootstrap (PR81878) Tamar Christina
2018-10-26 9:07 ` Arnaud Charlet
@ 2018-10-26 11:21 ` Eric Botcazou
2018-10-30 9:34 ` Tamar Christina
1 sibling, 1 reply; 4+ messages in thread
From: Eric Botcazou @ 2018-10-26 11:21 UTC (permalink / raw)
To: Tamar Christina; +Cc: gcc-patches, nd, charlet, derodat
> Due to the changes in PR81878 builds of GCC8 and trunk are impossible
> with Ada enabled[1][2].
>
> The reason the patch breaks the bootstrap is due to how gnatlink receives
> it's arguments.
Thanks for working on this!
> Bootstrapped on x86_64-pc-linux-gnu and mingw-w64-x86_64.
>
> Ok for trunk?
Please put it on the 8 branch too.
--
Eric Botcazou
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH][GCC][mingw-w64][Ada] Fix Ada native bootstrap (PR81878).
2018-10-26 11:21 ` Eric Botcazou
@ 2018-10-30 9:34 ` Tamar Christina
0 siblings, 0 replies; 4+ messages in thread
From: Tamar Christina @ 2018-10-30 9:34 UTC (permalink / raw)
To: Eric Botcazou; +Cc: gcc-patches, nd, charlet, derodat
Hi Eric,
> -----Original Message-----
> From: Eric Botcazou <ebotcazou@adacore.com>
> Sent: Friday, October 26, 2018 11:20
> To: Tamar Christina <Tamar.Christina@arm.com>
> Cc: gcc-patches@gcc.gnu.org; nd <nd@arm.com>; charlet@adacore.com;
> derodat@adacore.com
> Subject: Re: [PATCH][GCC][mingw-w64][Ada] Fix Ada native bootstrap
> (PR81878).
>
> > Due to the changes in PR81878 builds of GCC8 and trunk are impossible
> > with Ada enabled[1][2].
> >
> > The reason the patch breaks the bootstrap is due to how gnatlink
> > receives it's arguments.
>
> Thanks for working on this!
>
> > Bootstrapped on x86_64-pc-linux-gnu and mingw-w64-x86_64.
> >
> > Ok for trunk?
>
> Please put it on the 8 branch too.
Thanks, I'll put it there after giving it a few days on trunk.
Cheers,
Tamar
>
> --
> Eric Botcazou
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-30 7:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-25 13:53 [PATCH][GCC][mingw-w64][Ada] Fix Ada native bootstrap (PR81878) Tamar Christina
2018-10-26 9:07 ` Arnaud Charlet
2018-10-26 11:21 ` Eric Botcazou
2018-10-30 9:34 ` Tamar Christina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).