Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 592268 - sys-libs/musl on softfloat ARM: ldconfig 'doesn't work'
Summary: sys-libs/musl on softfloat ARM: ldconfig 'doesn't work'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal minor (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2016-08-27 19:36 UTC by Laine Gholson
Modified: 2016-10-02 18:15 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch (musl-armsoftfloat.patch,830 bytes, patch)
2016-08-27 19:36 UTC, Laine Gholson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Laine Gholson 2016-08-27 19:36:28 UTC
Created attachment 444276 [details, diff]
patch

sys-libs/musl ldconfig doesn't work for softfloat ARM because it assumes ARM is hardfloat: arm)   arch="armhf";; # We only have hardfloat right now

A Patch is attached that checks if the __ARM_PCS_VFP macro is defined and if it is ARM is hardfloat, otherwise ARM is softfloat.
Comment 1 Felix Janda 2016-08-31 22:38:30 UTC
Thanks for your patch! It would be nice to have a solution for all
architectures without replicating the logic of musl's configure
script.

Recent versions of musl's dynamic linker report the architecture name
used for the dynamic linker name. For example:

$ /usr/bin/libc.so
musl libc (armhf)
Version 1.1.15
Dynamic Program Loader
Usage: /usr/lib/libc.so [options] [--] pathname [args]
$ ls /lib/ld-*
ld-musl-armhf.so.1

Could you investigate rewriting ldconfig and the musl ebuild to reuse
that information? (See also the TODO in the musl ebuild.)


On the other hand, how have you setup a gentoo arm softfloat system?
Comment 2 Anthony Basile gentoo-dev 2016-08-31 22:47:04 UTC
(In reply to Felix Janda from comment #1)

> 
> Could you investigate rewriting ldconfig and the musl ebuild to reuse
> that information? (See also the TODO in the musl ebuild.)
> 

especially for ldconfig we can't be invoking the compiler as you do in that patch for the musl ebuild via $(tc-getCPP).  parsing out the architecture from the output of /usr/lib/libc.so will work as Felix suggested.
Comment 3 Felix Janda 2016-09-25 01:03:20 UTC
sys-libs/musl-1.1.15-r1, which should fix this bug, is now in the tree.

@Laine, could you test whether it works for you?
Comment 4 Laine Gholson 2016-10-02 16:22:56 UTC
works fine on sys-libs/musl-9999