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
Hi,

Is there a recommended method for testing if a package respects LDFLAGS?

Arch testers are encouraged to add -Wl,--hash-style=gnu to LDFLAGS 
[1],[2] and portage uses scanelf to check for .hash sections. However it 
appears that ld defaults to using a .gnu.hash section:

$ touch test.c
$ gcc -o libtest.so -shared test.c
$ scanelf -qyRF '#k%p' -k .hash libtest.so
$ scanelf -qyRF '#k%p' -k .gnu.hash libtest.so
libtest.so

Maybe I'm missing something obvious.


Thanks

Keri

[1] https://wiki.gentoo.org/wiki/Project:AMD64_Arch_Testers
[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>