public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/108983] New: [13 Regression] Ada build is broken for Native (and Canadian) crosses after r13-6351-ge6d39f68d03c46
@ 2023-03-01  9:18 iains at gcc dot gnu.org
  2023-03-01  9:20 ` [Bug ada/108983] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: iains at gcc dot gnu.org @ 2023-03-01  9:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108983

            Bug ID: 108983
           Summary: [13 Regression] Ada build is broken for Native (and
                    Canadian) crosses after r13-6351-ge6d39f68d03c46
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iains at gcc dot gnu.org
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

r13-6351-ge6d39f68d03c46 modifies

            * Make-generated.in: Use GNATMAKE.
            * gcc-interface/Makefile.in: Ditto.

but $(GNATMAKE) is for $host and some tools are being built for $build.

Up to now we have relied on the install quirk of Ada that the native gnatxxxxx
are not qualified (so that 'gnatmake' is correct for $build and any other
gnatmake needs to be qualified.

for my 0.02 GBP - we should probably add GNATxxxx_FOR_BUILD to disambiguate
this.

here's a hack patch that allows build for a native cross ($build != $host ==
$target) to complete.

(I think the GNATxxx_FOR_BUILD needs to be at the top level, so I am not
posting this for review)

diff --git a/gcc/ada/Make-generated.in b/gcc/ada/Make-generated.in
index 34c86b2cd63..80a573d3ce5 100644
--- a/gcc/ada/Make-generated.in
+++ b/gcc/ada/Make-generated.in
@@ -18,7 +18,7 @@ GEN_IL_FLAGS = -gnata -gnat2012 -gnatw.g -gnatyg -gnatU
$(GEN_IL_INCLUDES)
 ada/seinfo_tables.ads ada/seinfo_tables.adb ada/sinfo.h ada/einfo.h
ada/nmake.ads ada/nmake.adb ada/seinfo.ads ada/sinfo-nodes.ads
ada/sinfo-nodes.adb ada/einfo-entities.ads ada/einfo-entities.adb:
ada/stamp-gen_il ; @true
 ada/stamp-gen_il: $(fsrcdir)/ada/gen_il*
        $(MKDIR) ada/gen_il
-       cd ada/gen_il; $(GNATMAKE) -q -g $(GEN_IL_FLAGS) gen_il-main
+       cd ada/gen_il; $(GNATMAKE_FOR_BUILD) -q -g $(GEN_IL_FLAGS) gen_il-main
        # Ignore errors to work around finalization issues in older compilers
        - cd ada/gen_il; ./gen_il-main
        $(fsrcdir)/../move-if-change ada/gen_il/seinfo_tables.ads
ada/seinfo_tables.ads
@@ -39,14 +39,14 @@ ada/stamp-gen_il: $(fsrcdir)/ada/gen_il*
 # would cause bootstrapping with older compilers to fail. You can call it by
 # hand, as a sanity check that these files are legal.
 ada/seinfo_tables.o: ada/seinfo_tables.ads ada/seinfo_tables.adb
-       cd ada ; $(GNATMAKE) $(GEN_IL_INCLUDES) seinfo_tables.adb -gnatU -gnatX
+       cd ada ; $(GNATMAKE_FOR_BUILD) $(GEN_IL_INCLUDES) seinfo_tables.adb
-gnatU -gnatX

 ada/snames.h ada/snames.ads ada/snames.adb : ada/stamp-snames ; @true
 ada/stamp-snames : ada/snames.ads-tmpl ada/snames.adb-tmpl ada/snames.h-tmpl
ada/xsnamest.adb ada/xutil.ads ada/xutil.adb
        -$(MKDIR) ada/bldtools/snamest
        $(RM) $(addprefix ada/bldtools/snamest/,$(notdir $^))
        $(CP) $^ ada/bldtools/snamest
-       cd ada/bldtools/snamest; $(GNATMAKE) -q xsnamest ; ./xsnamest
+       cd ada/bldtools/snamest; $(GNATMAKE_FOR_BUILD) -q xsnamest ; ./xsnamest
        $(fsrcdir)/../move-if-change ada/bldtools/snamest/snames.ns
ada/snames.ads
        $(fsrcdir)/../move-if-change ada/bldtools/snamest/snames.nb
ada/snames.adb
        $(fsrcdir)/../move-if-change ada/bldtools/snamest/snames.nh
ada/snames.h
diff --git a/gcc/ada/gcc-interface/Make-lang.in
b/gcc/ada/gcc-interface/Make-lang.in
index 9507f2f0920..b1afdad5e4c 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -186,6 +186,9 @@ ada.serial = gnat1$(exeext)

 # There are too many Ada sources to check against here.  Let's
 # always force the recursive make.
+GNATMAKE_FOR_BUILD=gnatmake
+GNATBIND_FOR_BUILD=gnatbind
+GNATLINK_FOR_BUILD=gnatlink
 ifeq ($(build), $(host))
   ifeq ($(host), $(target))
     # This is a regular native. So use the compiler from our current build
@@ -197,7 +200,10 @@ ifeq ($(build), $(host))
         ADA_INCLUDES="-I- -I../generated -I../rts" \
         GNATMAKE="../../gnatmake" \
         GNATLINK="../../gnatlink" \
-        GNATBIND="../../gnatbind"
+        GNATBIND="../../gnatbind" \
+        GNATMAKE_FOR_BUILD=$(GNATMAKE_FOR_BUILD) \
+        GNATBIND_FOR_BUILD=$(GNATBIND_FOR_BUILD) \
+        GNATLINK_FOR_BUILD=$(GNATLINK_FOR_BUILD)
   else
     # This is a regular cross compiler. Use the native compiler to compile
     # the tools.
@@ -216,6 +222,9 @@ ifeq ($(build), $(host))
         GNATMAKE="gnatmake" \
         GNATBIND="gnatbind" \
         GNATLINK="gnatlink" \
+        GNATMAKE_FOR_BUILD=$(GNATMAKE_FOR_BUILD) \
+        GNATBIND_FOR_BUILD=$(GNATBIND_FOR_BUILD) \
+        GNATLINK_FOR_BUILD=$(GNATLINK_FOR_BUILD) \
         LIBGNAT=""
   endif
 else
@@ -227,6 +236,9 @@ else
   GNATBIND_FOR_HOST=$(host_noncanonical)-gnatbind
   GNATLINK_FOR_HOST=$(host_noncanonical)-gnatlink
   GNATLS_FOR_HOST=$(host_noncanonical)-gnatls
+  GNATMAKE_FOR_BUILD=gnatmake
+  GNATBIND_FOR_BUILD=gnatbind
+  GNATLINK_FOR_BUILD=gnatlink

   ifeq ($(host), $(target))
     # This is a cross native. All the sources are taken from the currently
@@ -239,6 +251,9 @@ else
         GNATMAKE="$(GNATMAKE_FOR_HOST)"      \
         GNATBIND="$(GNATBIND_FOR_HOST)"      \
         GNATLINK="$(GNATLINK_FOR_HOST)"      \
+        GNATMAKE_FOR_BUILD=$(GNATMAKE_FOR_BUILD) \
+        GNATBIND_FOR_BUILD=$(GNATBIND_FOR_BUILD) \
+        GNATLINK_FOR_BUILD=$(GNATLINK_FOR_BUILD) \
         LIBGNAT=""
   else
     # This is a canadian cross. We should use a toolchain running on the
@@ -254,6 +269,9 @@ else
         GNATMAKE="$(GNATMAKE_FOR_HOST)"      \
         GNATBIND="$(GNATBIND_FOR_HOST)"      \
         GNATLINK="$(GNATLINK_FOR_HOST)"      \
+        GNATMAKE_FOR_BUILD=$(GNATMAKE_FOR_BUILD) \
+        GNATBIND_FOR_BUILD=$(GNATBIND_FOR_BUILD) \
+        GNATLINK_FOR_BUILD=$(GNATLINK_FOR_BUILD) \
         LIBGNAT=""
   endif
 endif
diff --git a/gcc/ada/gcc-interface/Makefile.in
b/gcc/ada/gcc-interface/Makefile.in
index c8c38acf447..da6a56fcec8 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -616,7 +616,7 @@ OSCONS_EXTRACT=$(GCC_FOR_ADA_RTS) $(GNATLIBCFLAGS_FOR_C) -S
s-oscons-tmplt.i
        -$(MKDIR) ./bldtools/oscons
        $(RM) $(addprefix ./bldtools/oscons/,$(notdir $^))
        $(CP) $^ ./bldtools/oscons
-       (cd ./bldtools/oscons ; $(GNATMAKE) -q xoscons)
+       (cd ./bldtools/oscons ; gnatmake -q xoscons)

 $(RTSDIR)/s-oscons.ads: ../stamp-gnatlib1-$(RTSDIR) s-oscons-tmplt.c gsocket.h
./bldtools/oscons/xoscons
        $(RM) $(RTSDIR)/s-oscons-tmplt.i $(RTSDIR)/s-oscons-tmplt.s

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ada/108983] [13 Regression] Ada build is broken for Native (and Canadian) crosses after r13-6351-ge6d39f68d03c46
  2023-03-01  9:18 [Bug ada/108983] New: [13 Regression] Ada build is broken for Native (and Canadian) crosses after r13-6351-ge6d39f68d03c46 iains at gcc dot gnu.org
@ 2023-03-01  9:20 ` rguenth at gcc dot gnu.org
  2023-03-06 10:36 ` ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-03-01  9:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108983

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
   Target Milestone|---                         |13.0
           Keywords|                            |build

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
+1  GNATMAKE_FOR_BUILD sounds exactly correct

The other option is reverting the offending revision.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ada/108983] [13 Regression] Ada build is broken for Native (and Canadian) crosses after r13-6351-ge6d39f68d03c46
  2023-03-01  9:18 [Bug ada/108983] New: [13 Regression] Ada build is broken for Native (and Canadian) crosses after r13-6351-ge6d39f68d03c46 iains at gcc dot gnu.org
  2023-03-01  9:20 ` [Bug ada/108983] " rguenth at gcc dot gnu.org
@ 2023-03-06 10:36 ` ebotcazou at gcc dot gnu.org
  2023-03-06 10:40 ` cvs-commit at gcc dot gnu.org
  2023-03-06 10:40 ` ebotcazou at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-03-06 10:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108983

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-03-06
                 CC|                            |ebotcazou at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Let's revert indeed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ada/108983] [13 Regression] Ada build is broken for Native (and Canadian) crosses after r13-6351-ge6d39f68d03c46
  2023-03-01  9:18 [Bug ada/108983] New: [13 Regression] Ada build is broken for Native (and Canadian) crosses after r13-6351-ge6d39f68d03c46 iains at gcc dot gnu.org
  2023-03-01  9:20 ` [Bug ada/108983] " rguenth at gcc dot gnu.org
  2023-03-06 10:36 ` ebotcazou at gcc dot gnu.org
@ 2023-03-06 10:40 ` cvs-commit at gcc dot gnu.org
  2023-03-06 10:40 ` ebotcazou at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-06 10:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108983

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Eric Botcazou <ebotcazou@gcc.gnu.org>:

https://gcc.gnu.org/g:94a67e3044212592ce408952c526210a81e1bf49

commit r13-6504-g94a67e3044212592ce408952c526210a81e1bf49
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Mon Mar 6 11:36:19 2023 +0100

    Revert "Respect GNATMAKE Makefile variable" commit

    It breaks cross native builds.

    gcc/ada/
            PR ada/108909
            PR ada/108983
            * Make-generated.in: Do not use GNATMAKE.
            * gcc-interface/Makefile.in: Ditto.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ada/108983] [13 Regression] Ada build is broken for Native (and Canadian) crosses after r13-6351-ge6d39f68d03c46
  2023-03-01  9:18 [Bug ada/108983] New: [13 Regression] Ada build is broken for Native (and Canadian) crosses after r13-6351-ge6d39f68d03c46 iains at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-03-06 10:40 ` cvs-commit at gcc dot gnu.org
@ 2023-03-06 10:40 ` ebotcazou at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-03-06 10:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108983

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-06 10:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-01  9:18 [Bug ada/108983] New: [13 Regression] Ada build is broken for Native (and Canadian) crosses after r13-6351-ge6d39f68d03c46 iains at gcc dot gnu.org
2023-03-01  9:20 ` [Bug ada/108983] " rguenth at gcc dot gnu.org
2023-03-06 10:36 ` ebotcazou at gcc dot gnu.org
2023-03-06 10:40 ` cvs-commit at gcc dot gnu.org
2023-03-06 10:40 ` ebotcazou at gcc dot gnu.org

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).