bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bugreport: Incorrect forwarding of a shared library's -R flags when


From: Todd Gamblin
Subject: Re: Bugreport: Incorrect forwarding of a shared library's -R flags when this library is linked to an executable
Date: Thu, 7 Jan 2010 14:21:29 -0800

Ralf,

On Jan 7, 2010, at 12:06 PM, Ralf Wildenhues wrote:

The
 -R*) ;;

line has been added to ltmain for some reason, and merely removing it
would likely cause a regression for some system or setup.

I've looked a bit now.  It comes from
<http://*lists.gnu.org/archive/html/libtool-patches/2003-03/msg00086.html>
which originates from
<http://*lists.gnu.org/archive/html/bug-gnu-utils/2003-01/msg00009.html>.

The former states:

 This patch was posted on a GNU mailing list by Albert Chin. It is essential
 for use of libtool, libintl etc. on all platforms where the linker doesn't
 understand the -R flag directly, like OSF/1. The -R flags from a .la's
 dependency_libs are taken into account by a different variable and must be
 ignored in this particular pass.

That -R are taken into account elsewhere is probably only true for
$dependency_libs but not propagation.  However, it is likely true
that reverting the patch will break things for linkers don't understand
-R directly.

Another question regarding -R and compatibility with different linkers. 

Why does libtool draw a distinction between -R and -rpath?  GNU ld treats -R plus directory name as a synonym for -rpath, so these are effectively the same once things get through libtool and down to the linker.  Or am I mistaken about this?

I ask because I seem to remember at one point when I was fighting with this that I could get -rpath flags to propagate, but not -R flags.  The libraries that were built had the correct runpath (according to readelf), but libtool refused to install them because it claimed I was trying to install into the wrong directory.

So, why does libtool attach special significance to -rpath?  Is that how different runs of libtool know where particular libraries are to be installed?  

It seems like -rpath is understood by quite a few linkers, so why can't libtool just translate -R arguments to -rpath arguments on systems where -R isn't understood?

-Todd

reply via email to

[Prev in Thread] Current Thread [Next in Thread]