e960f79073
Adacore provides annual releases for its major GPL-licensed products. GPRBuild is an important tool, but it's source is only exposed once per year, in May. The 2014 release of GPRBuild relies on features in Adacore's commercial product, GNAT Pro, that has not yet been migrated to FSF GNAT. I had to patch 2014 to get it to build with FSF GNAT 4.9, losing minor new functionality in the process. My first decision was to simply skip GPRBuild 2014 stay on the 2013 version, but it turns out packages are already using the new features in gprinstall, one of the tools in the GPRBuild package. Tests on adabooch, aws, asis and opentoken indicate they build fine with GPRBuild 2014.
40 lines
1.5 KiB
Ada
40 lines
1.5 KiB
Ada
The brain-dead handling of Rpath continues in GPRBuild 2014
|
|
Bring in the GPRBuild 2012/2013 fix again
|
|
|
|
--- src/gprlib.adb.orig 2014-04-17 09:50:17.000000000 +0000
|
|
+++ src/gprlib.adb
|
|
@@ -408,6 +408,11 @@ procedure Gprlib is
|
|
|
|
Separate_Run_Path_Options : Boolean := False;
|
|
|
|
+ Rpath_Disabled : Boolean := False;
|
|
+ -- If -R is passed through the library options for the linker, it will
|
|
+ -- prevent the implemented libraries portion of the rpath switch from
|
|
+ -- being built, even if the linker is capable of supporting rpath.
|
|
+
|
|
Rpath : String_List_Access := null;
|
|
-- Allocated only if Path Option is supported
|
|
|
|
@@ -1040,7 +1045,12 @@ begin
|
|
Use_GNAT_Lib := False;
|
|
end if;
|
|
|
|
- Library_Options_Table.Append (new String'(Line (1 .. Last)));
|
|
+ if Line (1 .. Last) = "-R" then
|
|
+ Rpath_Disabled := True;
|
|
+ else
|
|
+ Library_Options_Table.Append
|
|
+ (new String'(Line (1 .. Last)));
|
|
+ end if;
|
|
|
|
when Gprexch.Library_Rpath_Options =>
|
|
Library_Rpath_Options_Table.Append
|
|
@@ -2166,7 +2176,7 @@ begin
|
|
Library_Switches_Table.Append
|
|
(new String'("-L" & Imported_Library_Directories.Table (J).all));
|
|
|
|
- if Path_Option /= null then
|
|
+ if not Rpath_Disabled and then Path_Option /= null then
|
|
Add_Rpath (Imported_Library_Directories.Table (J));
|
|
end if;
|
|
|