]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Ada: Fix warnings during bootstrap
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 30 Dec 2025 19:13:51 +0000 (20:13 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 30 Dec 2025 19:15:56 +0000 (20:15 +0100)
The warnings are:

warning: "g-htable.adb" should be recompiled
warning: ("/usr/lib64/gcc/x86_64-suse-linux/7/adalib/g-htable.ali" is
  obsolete and read-only)
warning: "g-byorma.adb" should be recompiled
warning: ("/usr/lib64/gcc/x86_64-suse-linux/7/adalib/g-byorma.ali" is
  obsolete and read-only)
warning: "g-speche.adb" should be recompiled
warning: ("/usr/lib64/gcc/x86_64-suse-linux/7/adalib/g-speche.ali" is
  obsolete and read-only)
warning: "g-spchge.adb" should be recompiled
warning: ("/usr/lib64/gcc/x86_64-suse-linux/7/adalib/g-spchge.ali" is
  obsolete and read-only)
warning: "g-u3spch.adb" should be recompiled
warning: ("/usr/lib64/gcc/x86_64-suse-linux/7/adalib/g-u3spch.ali" is
  obsolete and read-only)

but would be hard errors if a kluge was not used (passing -t to gnatbind).

This fixes the warnings, as well as tentatively removes the kludge.

gcc/ada/
* gcc-interface/Make-lang.in (GNATBIND_FLAGS): Delete.
(GNAT_ADA_OBJS): Move g-byorma.o, g-htable.o, g-spchge.o,
g-speche.o and g-u3spch.o to STAGE1 list.
(GNATBIND_OBJS): Move g-byorma.o, g-hesora.o and g-htable.o
to STAGE1 list.
(ada/b_gnat1.adb): Do not pass GNATBIND_FLAGS to gnatbind.
(ada/b_gnatb.adb): Likewise.
(ADA_GENERATED_FILES): Add g-byorma.ad[sb], g-hesora.ad[sb],
g-htable.ad[sb], g-spchge.ad[sb], g-speche.ad[sb], g-u3spch.ad[sb]
and alphabetize.
* libgnat/g-byorma.ads: Add note to head comment.
* libgnat/g-hesora.ads: Likewise.
* libgnat/g-htable.ads: Likewise.
* libgnat/g-spchge.ads: Likewise.
* libgnat/g-speche.ads: Likewise.
* libgnat/g-u3spch.ads: Likewise.

gcc/ada/gcc-interface/Make-lang.in
gcc/ada/libgnat/g-byorma.ads
gcc/ada/libgnat/g-hesora.ads
gcc/ada/libgnat/g-htable.ads
gcc/ada/libgnat/g-spchge.ads
gcc/ada/libgnat/g-speche.ads
gcc/ada/libgnat/g-u3spch.ads

index e768ef60ddf7930a79b1615a6afccf7b89f6683d..b1628bfb97bfb0f162989c14944c3ba3c2aab2d6 100644 (file)
@@ -57,7 +57,6 @@ WARN_ADAFLAGS= -W -Wall
 # checks fully active.
 
 STAGE1=False
-GNATBIND_FLAGS=
 GNATLIB=
 
 ifeq ($(CROSS),)
@@ -65,7 +64,6 @@ ifeq ($(CROSS),)
 
   ifeq ($(if $(wildcard ../stage_current),$(shell cat ../stage_current),stage1),stage1)
     STAGE1=True
-    GNATBIND_FLAGS=-t
   endif
 else
   ADAFLAGS=$(COMMON_ADAFLAGS)
@@ -478,10 +476,15 @@ GNAT_ADA_OBJS =   \
  ada/warnsw.o  \
  ada/widechar.o \
  ada/gnat.o    \
+ ada/g-byorma.o \
  ada/g-dynhta.o        \
  ada/g-graphs.o        \
+ ada/g-htable.o \
  ada/g-lists.o \
  ada/g-sets.o  \
+ ada/g-spchge.o \
+ ada/g-speche.o \
+ ada/g-u3spch.o \
  ada/s-pehage.o        \
  ada/s-utf_32.o
 
@@ -514,14 +517,9 @@ GNAT_ADA_OBJS+= \
  ada/libgnat/a-nubinu.o        \
  ada/libgnat/a-numeri.o        \
  ada/libgnat/ada.o     \
- ada/libgnat/g-byorma.o        \
  ada/libgnat/g-cstyin.o        \
  ada/libgnat/g-heasor.o        \
- ada/libgnat/g-htable.o        \
- ada/libgnat/g-spchge.o        \
- ada/libgnat/g-speche.o        \
  ada/libgnat/g-table.o \
- ada/libgnat/g-u3spch.o        \
  ada/libgnat/i-c.o     \
  ada/libgnat/i-cstrin.o        \
  ada/libgnat/interfac.o        \
@@ -659,15 +657,18 @@ GNATBIND_OBJS = \
  ada/uintp.o      \
  ada/uname.o      \
  ada/urealp.o     \
+ ada/version.o    \
  ada/warnsw.o     \
  ada/widechar.o   \
  ada/gnat.o       \
+ ada/g-byorma.o   \
  ada/g-dynhta.o   \
- ada/g-lists.o    \
  ada/g-graphs.o   \
+ ada/g-hesora.o   \
+ ada/g-htable.o   \
+ ada/g-lists.o    \
  ada/g-sets.o     \
  ada/s-resfil.o   \
- ada/version.o    \
  ada/s-utf_32.o
 
 ifeq ($(STAGE1),False)
@@ -686,10 +687,7 @@ GNATBIND_OBJS +=  \
  ada/libgnat/a-nubinu.o   \
  ada/libgnat/a-numeri.o   \
  ada/libgnat/ada.o        \
- ada/libgnat/g-byorma.o   \
  ada/libgnat/g-cstyin.o   \
- ada/libgnat/g-hesora.o   \
- ada/libgnat/g-htable.o   \
  ada/libgnat/i-c.o        \
  ada/libgnat/i-cstrin.o   \
  ada/libgnat/interfac.o   \
@@ -1167,7 +1165,7 @@ $(check_acats_targets): check-acats%:
 
 ada/b_gnat1.adb : $(GNAT1_ADA_OBJS)
         # Old gnatbind do not allow a path for -o.
-       $(GNATBIND) $(GNATBIND_FLAGS) $(ADA_INCLUDES) -o b_gnat1.adb -n ada/gnat1drv.ali
+       $(GNATBIND) $(ADA_INCLUDES) -o b_gnat1.adb -n ada/gnat1drv.ali
        $(MV) b_gnat1.adb b_gnat1.ads ada/
 
 ada/b_gnat1.o : ada/b_gnat1.adb
@@ -1178,7 +1176,7 @@ ada/b_gnat1.o : ada/b_gnat1.adb
 
 ada/b_gnatb.adb : $(GNATBIND_OBJS) ada/gnatbind.o
         # Old gnatbind do not allow a path for -o.
-       $(GNATBIND) $(GNATBIND_FLAGS) $(ADA_INCLUDES) -o b_gnatb.adb ada/gnatbind.ali
+       $(GNATBIND) $(ADA_INCLUDES) -o b_gnatb.adb ada/gnatbind.ali
        $(MV) b_gnatb.adb b_gnatb.ads ada/
 
 ada/b_gnatb.o : ada/b_gnatb.adb
@@ -1249,11 +1247,22 @@ ADA_GENERATED_FILES = \
   ada/seinfo.ads ada/seinfo_tables.ads ada/seinfo_tables.adb \
   ada/sinfo-nodes.ads ada/sinfo-nodes.adb \
   ada/einfo-entities.ads ada/einfo-entities.adb \
-  ada/gnat.ads ada/g-dynhta.ads ada/g-dynhta.adb \
-  ada/g-dyntab.ads ada/g-dyntab.adb ada/g-graphs.ads ada/g-graphs.adb \
-  ada/g-lists.ads ada/g-lists.adb ada/g-sets.ads ada/g-sets.adb \
-  ada/s-rident.ads ada/s-pehage.ads ada/s-pehage.adb \
-  ada/s-resfil.ads ada/s-resfil.adb ada/s-utf_32.ads ada/s-utf_32.adb
+  ada/gnat.ads \
+  ada/g-byorma.ads ada/g-byorma.adb \
+  ada/g-dynhta.ads ada/g-dynhta.adb \
+  ada/g-dyntab.ads ada/g-dyntab.adb \
+  ada/g-graphs.ads ada/g-graphs.adb \
+  ada/g-hesora.ads ada/g-hesora.adb \
+  ada/g-htable.ads ada/g-htable.adb \
+  ada/g-lists.ads ada/g-lists.adb \
+  ada/g-sets.ads ada/g-sets.adb \
+  ada/g-spchge.ads ada/g-spchge.adb \
+  ada/g-speche.ads ada/g-speche.adb \
+  ada/g-u3spch.ads ada/g-u3spch.adb \
+  ada/s-pehage.ads ada/s-pehage.adb \
+  ada/s-resfil.ads ada/s-resfil.adb \
+  ada/s-rident.ads \
+  ada/s-utf_32.ads ada/s-utf_32.adb
 
 # Only used to manually trigger the creation of the generated files.
 .PHONY:
index fa9e40b9dcca0837c4f16f42f68d0f9853014ff2..400faa515403b571bfec6aee3a032a98b77af100 100644 (file)
@@ -61,6 +61,9 @@
 --     cases depend on the first character of the XML file being < so that the
 --     encoding of this character can be recognized.
 
+--  Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in
+--  gcc-interface/Make-lang.in for details on the constraints.
+
 package GNAT.Byte_Order_Mark is
 
    type BOM_Kind is
index 73b943435630835d6e27512c2df95bd578f2b5db..036353486b04b40df1ec7d2819bca4c4c7f2fb0d 100644 (file)
@@ -40,6 +40,9 @@
 --  worst case and is in place with no additional storage required. See
 --  the body for exact details of the algorithm used.
 
+--  Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in
+--  gcc-interface/Make-lang.in for details on the constraints.
+
 package GNAT.Heap_Sort_A is
    pragma Preelaborate;
 
index 22e236c0bb78077a4657cfb8ec27a5d9f7cd8c3e..aaa35f0558a45fe806adb78201722c351f3d7c9d 100644 (file)
@@ -39,6 +39,9 @@
 
 --  See file s-htable.ads for full documentation of the interface
 
+--  Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in
+--  gcc-interface/Make-lang.in for details on the constraints.
+
 with System.HTable;
 
 package GNAT.HTable is
index 7c8ec7db54dac9fa3f0ffa64892a6b0d52b983a2..d139c95893d77d881b84e8f6575c0fd4b7ee4e31 100644 (file)
@@ -37,6 +37,9 @@
 --  codes for ASCII characters in the range 16#20#..16#7F# have their normal
 --  expected encoding values (e.g. the Pos value 16#31# must be digit 1).
 
+--  Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in
+--  gcc-interface/Make-lang.in for details on the constraints.
+
 package GNAT.Spelling_Checker_Generic is
    pragma Pure;
 
index 493ae5febc9ce2bfecd88b38dd60b2fc824cffa4..90a40b6383369577825a052d297f4ab48c219032 100644 (file)
@@ -34,6 +34,9 @@
 --  This package provides a utility routine for checking for bad spellings
 --  for the case of String arguments.
 
+--  Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in
+--  gcc-interface/Make-lang.in for details on the constraints.
+
 package GNAT.Spelling_Checker is
    pragma Pure;
 
index df0af938dcf9958c60c00fbf1804678dc701722e..2108fe00f6a70239db24b2b2d177be6fccbd031a 100644 (file)
@@ -34,6 +34,9 @@
 --  This package provides a utility routine for checking for bad spellings
 --  for the case of System.WCh_Cnv.UTF_32_String arguments.
 
+--  Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in
+--  gcc-interface/Make-lang.in for details on the constraints.
+
 with System.WCh_Cnv;
 
 package GNAT.UTF_32_Spelling_Checker is