diff options
author | Felix Janda <felix.janda@posteo.de> | 2017-10-15 20:51:37 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2017-10-16 10:20:04 -0700 |
commit | 730a867c1050937c82c775d7678a616c7b9546e6 (patch) | |
tree | 51ed990f8bb1812dd11e831d4f667adeb7e223fb | |
parent | prepstrip: use debugedit from rpm if necessary (bug 634378) (diff) | |
download | portage-730a867c1050937c82c775d7678a616c7b9546e6.tar.gz portage-730a867c1050937c82c775d7678a616c7b9546e6.tar.bz2 portage-730a867c1050937c82c775d7678a616c7b9546e6.zip |
install-qa-check.d/10ignored-flags: fix LDFLAGS check (bug 455232)
Since binutils-2.23.51.0.9+ defaults to hash-style=gnu, use
a __gentoo_check_ldflags__ symbol instead. The check is now
enabled by adding "-Wl,--defsym=__gentoo_check_ldflags__=0"
to LDFLAGS. The symbol will be automatically removed when
the binary is stripped.
Bug: https://bugs.gentoo.org/455232
Acked-by: Brian Dolbec <dolsen@gentoo.org>
-rw-r--r-- | bin/install-qa-check.d/10ignored-flags | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/install-qa-check.d/10ignored-flags b/bin/install-qa-check.d/10ignored-flags index 7aa9eb695..28aec6787 100644 --- a/bin/install-qa-check.d/10ignored-flags +++ b/bin/install-qa-check.d/10ignored-flags @@ -64,9 +64,10 @@ ignored_flag_check() { fi # Check for files built without respecting LDFLAGS - if [[ "${LDFLAGS}" == *,--hash-style=gnu* ]] && \ + if [[ "${LDFLAGS}" == *,--defsym=__gentoo_check_ldflags__* ]] && \ ! has binchecks ${RESTRICT} ; then - f=$(scanelf -qyRF '#k%p' -k .hash "${ED}") + f=$(LC_ALL=C comm -3 <(scanelf -qyRF '#k%p' -k .dynsym "${ED}" | LC_ALL=C sort) \ + <(scanelf -qyRF '#s%p' -s __gentoo_check_ldflags__ "${ED}" | LC_ALL=C sort)) if [[ -n ${f} ]] ; then echo "${f}" > "${T}"/scanelf-ignored-LDFLAGS.log if [ "${QA_STRICT_FLAGS_IGNORED-unset}" = unset ] ; then |