]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blame - glibc/patches/glibc-2.10.1-hardened-configure-picdefault.patch
Move all packages to root.
[people/arne_f/ipfire-3.x.git] / glibc / patches / glibc-2.10.1-hardened-configure-picdefault.patch
CommitLineData
b2ec3c8a
MT
1Prevent default-fPIE from confusing configure into thinking
2PIC code is default. This causes glibc to build both PIC and
3non-PIC code as normal, which on the hardened compiler generates
4PIC and PIE.
5
6Patch by Kevin F. Quinn <kevquinn@gentoo.org>
7
8--- glibc-2.10.1/configure.in
9+++ glibc-2.10.1/configure.in
10@@ -2145,7 +2145,7 @@
11 # error PIC is default.
12 #endif
13 EOF
14-if eval "${CC-cc} -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then
15+if eval "${CC-cc} -fno-PIE -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then
16 libc_cv_pic_default=no
17 fi
18 rm -f conftest.*])
19--- glibc-2.10.1/configure
20+++ glibc-2.10.1/configure
21@@ -7698,7 +7698,7 @@
22 # error PIC is default.
23 #endif
24 EOF
25-if eval "${CC-cc} -S conftest.c 2>&5 1>&5"; then
26+if eval "${CC-cc} -fno-PIE -S conftest.c 2>&5 1>&5"; then
27 libc_cv_pic_default=no
28 fi
29 rm -f conftest.*