| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2011 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_setup.eblit,v 1.8 2011/12/12 17:47:28 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_setup.eblit,v 1.9 2011/12/12 23:22:33 vapier Exp $ |
| 4 | |
4 | |
| 5 | glibc_compile_test() { |
5 | glibc_compile_test() { |
| 6 | local ret save_cflags=${CFLAGS} |
6 | local ret save_cflags=${CFLAGS} |
| 7 | CFLAGS+=" $1" |
7 | CFLAGS+=" $1" |
| 8 | shift |
8 | shift |
| … | |
… | |
| 95 | |
95 | |
| 96 | use hardened && ! gcc-specs-pie && \ |
96 | use hardened && ! gcc-specs-pie && \ |
| 97 | ewarn "PIE hardening not applied, as your compiler doesn't default to PIE" |
97 | ewarn "PIE hardening not applied, as your compiler doesn't default to PIE" |
| 98 | |
98 | |
| 99 | # Make sure host system is up to date #394453 |
99 | # Make sure host system is up to date #394453 |
| 100 | if has_version '<sys-libs/glibc-2.15' ; then |
100 | if has_version '<sys-libs/glibc-2.13' && \ |
|
|
101 | [[ -n $(scanelf -qys__guard -F'#s%F' "${ROOT}"/lib*/l*-*.so) ]] |
|
|
102 | then |
| 101 | ebegin "Scanning system for __guard to see if you need to rebuild first ..." |
103 | ebegin "Scanning system for __guard to see if you need to rebuild first ..." |
| 102 | local files=$( |
104 | local files=$( |
| 103 | scanelf -qys__guard -F'#s%F' \ |
105 | scanelf -qys__guard -F'#s%F' \ |
| 104 | "${ROOT}"/*bin/ \ |
106 | "${ROOT}"/*bin/ \ |
| 105 | "${ROOT}"/lib* \ |
107 | "${ROOT}"/lib* \ |
| 106 | "${ROOT}"/usr/*bin/ \ |
108 | "${ROOT}"/usr/*bin/ \ |
| 107 | "${ROOT}"/usr/lib* | \ |
109 | "${ROOT}"/usr/lib* | \ |
| 108 | grep -v '^/lib.*/libc-2.*.so$' |
110 | grep -v \ |
|
|
111 | -e "^${ROOT}/lib.*/libc-2.*.so$" \ |
|
|
112 | -e "^${ROOT}/lib.*/ld-2.*.so$" |
| 109 | ) |
113 | ) |
| 110 | [[ -z ${files} ]] |
114 | [[ -z ${files} ]] |
| 111 | if ! eend $? ; then |
115 | if ! eend $? ; then |
| 112 | eerror "Your system still has old SSP __guard symbols. You need to" |
116 | eerror "Your system still has old SSP __guard symbols. You need to" |
| 113 | eerror "rebuild all the packages that provide these files first:" |
117 | eerror "rebuild all the packages that provide these files first:" |