diff options
author | Martin Liska <mliska@suse.cz> | 2021-05-11 00:44:25 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2021-05-11 01:07:20 +0200 |
commit | 0c54d25a7686406a11f44f58261a9e63821022b7 (patch) | |
tree | 3352df6c3d67780f0023aeb17980b35ac034a05f | |
parent | 77804c9a62fa40d132b7b3a22320a75b06a63ca5 (diff) | |
download | gcc-0c54d25a7686406a11f44f58261a9e63821022b7.zip gcc-0c54d25a7686406a11f44f58261a9e63821022b7.tar.gz gcc-0c54d25a7686406a11f44f58261a9e63821022b7.tar.bz2 |
Fix missing version_string in Ada
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.
-rw-r--r-- | gcc/ada/Make-generated.in | 2 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/Make-lang.in | 4 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/Makefile.in | 9 | ||||
-rw-r--r-- | gcc/ada/gnatvsn.adb | 2 | ||||
-rw-r--r-- | gcc/ada/version.c | 34 |
5 files changed, 44 insertions, 7 deletions
diff --git a/gcc/ada/Make-generated.in b/gcc/ada/Make-generated.in index 26832be..6fc23ae 100644 --- a/gcc/ada/Make-generated.in +++ b/gcc/ada/Make-generated.in @@ -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 diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in index 969022e..c8c02d3 100644 --- a/gcc/ada/gcc-interface/Make-lang.in +++ b/gcc/ada/gcc-interface/Make-lang.in @@ -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. diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index 333e203..4ab71977 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -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= \ diff --git a/gcc/ada/gnatvsn.adb b/gcc/ada/gnatvsn.adb index 578a1aa..d6d2a5a3 100644 --- a/gcc/ada/gnatvsn.adb +++ b/gcc/ada/gnatvsn.adb @@ -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 index 0000000..e6cc612 --- /dev/null +++ b/gcc/ada/version.c @@ -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; |