1 |
From: Felix Janda <felix.janda@××××××.de> |
2 |
|
3 |
Since binutils-2.23.51.0.9+ defaults to hash-style=gnu, use |
4 |
a __gentoo_check_ldflags__ symbol instead. The check is now |
5 |
enabled by adding "-Wl,--defsym=__gentoo_check_ldflags__=0" |
6 |
to LDFLAGS. The symbol will be automatically removed when |
7 |
the binary is stripped. |
8 |
|
9 |
Bug: https://bugs.gentoo.org/455232 |
10 |
Closes: https://github.com/gentoo/portage/pull/220 |
11 |
--- |
12 |
bin/install-qa-check.d/10ignored-flags | 5 +++-- |
13 |
1 file changed, 3 insertions(+), 2 deletions(-) |
14 |
|
15 |
diff --git a/bin/install-qa-check.d/10ignored-flags b/bin/install-qa-check.d/10ignored-flags |
16 |
index 7aa9eb695..28aec6787 100644 |
17 |
--- a/bin/install-qa-check.d/10ignored-flags |
18 |
+++ b/bin/install-qa-check.d/10ignored-flags |
19 |
@@ -64,9 +64,10 @@ ignored_flag_check() { |
20 |
fi |
21 |
|
22 |
# Check for files built without respecting LDFLAGS |
23 |
- if [[ "${LDFLAGS}" == *,--hash-style=gnu* ]] && \ |
24 |
+ if [[ "${LDFLAGS}" == *,--defsym=__gentoo_check_ldflags__* ]] && \ |
25 |
! has binchecks ${RESTRICT} ; then |
26 |
- f=$(scanelf -qyRF '#k%p' -k .hash "${ED}") |
27 |
+ f=$(LC_ALL=C comm -3 <(scanelf -qyRF '#k%p' -k .dynsym "${ED}" | LC_ALL=C sort) \ |
28 |
+ <(scanelf -qyRF '#s%p' -s __gentoo_check_ldflags__ "${ED}" | LC_ALL=C sort)) |
29 |
if [[ -n ${f} ]] ; then |
30 |
echo "${f}" > "${T}"/scanelf-ignored-LDFLAGS.log |
31 |
if [ "${QA_STRICT_FLAGS_IGNORED-unset}" = unset ] ; then |
32 |
-- |
33 |
2.13.5 |