From: Ruben Kerkhof Date: Sat, 24 Jan 2015 17:47:23 +0000 (+0100) Subject: Fix PIE detection for older gcc's X-Git-Tag: rec-3.7.0-rc2~42^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2116%2Fhead;p=thirdparty%2Fpdns.git Fix PIE detection for older gcc's At least on FreeBSD, gcc42 can't create position-independent executables when threads are involved. Expand our configure check to use some pthread code so it fails instead of succeeds. Fixes #2037 and probably #2055 --- diff --git a/pdns/configure-recursor b/pdns/configure-recursor index 1716186449..f82a8b8c0e 100755 --- a/pdns/configure-recursor +++ b/pdns/configure-recursor @@ -20,7 +20,7 @@ CF_STACK="" test_flags() { # test for relocation - if [ `uname -s` = 'SunOS' -o `uname -s` = 'FreeBSD' ]; then + if [ `uname -s` = 'SunOS' ]; then return fi @@ -34,9 +34,13 @@ test_flags() { src=conftest.cc cat >$src < + +__thread unsigned int t_id; int main () { + t_id = 1; return 0; } EOF