From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: 20102-done@debbugs.gnu.org
Subject: bug#20102: Problem with ld.so RUNPATH on armhf
Date: Thu, 09 Apr 2015 08:57:39 +0200 [thread overview]
Message-ID: <878ue1vlek.fsf@gnu.org> (raw)
In-Reply-To: <87mw2hx2et.fsf@netris.org> (Mark H. Weaver's message of "Thu, 09 Apr 2015 02:04:58 -0400")
Mark H Weaver <mhw@netris.org> skribis:
> ludo@gnu.org (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’.
next prev parent reply other threads:[~2015-04-09 6:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 18:56 bug#20102: Problem with ld.so RUNPATH on armhf Mark H Weaver
2015-04-04 21:58 ` Ludovic Courtès
2015-04-05 4:42 ` Mark H Weaver
2015-04-06 20:24 ` Ludovic Courtès
2015-04-06 21:02 ` Mark H Weaver
2015-04-08 9:52 ` Ludovic Courtès
2015-04-08 15:21 ` Mark H Weaver
2015-04-08 15:26 ` Mark H Weaver
2015-04-08 15:48 ` Ludovic Courtès
2015-04-08 15:50 ` Mark H Weaver
2015-04-08 18:39 ` Ludovic Courtès
2015-04-08 22:33 ` Ludovic Courtès
2015-04-09 6:04 ` Mark H Weaver
2015-04-09 6:57 ` Ludovic Courtès [this message]
2015-04-09 8:18 ` Ludovic Courtès
2015-06-13 15:12 ` Mark H Weaver
2015-06-13 23:36 ` Ludovic Courtès
2015-07-14 13:32 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878ue1vlek.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=20102-done@debbugs.gnu.org \
--cc=mhw@netris.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.