]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix missing version_string in Ada
authorMartin Liska <mliska@suse.cz>
Mon, 10 May 2021 22:44:25 +0000 (00:44 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Mon, 10 May 2021 23:07:20 +0000 (01:07 +0200)
gcc/ada/
PR bootstrap/100506
* Make-generated.in: Replace version.c with ada/version.c.
* gcc-interface/Make-lang.in: Add version.o to GNAT1_C_OBJS.
Add version.o to GNAT_ADA_OBJS and GNATBIND_OBJS.
* gcc-interface/Makefile.in: Add version.o to TOOLS_LIBS.
* gnatvsn.adb: Start using a new C symbol gnat_version_string.
* version.c: New file.

gcc/ada/Make-generated.in
gcc/ada/gcc-interface/Make-lang.in
gcc/ada/gcc-interface/Makefile.in
gcc/ada/gnatvsn.adb
gcc/ada/version.c [new file with mode: 0644]

index 26832beb589a5f873abb7321079bef839f19b5d8..6fc23aebf1424a1f31dfc1ec068e967536cb0c01 100644 (file)
@@ -58,7 +58,7 @@ ada/stamp-snames : ada/snames.ads-tmpl ada/snames.adb-tmpl ada/snames.h-tmpl ada
        touch ada/stamp-snames
 
 ada/sdefault.adb: ada/stamp-sdefault ; @true
-ada/stamp-sdefault : $(srcdir)/version.c Makefile
+ada/stamp-sdefault : $(srcdir)/ada/version.c Makefile
        $(ECHO) "pragma Style_Checks (Off);" >tmp-sdefault.adb
        $(ECHO) "with Osint; use Osint;" >>tmp-sdefault.adb
        $(ECHO) "package body Sdefault is" >>tmp-sdefault.adb
index 969022e21a7457bf338c0a5f17ee9b54b49b1f22..c8c02d3f795f0a82b7887b08537bc4992e1fb7b7 100644 (file)
@@ -247,7 +247,8 @@ GNAT1_C_OBJS = ada/adadecode.o ada/adaint.o ada/argv.o ada/cio.o \
  ada/cstreams.o ada/env.o ada/init.o ada/initialize.o ada/raise.o \
  ada/raise-gcc.o \
  ada/seh_init.o ada/targext.o ada/cuintp.o ada/decl.o ada/rtfinal.o \
- ada/rtinit.o ada/misc.o ada/utils.o ada/utils2.o ada/trans.o ada/targtyps.o
+ ada/rtinit.o ada/misc.o ada/utils.o ada/utils2.o ada/trans.o ada/targtyps.o \
+ ada/version.o
 
 # Object files from Ada sources that are used by gnat1
 GNAT_ADA_OBJS =        \
@@ -648,6 +649,7 @@ GNATBIND_OBJS = \
  ada/uintp.o      \
  ada/uname.o      \
  ada/urealp.o     \
+ ada/version.o    \
  ada/widechar.o
 
 # Language-independent object files.
index 333e2035455d1d2e7b7a84aa7e068c181e43d99c..4ab71977e0b9800a33c5ad3d075aacb55b241a32 100644 (file)
@@ -250,9 +250,10 @@ LIBS = $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) $(LIBIBERTY) $(SYSLIBS)
 LIBDEPS = $(LIBINTL_DEP) $(LIBICONV_DEP) $(LIBBACKTRACE) $(LIBIBERTY)
 # Default is no TGT_LIB; one might be passed down or something
 TGT_LIB =
-TOOLS_LIBS = ../link.o ../targext.o ../../ggc-none.o ../../libcommon-target.a \
-  ../../libcommon.a ../../../libcpp/libcpp.a $(LIBGNAT) $(LIBINTL) $(LIBICONV) \
-  ../$(LIBBACKTRACE) ../$(LIBIBERTY) $(SYSLIBS) $(TGT_LIB)
+TOOLS_LIBS = ../version.o ../link.o ../targext.o ../../ggc-none.o \
+  ../../libcommon-target.a ../../libcommon.a ../../../libcpp/libcpp.a \
+  $(LIBGNAT) $(LIBINTL) $(LIBICONV) ../$(LIBBACKTRACE) ../$(LIBIBERTY) \
+  $(SYSLIBS) $(TGT_LIB)
 
 # Add -no-pie to TOOLS_LIBS since some of them are compiled with -fno-PIE.
 TOOLS_LIBS += @NO_PIE_FLAG@
@@ -302,7 +303,7 @@ ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
        $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
 
 # how to regenerate this file
-Makefile: ../config.status $(srcdir)/ada/gcc-interface/Makefile.in $(srcdir)/ada/Makefile.in $(srcdir)/version.c
+Makefile: ../config.status $(srcdir)/ada/gcc-interface/Makefile.in $(srcdir)/ada/Makefile.in $(srcdir)/ada/version.c
        cd ..; \
        LANGUAGES="$(CONFIG_LANGUAGES)" \
        CONFIG_HEADERS= \
index 578a1aa974373f5c6a7f704cade224c86b6603d5..d6d2a5a3ace34564db7a9153bbc127e729624b16 100644 (file)
@@ -53,7 +53,7 @@ package body Gnatvsn is
    --  version.c using the zero-based convention of the C language.
    --  The size is not the real one, which does not matter since we will
    --  check for the nul character in Gnat_Version_String.
-   pragma Import (C, Version_String, "version_string");
+   pragma Import (C, Version_String, "gnat_version_string");
 
    -------------------------
    -- Gnat_Version_String --
diff --git a/gcc/ada/version.c b/gcc/ada/version.c
new file mode 100644 (file)
index 0000000..e6cc612
--- /dev/null
@@ -0,0 +1,34 @@
+/****************************************************************************
+ *                                                                          *
+ *                         GNAT COMPILER COMPONENTS                         *
+ *                                                                          *
+ *                             V E R S I O N                               *
+ *                                                                          *
+ *                          C Implementation File                           *
+ *                                                                          *
+ *          Copyright (C) 2021, Free Software Foundation, Inc.         *
+ *                                                                          *
+ * GNAT is free software;  you can  redistribute it  and/or modify it under *
+ * terms of the  GNU General Public License as published  by the Free Soft- *
+ * ware  Foundation;  either version 3,  or (at your option) any later ver- *
+ * sion.  GNAT is distributed in the hope that it will be useful, but WITH- *
+ * OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY *
+ * or FITNESS FOR A PARTICULAR PURPOSE.                                     *
+ *                                                                          *
+ * As a special exception under Section 7 of GPL version 3, you are granted *
+ * additional permissions described in the GCC Runtime Library Exception,   *
+ * version 3.1, as published by the Free Software Foundation.               *
+ *                                                                          *
+ * You should have received a copy of the GNU General Public License and    *
+ * a copy of the GCC Runtime Library Exception along with this program;     *
+ * see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    *
+ * <http://www.gnu.org/licenses/>.                                          *
+ *                                                                          *
+ * GNAT was originally developed  by the GNAT team at  New York University. *
+ * Extensive contributions were provided by Ada Core Technologies Inc.      *
+ *                                                                          *
+ ****************************************************************************/
+
+#include "version.h"
+
+char gnat_version_string[] = version_string;