Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sun, 25 Aug 2019 09:40:30
Message-Id: 1566726018.35e71fcd352e9113c55447b66f6a93e164839dd7.slyfox@gentoo
1 commit: 35e71fcd352e9113c55447b66f6a93e164839dd7
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 25 09:23:54 2019 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 25 09:40:18 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35e71fcd
7
8 eclass/toolchain.eclass: mask LIBPATH for cross-case, bug #692844
9
10 /usr/lib/gcc/${CTARGET}/${GCC_CONFIG_VER} contains libraries
11 destined to be used by ${CTARGET}. revdep-rebuild complains
12 about missing dependencies against them as we don't populate
13 LDPATH (or anything else) for them.
14
15 The change populates /etc/revdep-rebuild/05cross-${CTARGET}-${GCC_CONFIG_VER}
16 with a single entry:
17 SEARCH_DIRS_MASK="/usr/lib/gcc/${CTARGET}/${GCC_CONFIG_VER}"
18
19 crossdev will still own root's SEARCH_DIRS_MASK="/usr/${CTARGET}".
20
21 Reported-by: crocket
22 Closes: https://bugs.gentoo.org/692844
23 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
24
25 eclass/toolchain.eclass | 15 +++++++++++++++
26 1 file changed, 15 insertions(+)
27
28 diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
29 index 12b86214a05..156ec3d0cf8 100644
30 --- a/eclass/toolchain.eclass
31 +++ b/eclass/toolchain.eclass
32 @@ -1818,6 +1818,7 @@ toolchain_src_install() {
33
34 dodir /etc/env.d/gcc
35 create_gcc_env_entry
36 + create_revdep_rebuild_entry
37
38 # Setup the gcc_env_entry for hardened gcc 4 with minispecs
39 want_minispecs && copy_minispecs_gcc_specs
40 @@ -2138,6 +2139,20 @@ create_gcc_env_entry() {
41 EOF
42 }
43
44 +create_revdep_rebuild_entry() {
45 + dodir /etc/revdep-rebuild
46 + local revdep_rebuild_base="/etc/revdep-rebuild/05cross-${CTARGET}-${GCC_CONFIG_VER}"
47 + local revdep_rebuild_file="${ED}${revdep_rebuild_base}"
48 +
49 + is_crosscompile || return 0
50 +
51 + cat <<-EOF > ${revdep_rebuild_file}
52 + # Generated by ${CATEGORY}/${PF}
53 + # Ignore libraries built for ${CTARGET}, https://bugs.gentoo.org/692844.
54 + SEARCH_DIRS_MASK="${LIBPATH}"
55 + EOF
56 +}
57 +
58 copy_minispecs_gcc_specs() {
59 # on gcc 6 we don't need minispecs
60 if tc_version_is_at_least 6.0 ; then