When the builder is invoked with -R, shared libraries are not linked
with an Rpath.
Tested on x86_64-pc-linux-gnu, committed on trunk
2013-10-10 Vincent Celier <[email protected]>
* mlib-prj.adb (Build_Library): Do not issue link dynamic
libraries with an Rpath, if switch -R was used.
Index: mlib-prj.adb
===================================================================
--- mlib-prj.adb (revision 203342)
+++ mlib-prj.adb (working copy)
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2011, AdaCore --
+-- Copyright (C) 2001-2013, AdaCore --
-- --
-- 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- --
@@ -1651,7 +1651,7 @@
-- content of Rpath. As Rpath contains at least libgnat directory
-- path name, it is guaranteed that it is not null.
- if Path_Option /= null then
+ if Opt.Run_Path_Option and then Path_Option /= null then
Opts.Increment_Last;
Opts.Table (Opts.Last) :=
new String'(Path_Option.all & Rpath (1 .. Rpath_Last));