]> git.ipfire.org Git - ipfire-3.x.git/blob - pkgs/glibc/patches/glibc-2.10.1-hardened-configure-picdefault.patch
Change file layout of the makefiles.
[ipfire-3.x.git] / pkgs / glibc / patches / glibc-2.10.1-hardened-configure-picdefault.patch
1 Prevent default-fPIE from confusing configure into thinking
2 PIC code is default. This causes glibc to build both PIC and
3 non-PIC code as normal, which on the hardened compiler generates
4 PIC and PIE.
5
6 Patch 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.*