From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7B31C3858425; Wed, 1 Mar 2023 09:18:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7B31C3858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677662317; bh=J7N1EiGtHRFwV33hKbIYiZdGC2pWaFPHTq+92uDEhuI=; h=From:To:Subject:Date:From; b=N7tLkCl8lY4DldQxWZcPT3aLcCBuerGW7bDCJ38sWtasLboLcA2mbYyPck7gu49dl RG3+h4MnyVwWBqcTo3u30I0Wu/0258PsZZN6rhdklMPqXXUnesVge92XovtbVaC3Iu IFxJcw07VAAUkuAXjCy1tBWWCnSzPlyfFDdtgs8M= From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/108983] New: [13 Regression] Ada build is broken for Native (and Canadian) crosses after r13-6351-ge6d39f68d03c46 Date: Wed, 01 Mar 2023 09:18:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iains at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108983 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 gnatxx= xxx 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 !=3D $host= =3D=3D $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 =3D -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-m= ain # Ignore errors to work around finalization issues in older compile= rs - 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 -g= natX + 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-tm= pl 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 ; ./xsna= mest $(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 =3D gnat1$(exeext) # There are too many Ada sources to check against here. Let's # always force the recursive make. +GNATMAKE_FOR_BUILD=3Dgnatmake +GNATBIND_FOR_BUILD=3Dgnatbind +GNATLINK_FOR_BUILD=3Dgnatlink 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=3D"-I- -I../generated -I../rts" \ GNATMAKE=3D"../../gnatmake" \ GNATLINK=3D"../../gnatlink" \ - GNATBIND=3D"../../gnatbind" + GNATBIND=3D"../../gnatbind" \ + GNATMAKE_FOR_BUILD=3D$(GNATMAKE_FOR_BUILD) \ + GNATBIND_FOR_BUILD=3D$(GNATBIND_FOR_BUILD) \ + GNATLINK_FOR_BUILD=3D$(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=3D"gnatmake" \ GNATBIND=3D"gnatbind" \ GNATLINK=3D"gnatlink" \ + GNATMAKE_FOR_BUILD=3D$(GNATMAKE_FOR_BUILD) \ + GNATBIND_FOR_BUILD=3D$(GNATBIND_FOR_BUILD) \ + GNATLINK_FOR_BUILD=3D$(GNATLINK_FOR_BUILD) \ LIBGNAT=3D"" endif else @@ -227,6 +236,9 @@ else GNATBIND_FOR_HOST=3D$(host_noncanonical)-gnatbind GNATLINK_FOR_HOST=3D$(host_noncanonical)-gnatlink GNATLS_FOR_HOST=3D$(host_noncanonical)-gnatls + GNATMAKE_FOR_BUILD=3Dgnatmake + GNATBIND_FOR_BUILD=3Dgnatbind + GNATLINK_FOR_BUILD=3Dgnatlink ifeq ($(host), $(target)) # This is a cross native. All the sources are taken from the currently @@ -239,6 +251,9 @@ else GNATMAKE=3D"$(GNATMAKE_FOR_HOST)" \ GNATBIND=3D"$(GNATBIND_FOR_HOST)" \ GNATLINK=3D"$(GNATLINK_FOR_HOST)" \ + GNATMAKE_FOR_BUILD=3D$(GNATMAKE_FOR_BUILD) \ + GNATBIND_FOR_BUILD=3D$(GNATBIND_FOR_BUILD) \ + GNATLINK_FOR_BUILD=3D$(GNATLINK_FOR_BUILD) \ LIBGNAT=3D"" else # This is a canadian cross. We should use a toolchain running on the @@ -254,6 +269,9 @@ else GNATMAKE=3D"$(GNATMAKE_FOR_HOST)" \ GNATBIND=3D"$(GNATBIND_FOR_HOST)" \ GNATLINK=3D"$(GNATLINK_FOR_HOST)" \ + GNATMAKE_FOR_BUILD=3D$(GNATMAKE_FOR_BUILD) \ + GNATBIND_FOR_BUILD=3D$(GNATBIND_FOR_BUILD) \ + GNATLINK_FOR_BUILD=3D$(GNATLINK_FOR_BUILD) \ LIBGNAT=3D"" 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=3D$(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 gsock= et.h ./bldtools/oscons/xoscons $(RM) $(RTSDIR)/s-oscons-tmplt.i $(RTSDIR)/s-oscons-tmplt.s=