From c10dd999275eb99b43ae99444a8fd35344fd8bdd Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 24 Jan 2015 18:47:23 +0100 Subject: [PATCH] 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 --- pdns/configure-recursor | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.47.2