Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 552616

Summary: cross-*/musl-1.1.10-r1: Uses wrong strip command
Product: Gentoo Linux Reporter: Felix Janda <felix.janda>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: UNCONFIRMED ---    
Severity: normal CC: bertrand, jeremi.piotrowski, tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=830213
https://bugs.gentoo.org/show_bug.cgi?id=724484
https://bugs.gentoo.org/show_bug.cgi?id=700884
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    

Description Felix Janda 2015-06-20 09:35:55 UTC
Compiling musl with crossdev generates warnings of the form

x86_64-gentoo-linux-musl-strip: Unable to recognise the format of the input file `/var/tmp/portage/cross-armv7a-hardfloat-linux-musleabi/musl-1.1.10-r1/image/usr/armv7a-hardfloat-linux-musleabi/usr/lib/rcrt1.o'

which in the end cause

/usr/libexec/gcc/armv7a-hardfloat-linux-musleabi/ld: skipping incompatible /usr/armv7a-hardfloat-linux-musleabi/usr/lib/libc.a when searching for -lc

when trying to do static linking.


Reproducible: Always




Obviously the wrong strip command is used and this seems to cause the
breakage. (and this is not specific to the architectures in the example)

The glibc and uclibc ebuilds disable stripping and are therefore not
affected. The glibc ebuild suggests that this is due to bug 46186. I'm
not sure whether this applies also to musl but one possible solution
would be to disable stripping for musl.

prepstrip uses unconditionally the strip from CHOST. So another
possibility would be to ensure that in the crosscompiling situation
both CHOST and CTARGET point to the target arch while CBUILD points
to the arch we are building on.
Comment 1 SpanKY gentoo-dev 2015-07-06 07:34:26 UTC
i don't know why this has been re-assigned -- it's clearly a bug in the musl ebuild.  read the other C library ebuilds to see how to handle this case.
Comment 2 tt_1 2019-11-15 15:00:39 UTC
is this still a thing with recent musl-1.1.24?