Gentoo Archives: gentoo-dev

From: Keri Harris <keri@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Checking if a package respects LDFLAGS
Date: Sat, 30 Sep 2017 17:04:10
Message-Id: 9cc45a33-5f8d-8bec-123c-7f9c9bba77e5@gentoo.org
1 Hi,
2
3 Is there a recommended method for testing if a package respects LDFLAGS?
4
5 Arch testers are encouraged to add -Wl,--hash-style=gnu to LDFLAGS
6 [1],[2] and portage uses scanelf to check for .hash sections. However it
7 appears that ld defaults to using a .gnu.hash section:
8
9 $ touch test.c
10 $ gcc -o libtest.so -shared test.c
11 $ scanelf -qyRF '#k%p' -k .hash libtest.so
12 $ scanelf -qyRF '#k%p' -k .gnu.hash libtest.so
13 libtest.so
14
15 Maybe I'm missing something obvious.
16
17
18 Thanks
19
20 Keri
21
22 [1] https://wiki.gentoo.org/wiki/Project:AMD64_Arch_Testers
23 [2] https://wiki.gentoo.org/wiki/Project:X86/Arch_Testers_FAQ

Replies

Subject Author
Re: [gentoo-dev] Checking if a package respects LDFLAGS "Andreas K. Huettel" <dilfridge@g.o>