1 |
commit: b2e5d3cd97d25213ba37fd2e214a89be8559c669 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 8 15:13:14 2017 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 8 18:00:58 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2e5d3cd |
7 |
|
8 |
toolchain-glibc.eclass: fix libm.so symlinking for live glibc |
9 |
|
10 |
The failure happens when live glibc-9999 ebuild is installed: |
11 |
* QA Notice: Missing gen_usr_ldscript for libm-2.26.90.so |
12 |
* ERROR: sys-libs/glibc-9999::gentoo failed: |
13 |
* add those ldscripts |
14 |
|
15 |
The problem here is how upstream glibc version is detected: |
16 |
dosym ../../$(get_libdir)/libm-${PV}.so $(alt_usrlibdir)/libm-${PV}.so |
17 |
|
18 |
Change to use 'version.h' to pick upstream version. |
19 |
|
20 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
21 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
22 |
|
23 |
eclass/toolchain-glibc.eclass | 8 ++++++-- |
24 |
1 file changed, 6 insertions(+), 2 deletions(-) |
25 |
|
26 |
diff --git a/eclass/toolchain-glibc.eclass b/eclass/toolchain-glibc.eclass |
27 |
index 1d6a54a37f1..af516d85d8d 100644 |
28 |
--- a/eclass/toolchain-glibc.eclass |
29 |
+++ b/eclass/toolchain-glibc.eclass |
30 |
@@ -1138,10 +1138,14 @@ toolchain-glibc_do_src_install() { |
31 |
cp -a elf/ld.so "${ED}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp" |
32 |
fi |
33 |
|
34 |
+ # Normally real_pv is ${PV}. Live ebuilds are exception, there we need |
35 |
+ # to infer upstream version: |
36 |
+ # '#define VERSION "2.26.90"' -> '2.26.90' |
37 |
+ local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) |
38 |
# Newer versions get fancy with libm linkage to include vectorized support. |
39 |
# While we don't really need a ldscript here, portage QA checks get upset. |
40 |
- if [[ -e ${ED}$(alt_usrlibdir)/libm-${PV}.a ]] ; then |
41 |
- dosym ../../$(get_libdir)/libm-${PV}.so $(alt_usrlibdir)/libm-${PV}.so |
42 |
+ if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then |
43 |
+ dosym ../../$(get_libdir)/libm-${upstream_pv}.so $(alt_usrlibdir)/libm-${upstream_pv}.so |
44 |
fi |
45 |
|
46 |
# We'll take care of the cache ourselves |