On Thu, Jan 25, 2018 at 4:13 AM, Richard W.M. Jones
<rjones(a)redhat.com> wrote:
> On Thu, Jan 25, 2018 at 09:03:34AM +0000, Tom Hughes wrote:
>> On 25/01/18 08:41, Richard W.M. Jones wrote:
>>> On Thu, Jan 25, 2018 at 08:31:29AM +0100, Remi Collet wrote:
>>>> Le 22/01/2018 à 16:24, Florian Weimer a écrit :
>>>>> I updated redhat-rpm-config to instruct ld to reject linking shared
>>>>> objects with undefined symbols. Such undefined symbols break symbol
>>>>> versioning because the are not necessarily bound to the correct
symbol
>>>>> version at run time. (rhbz#1535422)
>>>>
>>>> So this break all the PHP stack build...
>>>>
>>>> (all php extensions are dl open plugins, relying on symbol from the
engine)
>>>
>>> I think the -z defs change should be reverted. It breaks very long-
>>> standing expected behaviour of linkers and there's been no proper
>>> justification for doing it.
>>
>> Other than detecting cases where shared libraries were missing
>> NEEDED entries for other shared objects that they use?
>
> I can't remember now what it's called but there's another way to do
> that which all other distros except Fedora use.
>
-Wl,--as-needed and -Wl,--no-undefined
c.f.:
http://gitweb.mageia.org/software/rpm/rpm-setup/tree/build.macros.in#n221
openSUSE uses the same approach, but apparently the file doesn't
render on their VCS due to not being UTF-8. :/
But --no-undefined is a synonym for -z defs! They are literally listed
together in the ld manual page.
The --as-needed varies the algorithm for which shared libraries to mark
as dependencies but doesn't change the behaviour for undefined symbols
as far as I can see.
Tom
--
Tom Hughes (tom(a)compton.nu)