landgraf pushed to gprbuild (f22). "Ship gcc/ada sources to sync with gcc-5"
notifications at fedoraproject.org
notifications at fedoraproject.org
Mon Jun 1 14:31:48 UTC 2015
From 82a6fa2a13542d9489fb15a3577d38d425095c74 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov at redhat.com>
Date: Mon, 25 May 2015 08:04:56 +0200
Subject: Ship gcc/ada sources to sync with gcc-5
diff --git a/.gitignore b/.gitignore
index 2a276f5..22470dc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
/gprbuild-gpl-2012-src.tgz
/gprbuild-gpl-2013-src.tgz
/gprbuild-gpl-2014-src.tar.gz
+/gpprbuild-gcc_ada.tgz
diff --git a/gprbuild-2014-gcc5_sources.patch b/gprbuild-2014-gcc5_sources.patch
new file mode 100644
index 0000000..29d57be
--- /dev/null
+++ b/gprbuild-2014-gcc5_sources.patch
@@ -0,0 +1,383 @@
+diff --git a/src/gprconfig-main.adb b/src/gprconfig-main.adb
+index 476690a..70e3e80 100644
+--- a/src/gprconfig-main.adb
++++ b/src/gprconfig-main.adb
+@@ -476,7 +476,7 @@ begin
+ Get_Targets_Set
+ (Base, To_String (Selected_Target), Selected_Targets_Set);
+
+- if Batch or Hostparm.OpenVMS then
++ if Batch then
+ Complete_Command_Line_Compilers
+ (Base,
+ Selected_Targets_Set,
+diff --git a/src/gpr_version.adb b/src/gpr_version.adb
+index 4ec66a8..64c82cc 100644
+--- a/src/gpr_version.adb
++++ b/src/gpr_version.adb
+@@ -66,8 +66,6 @@ package body GPR_Version is
+ end loop Last_Loop;
+
+ case Build_Type is
+- when Gnatpro =>
+- return "Pro " & Gpr_Version & " " & Date & Host;
+ when GPL =>
+ return "GPL " & Gpr_Version & " " & Date & Host;
+ when FSF =>
+diff --git a/gnat_src/gnatvsn.adb b/gnat_src/gnatvsn.adb
+index 6d76f7e..4227baf 100644
+--- a/gnat_src/gnatvsn.adb
++++ b/gnat_src/gnatvsn.adb
+@@ -53,32 +53,21 @@ package body Gnatvsn is
+ " FOR A PARTICULAR PURPOSE.";
+ end Gnat_Free_Software;
+
+- type char_array is array (Natural range <>) of aliased Character;
+- Version_String : char_array (0 .. Ver_Len_Max - 1);
+- -- Import the C string defined in the (language-independent) source file
+- -- 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");
+-
+ -------------------------
+ -- Gnat_Version_String --
+ -------------------------
+
+ function Gnat_Version_String return String is
+- S : String (1 .. Ver_Len_Max);
+- Pos : Natural := 0;
++ Gnat_Static_Version_String : constant String := "2014 (2014)";
+ begin
+- loop
+- exit when Version_String (Pos) = ASCII.NUL;
+-
+- S (Pos + 1) := Version_String (Pos);
+- Pos := Pos + 1;
+-
+- exit when Pos = Ver_Len_Max;
+- end loop;
+-
+- return S (1 .. Pos);
++ case Build_Type is
++ when GPL =>
++ return "GPL " & Gnat_Static_Version_String;
++ -- when GnatPro =>
++ -- return "XX";
++ when FSF =>
++ return Gnat_Static_Version_String;
++ end case;
+ end Gnat_Version_String;
+
+ end Gnatvsn;
+diff --git a/src/gprbuild-main.adb b/src/gprbuild-main.adb
+index 860ae23..fb86a50 100644
+--- a/src/gprbuild-main.adb
++++ b/src/gprbuild-main.adb
+@@ -682,22 +682,12 @@ procedure Gprbuild.Main is
+ end if;
+
+ elsif Arg = "--db-" then
+- if Hostparm.OpenVMS then
+- Fail_Program
+- (Project_Tree,
+- "--db- cannot be used on VMS");
+- end if;
+
+ Forbidden_In_Package_Builder;
+
+ Load_Standard_Base := False;
+
+ elsif Arg = "--db" then
+- if Hostparm.OpenVMS then
+- Fail_Program
+- (Project_Tree,
+- "--db cannot be used on VMS");
+- end if;
+
+ Forbidden_In_Package_Builder;
+
+@@ -747,11 +737,6 @@ procedure Gprbuild.Main is
+ Arg (1 .. Autoconf_Project_Option'Length) =
+ Autoconf_Project_Option
+ then
+- if Hostparm.OpenVMS then
+- Fail_Program
+- (Project_Tree,
+- Autoconf_Project_Option & " cannot be used on VMS");
+- end if;
+
+ Forbidden_In_Package_Builder;
+
+@@ -776,11 +761,6 @@ procedure Gprbuild.Main is
+ and then
+ Arg (1 .. Target_Project_Option'Length) = Target_Project_Option
+ then
+- if Hostparm.OpenVMS then
+- Fail_Program
+- (Project_Tree,
+- Target_Project_Option & " cannot be used on VMS");
+- end if;
+
+ Forbidden_In_Package_Builder;
+
+@@ -1633,41 +1613,33 @@ procedure Gprbuild.Main is
+
+ -- Line for Autoconf_Project_Option
+
+- if not Hostparm.OpenVMS then
+- Write_Str (" ");
+- Write_Str (Autoconf_Project_Option);
+- Write_Str ("file.cgpr");
+- Write_Eol;
+- Write_Str
+- (" Specify/create the main config project file name");
+- Write_Eol;
+- end if;
++ Write_Str (" ");
++ Write_Str (Autoconf_Project_Option);
++ Write_Str ("file.cgpr");
++ Write_Eol;
++ Write_Str
++ (" Specify/create the main config project file name");
++ Write_Eol;
+
+ -- Line for Target_Project_Option
+
+- if not Hostparm.OpenVMS then
+- Write_Str (" ");
+- Write_Str (Target_Project_Option);
+- Write_Str ("targetname");
+- Write_Eol;
+- Write_Str
+- (" Specify a target for cross platforms");
+- Write_Eol;
+- end if;
++ Write_Str (" ");
++ Write_Str (Target_Project_Option);
++ Write_Str ("targetname");
++ Write_Eol;
++ Write_Str
++ (" Specify a target for cross platforms");
++ Write_Eol;
+
+ -- Line for --db
+
+- if not Hostparm.OpenVMS then
+- Write_Str (" --db dir Parse dir as an additional knowledge base");
+- Write_Eol;
+- end if;
++ Write_Str (" --db dir Parse dir as an additional knowledge base");
++ Write_Eol;
+
+ -- Line for --db-
+
+- if not Hostparm.OpenVMS then
+- Write_Str (" --db- Do not load the standard knowledge base");
+- Write_Eol;
+- end if;
++ Write_Str (" --db- Do not load the standard knowledge base");
++ Write_Eol;
+
+ -- Line for --subdirs=
+
+diff --git a/src/gprbuild-main.adb b/src/gprbuild-main.adb
+index fb86a50..84024c5 100644
+--- a/src/gprbuild-main.adb
++++ b/src/gprbuild-main.adb
+@@ -185,6 +185,7 @@ procedure Gprbuild.Main is
+ Queue.Insert
+ (Source => (Format => Format_Gprbuild,
+ Tree => Main_Id.Tree,
++ Closure => False,
+ Id => Main_Id.Source),
+ With_Roots => Builder_Data (Main_Id.Tree).Closure_Needed);
+
+diff --git a/src/gprbuild-post_compile.adb b/src/gprbuild-post_compile.adb
+index 2755482..579f479 100644
+--- a/src/gprbuild-post_compile.adb
++++ b/src/gprbuild-post_compile.adb
+@@ -2559,6 +2559,7 @@ package body Gprbuild.Post_Compile is
+ Queue.Insert
+ (Source => (Format => Format_Gprbuild,
+ Tree => Main_File.Tree,
++ Closure => False,
+ Id => Main_File.Source));
+ end if;
+
+@@ -2568,6 +2569,7 @@ package body Gprbuild.Post_Compile is
+ Queue.Insert
+ (Source => (Format => Format_Gprbuild,
+ Tree => Main_File.Tree,
++ Closure => False,
+ Id => Roots.Root));
+ Roots := Roots.Next;
+ end loop;
+@@ -2628,6 +2630,7 @@ package body Gprbuild.Post_Compile is
+ Queue.Insert
+ (Source => (Format => Format_Gprbuild,
+ Tree => Main_File.Tree,
++ Closure => False,
+ Id => Source));
+ end if;
+
+diff --git a/src/gprbind.adb b/src/gprbind.adb
+index 7bfefd2..bbff093 100644
+--- a/src/gprbind.adb
++++ b/src/gprbind.adb
+@@ -248,12 +248,6 @@ begin
+
+ Namet.Initialize;
+
+- -- Copy_Attributes always fails on VMS
+-
+- if Hostparm.OpenVMS then
+- Preserve := None;
+- end if;
+-
+ Exchange_File_Name := new String'(Argument (1));
+
+ -- DEBUG: save a copy of the exchange file
+diff --git a/src/gprlib.adb b/src/gprlib.adb
+index d288e9d..242831b 100644
+--- a/src/gprlib.adb
++++ b/src/gprlib.adb
+@@ -869,10 +869,6 @@ begin
+
+ -- Copy_Attributes always fails on VMS
+
+- if Hostparm.OpenVMS then
+- Preserve := None;
+- Shared_Libgnat_Separator := '_';
+- end if;
+
+ if Argument_Count /= 1 then
+ Put_Line ("usage: gprlib <input file>");
+@@ -1193,13 +1189,6 @@ begin
+ -- On VMS, replace all '.' with '_', to avoid names with
+ -- several dots.
+
+- if Hostparm.OpenVMS then
+- for J in 6 .. Last loop
+- if Line (J) = '.' then
+- Line (J) := '_';
+- end if;
+- end loop;
+- end if;
+
+ Libgnat :=
+ new String'
+diff --git a/src/gprclean-main.adb b/src/gprclean-main.adb
+index 8cac791..4a6d983 100644
+--- a/src/gprclean-main.adb
++++ b/src/gprclean-main.adb
+@@ -168,10 +168,10 @@ procedure Gprclean.Main is
+
+ case Arg (2) is
+ when '-' =>
+- if not Hostparm.OpenVMS and then Arg = "--db-" then
++ if Arg = "--db-" then
+ Load_Standard_Base := False;
+
+- elsif not Hostparm.OpenVMS and then Arg = "--db" then
++ elsif Arg = "--db" then
+ Db_Directory_Expected := True;
+
+ elsif Arg'Length > Config_Project_Option'Length
+@@ -222,9 +222,7 @@ procedure Gprclean.Main is
+ (Slave_Env_Option'Length + 2 .. Arg'Last));
+ end if;
+
+- elsif not Hostparm.OpenVMS
+- and then
+- Arg'Length > Autoconf_Project_Option'Length
++ elsif Arg'Length > Autoconf_Project_Option'Length
+ and then
+ Arg (1 .. Autoconf_Project_Option'Length) =
+ Autoconf_Project_Option
+@@ -250,8 +248,7 @@ procedure Gprclean.Main is
+ Autoconf_Specified := True;
+ end if;
+
+- elsif not Hostparm.OpenVMS
+- and then
++ elsif
+ Arg'Length > Target_Project_Option'Length
+ and then
+ Arg (1 .. Target_Project_Option'Length) =
+@@ -554,27 +551,19 @@ procedure Gprclean.Main is
+ Put_Line (" --slave-env[=name]");
+ Put_Line (" Use a specific slave's environment");
+
+- Put_Line (" --config=file.cgpr");
+- Put_Line (" Specify the configuration project file name");
++ Put_Line (" --config=file.cgpr");
++ Put_Line (" Specify the configuration project file name");
+
+- if not Hostparm.OpenVMS then
+- Put_Line (" --autoconf=file.cgpr");
+- Put_Line
+- (" Specify/create the main config project file name");
+- end if;
++ Put_Line (" --autoconf=file.cgpr");
++ Put_Line
++ (" Specify/create the main config project file name");
+
+- if not Hostparm.OpenVMS then
+- Put_Line (" --target=targetname");
+- Put_Line (" Specify a target for cross platforms");
+- end if;
++ Put_Line (" --target=targetname");
++ Put_Line (" Specify a target for cross platforms");
+
+- if not Hostparm.OpenVMS then
+- Put_Line (" --db dir Parse dir as an additional knowledge base");
+- end if;
++ Put_Line (" --db dir Parse dir as an additional knowledge base");
+
+- if not Hostparm.OpenVMS then
+- Put_Line (" --db- Do not load the standard knowledge base");
+- end if;
++ Put_Line (" --db- Do not load the standard knowledge base");
+
+ Put_Line (" --RTS=<runtime>");
+ Put_Line (" Use runtime <runtime> for language Ada");
+diff --git a/src/gprinstall-main.adb b/src/gprinstall-main.adb
+index f736eb6..76f01d3 100644
+--- a/src/gprinstall-main.adb
++++ b/src/gprinstall-main.adb
+@@ -224,11 +224,6 @@ procedure Gprinstall.Main is
+ end if;
+
+ elsif Has_Prefix (Autoconf_Project_Option) then
+- if Hostparm.OpenVMS then
+- Fail_Program
+- (Project_Tree,
+- Autoconf_Project_Option & " cannot be used on VMS");
+- end if;
+
+ if Config_Project_File_Name /= null
+ and then (not Autoconf_Specified
+@@ -601,15 +596,13 @@ procedure Gprinstall.Main is
+
+ -- Line for Autoconf_Project_Option
+
+- if not Hostparm.OpenVMS then
+- Write_Str (" ");
+- Write_Str (Autoconf_Project_Option);
+- Write_Str ("file.cgpr");
+- Write_Eol;
+- Write_Str
+- (" Specify/create the main config project file name");
+- Write_Eol;
+- end if;
++ Write_Str (" ");
++ Write_Str (Autoconf_Project_Option);
++ Write_Str ("file.cgpr");
++ Write_Eol;
++ Write_Str
++ (" Specify/create the main config project file name");
++ Write_Eol;
+
+ -- Line for --prefix
+
diff --git a/gprbuild.spec b/gprbuild.spec
index 4be6863..dbd3e44 100644
--- a/gprbuild.spec
+++ b/gprbuild.spec
@@ -2,7 +2,7 @@
Name: gprbuild
Version: 2014
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Ada project builder
Group: Development/Languages
License: GPLv2+
@@ -10,6 +10,8 @@ URL: http://libre.adacore.com
## Auth required
## Direct download is not available
Source0: %{name}-gpl-%{version}-src.tar.gz
+## Sources of gcc 5.1/gcc/ada directory
+Source1: gpprbuild-gcc_ada.tgz
Patch0: %{name}-%{version}-noopenvms.patch
Patch1: %{name}-%{version}-iterator_variable.patch
Patch2: %{name}-%{version}-destdir.patch
@@ -18,9 +20,12 @@ Patch3: %{name}-%{version}-usrmove.patch
Patch4: %{name}-%{version}-gcc5.patch
# Fix a bug that throws away GCC options that begin with "-m":
Patch5: %{name}-2014-m_options.patch
+## Removing of OpenVMS references (not in gcc anymore)
+## Replace version_string implementation with one from gnat 4.9
+Patch6: %{name}-%{version}-gcc5_sources.patch
BuildRequires: xmlada-devel
-BuildRequires: gcc-gnat > 5.0
+BuildRequires: gcc-gnat > 5.1
BuildRequires: libgnat-static libgnat-devel
BuildRequires: fedora-gnat-project-common >= 2
Requires: fedora-gnat-project-common >= 2
@@ -41,18 +46,21 @@ and libraries and is particularly well-suited for compiled languages.
%prep
%setup -q -n gprbuild-gpl-%{version}-src
+mkdir gnat_src && tar -xf %{SOURCE1} -C gnat_src
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5
+%patch6 -p1
# Update the various config.guess to upstream release for new arch support
cp /usr/lib/rpm/config.* .
%build
%configure --disable-rpath --datadir="%{buildroot}/%{_datadir}" --libdir="%{buildroot}/%{_libdir}" --bindir="%{buildroot}/%{_bindir}" --libexecdir="%{buildroot}/%{_libexecdir}"
+make copy_gnat_src
make %{?_smp_mflags} LIBRARY_TYPE="relocatable" GNATOPTFLAGS="%{Gnatmake_optflags}" ADA_PROJECT_PATH=%_GNAT_project_dir
%install
@@ -76,6 +84,9 @@ rm -rf %{buildroot}/%{_datadir}/doc/%{name}
%_GNAT_project_dir/*
%changelog
+* Sun May 24 2015 Pavel Zhukov <landgraf at fedoraproject.org> - 2014-7
+- Ship gnat 5.1 headers
+
* Mon May 4 2015 Peter Robinson <pbrobinson at fedoraproject.org> 2014-6
- Don't build ADA hardened
diff --git a/sources b/sources
index b664feb..8c26f36 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
+5770c988ffb54e186a5498033a90c6e5 gpprbuild-gcc_ada.tgz
0625ae36f588f36b3e481d1722b09dd6 gprbuild-gpl-2014-src.tar.gz
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/gprbuild.git/commit/?h=f22&id=82a6fa2a13542d9489fb15a3577d38d425095c74
More information about the scm-commits
mailing list