bug-guix
[Top][All Lists]
Advanced

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

bug#20102: Problem with ld.so RUNPATH on armhf


From: Ludovic Courtès
Subject: bug#20102: Problem with ld.so RUNPATH on armhf
Date: Thu, 09 Apr 2015 08:57:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Mark H Weaver <address@hidden> skribis:

> address@hidden (Ludovic Courtès) writes:
>
>> With a bit of additional debug, I can print the value of ‘libs’ in the
>> ‘ld-wrapper’ procedure:
>>
>> ;;; (libs 
>> ("/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/ld-linux-armhf.so.3"))
>>
>> This one comes from the -dynamic-linker flag, which is not passed on
>> x86_64.
>>
>> I believe this extra -dynamic-linker flag comes from a bogus ‘link’ spec
>> on ARM, solved by this:
>>
>> --- gcc-4.8.4/gcc/config/arm/linux-elf.h.orig        2015-04-08 
>> 20:31:20.376900478 +0200
>> +++ gcc-4.8.4/gcc/config/arm/linux-elf.h     2015-04-08 20:31:36.437014437 
>> +0200
>> @@ -65,7 +65,7 @@
>>     %{symbolic:-Bsymbolic} \
>>     %{!static: \
>>       %{rdynamic:-export-dynamic} \
>> -     -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
>> +     %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \
>>     -X \
>>     %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
>>     SUBTARGET_EXTRA_LINK_SPEC
>>
>> That way it would match GNU_USER_TARGET_LINK_SPEC in i386/gnu-user.h,
>> where -dynamic-linker appears within %{!static ... %{!shared ...}}.
>>
>> So, could you do:
>>
>>   (define patched-gcc
>>     (package
>>       (inherit gcc-4.8)
>>       (sources (origin (inherit (package-source gcc-4.8))
>>                  (patches ...)))))
>>
>> build it, and then use it in the failed glibc build tree to rebuild
>> ld.so?
>
> Yes, this fixed the problem.  I went ahead and pushed 1421afa94a to
> core-updates to apply this patch to gcc-4.8, gcc-4.9, and cross-gcc.
>
> I started both Hydra and my Novena building the new core-updates.

Cool, thanks!

(There’s a small typo in the comment in the patch: it should be “Don’t
pass -dynamic-linker when shared.”)

I will push the ld-wrapper fix in the next core-updates cycle then.

Ludo’.





reply via email to

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