libtool-patches
[Top][All Lists]
Advanced

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

Re: [RFT PATCH v3 0/9] Sysroot patches


From: Charles Wilson
Subject: Re: [RFT PATCH v3 0/9] Sysroot patches
Date: Fri, 30 Jul 2010 14:55:26 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

On 7/29/2010 4:18 AM, Paolo Bonzini wrote:
> On Thu, Jul 29, 2010 at 10:04, Charles Wilson wrote:
>> On 7/28/2010 7:23 PM, Paolo Bonzini wrote:
>>> This is the update of the series, with the bug fixes (thanks Charles
>>> for the hand work!) and structured to preserve bisectability.
>>>
>>
>> Sadly, the newest patchset appears to fail the new:041 test.

So, looking in to this a bit more, I found two items of interest.

1) runpath-in-lalib.at should probably add -no-undefined to the link
command for the two libraries.  It doesn't make sense to have an -R path
specified for a static library, does it? And, if we're building shared
libs on other platforms, we should probably ensure that we get shared
libs for this test on cygming, too.

2) But then again, on cygwin (well, all PE/COFF) we don't really support
-R runpaths anyway. (*) In fact, doing a grep of all .la files in my
cygwin /usr/lib for '-R' turns up empty, as it should. Now, maybe that's
simply because no official cygwin package ever uses -R options when built...

(*) For the GNU linker, -R /path/to/dir is treated as -rpath
/path/to/dir.  From the manual:

`-R FILENAME'
...
     For compatibility with other ELF linkers, if the `-R' option is
     followed by a directory name, rather than a file name, it is
     treated as the `-rpath' option.

and later

`-rpath=DIR'
     Add a directory to the runtime library search path.  This is used
     when linking an ELF executable with shared objects.  ...

However, if present on a command line for the PE/COFF ld, I don't think
it does any harm; it's just ignored.

However, if the .la file is going to have -R options in it, even on
cygwin, then they better be correct!  And, it's probably more trouble
than it is worth -- and might introduce other bugs -- to modify libtool
to NOT emit -R options for specific platforms.  It's better to simply
FIX the -R option handling across the board, especially since...


It appears that 'emit sysrooted paths when installing .la files' breaks
test new:41 on linux (native compiler), as well:

linux, liba.la:
dependency_libs=' -R'

linux, libb.la:
dependency_libs='
-R/home/cwilson/tmp/libtool/_build/tests/testsuite.dir/041/liba.la
/home/cwilson/tmp/libtool/_build/tests/testsuite.dir/041/inst/lib/liba.la'

which is the same behavior I see on Cygwin.  So, there's definitely
something going wonky with handling of -R arguments, cross-platform,
thanks to 'emit sysrooted paths when installing .la files'.


Since the bug is cross-platform, it should be easy(er) to fix for you
non-cygwin types.  Any ideas, Paolo?

PS. Note that all these tests were done using the patches as submitted,
which implies (I think, and contrary to the docu) --without-sysroot.
However, since I'm testing with a native compiler, without any sysroot,
I don't think that matters.

--
Chuck



reply via email to

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