diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2020-06-09 08:23:10 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2020-06-09 08:24:07 +0100 |
commit | b6558b4251e9dacfb8a866716820e43a7dc5d0fe (patch) | |
tree | 61cf601173a2c61770ea238aafe0e4de0b5887ea /sys-libs/glibc/glibc-9999.ebuild | |
parent | dev-python/pyperclip: Fix wrong checks for PyQt* (diff) | |
download | gentoo-b6558b4251e9dacfb8a866716820e43a7dc5d0fe.tar.gz gentoo-b6558b4251e9dacfb8a866716820e43a7dc5d0fe.tar.bz2 gentoo-b6558b4251e9dacfb8a866716820e43a7dc5d0fe.zip |
sys-libs/glibc: always use NM and READELF for default ABI
sys-devel/binutils-config[-native-symlinks] exposed a bug of
not using 'readelf' / 'nm' if used ABI is not default.
Breakage mahifested as ./configure failure for glibc[static-pie]
for non-default ABIs.
The fix uses NM and READELF from default ABI (specified by CTARGET).
While at it set CC in early compile test checks.
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'sys-libs/glibc/glibc-9999.ebuild')
-rw-r--r-- | sys-libs/glibc/glibc-9999.ebuild | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index 2355e5bce34e..236e15c07920 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -225,7 +225,8 @@ do_compile_test() { rm -f glibc-test* printf '%b' "$*" > glibc-test.c - nonfatal emake glibc-test + # Most of the time CC is already set, but not in early sanity checks. + nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}" ret=$? popd >/dev/null @@ -798,7 +799,7 @@ glibc_do_configure() { fi local v - for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO ; do + for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM READELF; do einfo " $(printf '%15s' ${v}:) ${!v}" done @@ -827,6 +828,14 @@ glibc_do_configure() { fi einfo " $(printf '%15s' 'Manual CXX:') ${CXX}" + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + einfo " $(printf '%15s' 'Manual NM:') ${NM}" + einfo " $(printf '%15s' 'Manual READELF:') ${READELF}" + echo local myconf=() |