about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKevin F. Quinn <kevquinn@gentoo.org>2014-09-09 17:41:57 -0400
committerMike Frysinger <vapier@gentoo.org>2014-09-09 17:41:57 -0400
commit2a9897ddc3f05aa3a52aeb35ea15530ef3584147 (patch)
treeeea3b3c05d5460dd0e9fd61e9f967c21704a41ba
parent27b390b9b65ce97b034bbfff11d2b01c3af98180 (diff)
downloadglibc-2a9897ddc3f05aa3a52aeb35ea15530ef3584147.tar.gz
glibc-2a9897ddc3f05aa3a52aeb35ea15530ef3584147.tar.xz
glibc-2a9897ddc3f05aa3a52aeb35ea15530ef3584147.zip
disable PIE when checking for PIC default
When the compiler builds PIEs by default, the configure PIC check is
confused into thinking PIC code is default.  The end result is that
we end up with only PIC being produced.

Run the configure check with -fno-PIE so that we produce PIC & non-PIC
(PIE) objects like normal.

2014-09-09  Kevin F. Quinn  <kevquinn@gentoo.org>

	* configure.ac (libc_cv_pic_default): Pass -fno-PIE.
	* configure: Regenerated.
-rwxr-xr-xconfigure2
-rw-r--r--configure.ac2
2 files changed, 2 insertions, 2 deletions
diff --git a/configure b/configure
index 86ba30774b..5e7e8c35af 100755
--- a/configure
+++ b/configure
@@ -7156,7 +7156,7 @@ cat > conftest.c <<EOF
 # error PIC is default.
 #endif
 EOF
-if eval "${CC-cc} -S conftest.c 2>&5 1>&5"; then
+if eval "${CC-cc} -fno-PIE -S conftest.c 2>&5 1>&5"; then
   libc_cv_pic_default=no
 fi
 rm -f conftest.*
diff --git a/configure.ac b/configure.ac
index 255339983a..e4f99b559a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2019,7 +2019,7 @@ cat > conftest.c <<EOF
 # error PIC is default.
 #endif
 EOF
-if eval "${CC-cc} -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then
+if eval "${CC-cc} -fno-PIE -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then
   libc_cv_pic_default=no
 fi
 rm -f conftest.*])