]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
disable PIE when checking for PIC default
authorKevin F. Quinn <kevquinn@gentoo.org>
Tue, 9 Sep 2014 21:41:57 +0000 (17:41 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 9 Feb 2015 15:02:06 +0000 (10:02 -0500)
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.

configure
configure.ac

index ce0c6a01f114d009945dcca58d039fa5123d648e..70b4479b5efd363efdead356ab90da0fa487defc 100755 (executable)
--- a/configure
+++ b/configure
@@ -7148,7 +7148,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.*
index d89aaf0cdf329f1fe6247dbbfad49693642c570f..9351483c1ce0e7270c35ddf17afab84f0daec664 100644 (file)
@@ -2013,7 +2013,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.*])