Created attachment 592384 [details] Steps To Reproduce Building a cross development system with the current (2.29-r2) glibc produces unusable static libraries.
crossdev version 20190712. The first compilation (shared) works, the second (static) does not. Analysing /usr/$CT/lib/libc.a reveals one object file which is defect: ar x libc.a file *.o Many objects show: *.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped But one has "no machine": init-first.o: ELF 32-bit LSB relocatable, no machine, version 1 (SYSV), not stripped I can call ebuild: ebuild /usr/local/portage/cross-$CT/glibc/glibc-2.29-r2.ebuild install and look for libc.a, I will find: /var/tmp/portage/cross-armv7a-test-linux-gnueabi/glibc-2.29-r2/work/build-default-armv7a-test-linux-gnueabi-nptl/libc.a /var/tmp/portage/cross-armv7a-test-linux-gnueabi/glibc-2.29-r2/image/usr/armv7a-test-linux-gnueabi/usr/lib/libc.a The fist is OK, the second (in the image directory) is defective.
Created attachment 592386 [details] emerge --info
This is likely a regression that came from https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-libs/glibc?id=e14229b10b513a164f8379ff14cc8c644c071f27 As a workaround try to rebuild your cross-glibc with FEATURES=nostrip.
*** Bug 697544 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=650d70eb5d91265329e2f730bc1aed0fa5863db6 commit 650d70eb5d91265329e2f730bc1aed0fa5863db6 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-10-14 06:57:44 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-10-14 06:58:05 +0000 sys-libs/glibc: disable stripping for cross-glibc commit e14229b10b513a164f8379ff14cc8c644c071f27 dropped special stripping and relied on standard ${CHOST}-strip. Unfortunately one special case wa missing: cross-*/glibc ebuilds use ${CTARGET} as a target and are installed into the host. That causes ${CHOST}-strip to be called on ${CTARGET} binaries. If multitarget is not enabled strip either breaks such bianries or makes them untouched. Disable tripping until we migrated off off cross-*/glibc ebuilds. Reported-by: Johannes Geiss Closes: https://bugs.gentoo.org/697428 Package-Manager: Portage-2.3.76, Repoman-2.3.17 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-libs/glibc/glibc-2.19-r2.ebuild | 3 +++ sys-libs/glibc/glibc-2.24-r4.ebuild | 3 +++ sys-libs/glibc/glibc-2.25-r11.ebuild | 3 +++ sys-libs/glibc/glibc-2.26-r7.ebuild | 3 +++ sys-libs/glibc/glibc-2.27-r6.ebuild | 3 +++ sys-libs/glibc/glibc-2.28-r6.ebuild | 3 +++ sys-libs/glibc/glibc-2.29-r2.ebuild | 3 +++ sys-libs/glibc/glibc-2.29-r4.ebuild | 3 +++ sys-libs/glibc/glibc-2.29-r5.ebuild | 3 +++ sys-libs/glibc/glibc-2.30-r1.ebuild | 3 +++ sys-libs/glibc/glibc-2.30.ebuild | 3 +++ sys-libs/glibc/glibc-9999.ebuild | 3 +++ 12 files changed, 36 insertions(+)