Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/install-qa-check.d/
Date: Mon, 16 Oct 2017 17:21:17
Message-Id: 1508174404.730a867c1050937c82c775d7678a616c7b9546e6.zmedico@gentoo
1 commit: 730a867c1050937c82c775d7678a616c7b9546e6
2 Author: Felix Janda <felix.janda <AT> posteo <DOT> de>
3 AuthorDate: Mon Oct 16 03:51:37 2017 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 16 17:20:04 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=730a867c
7
8 install-qa-check.d/10ignored-flags: fix LDFLAGS check (bug 455232)
9
10 Since binutils-2.23.51.0.9+ defaults to hash-style=gnu, use
11 a __gentoo_check_ldflags__ symbol instead. The check is now
12 enabled by adding "-Wl,--defsym=__gentoo_check_ldflags__=0"
13 to LDFLAGS. The symbol will be automatically removed when
14 the binary is stripped.
15
16 Bug: https://bugs.gentoo.org/455232
17 Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>
18
19 bin/install-qa-check.d/10ignored-flags | 5 +++--
20 1 file changed, 3 insertions(+), 2 deletions(-)
21
22 diff --git a/bin/install-qa-check.d/10ignored-flags b/bin/install-qa-check.d/10ignored-flags
23 index 7aa9eb695..28aec6787 100644
24 --- a/bin/install-qa-check.d/10ignored-flags
25 +++ b/bin/install-qa-check.d/10ignored-flags
26 @@ -64,9 +64,10 @@ ignored_flag_check() {
27 fi
28
29 # Check for files built without respecting LDFLAGS
30 - if [[ "${LDFLAGS}" == *,--hash-style=gnu* ]] && \
31 + if [[ "${LDFLAGS}" == *,--defsym=__gentoo_check_ldflags__* ]] && \
32 ! has binchecks ${RESTRICT} ; then
33 - f=$(scanelf -qyRF '#k%p' -k .hash "${ED}")
34 + f=$(LC_ALL=C comm -3 <(scanelf -qyRF '#k%p' -k .dynsym "${ED}" | LC_ALL=C sort) \
35 + <(scanelf -qyRF '#s%p' -s __gentoo_check_ldflags__ "${ED}" | LC_ALL=C sort))
36 if [[ -n ${f} ]] ; then
37 echo "${f}" > "${T}"/scanelf-ignored-LDFLAGS.log
38 if [ "${QA_STRICT_FLAGS_IGNORED-unset}" = unset ] ; then