pkgsrc/devel/gprbuild-aux/patches/patch-src_gprlib.adb
marino e7a91fc2fa Upgrade USE_LANGUAGES=ada to use lang/gcc5-aux instead of lang/gcc-aux
This large commit accomplishes the following:

1) Switch USE_LANGUAGES=ada to require lang/gcc5-aux (gcc 5.4) instead
   of lang/gcc-aux (gcc 4.9.2) on gcc.mk
2) Bump affected ports and fix paths as necessary
3) Upgrade devel/gprbuild to the latest release
   - No longer requires lang/gnat_util
   - gprslave requires gcc6-aux, so it was disabled for now
4) Fix lang/gnat_util but set PKG_SKIP_REASON
   - It has no further purpose in the pkgsrc tree
   - It has no practical purpose outside of the pkgsrc tree
   - Indicate intent to remove from tree in Jan. 2017
5) Set devel/GPS as failed with PKG_FAIL_REASON
   - This version of GPS is several years old and at the time they were
     strongly tied to compiler.
   - Latest release of GPS require gcc6-aux (not available) and several
     new and complex dependencies
   - maintainer (me) has no interest to continue supporting it
   - Leaving GPS in place until Jan 2017 to give another person chance to
     upgrade and take over support
   - Latest version in FreeBSD Ports Collection as a reference point
2016-11-25 20:36:49 +00:00

55 lines
1.9 KiB
Ada

$NetBSD: patch-src_gprlib.adb,v 1.3 2016/11/25 20:36:49 marino Exp $
Marino's modification to give Ada programs build with GPRBUILD proper
-rpath support
--- src/gprlib.adb.orig 2015-05-06 11:08:38 UTC
+++ src/gprlib.adb
@@ -393,6 +393,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
@@ -1011,7 +1016,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
@@ -1143,10 +1153,10 @@ begin
Libgnat :=
new String'
- ("-lgnat-" & Line (6 .. Last));
+ ("-lgnat-" & Line (6));
Libgnarl :=
new String'
- ("-lgnarl-" & Line (6 .. Last));
+ ("-lgnarl-" & Line (6));
end if;
else
@@ -2113,7 +2123,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;