Lines 264-277
setup_flags() {
Link Here
|
264 |
filter-flags -fstack-protector* |
264 |
filter-flags -fstack-protector* |
265 |
gcc-specs-ssp && append-flags $(test-flags -fno-stack-protector) |
265 |
gcc-specs-ssp && append-flags $(test-flags -fno-stack-protector) |
266 |
|
266 |
|
267 |
if use hardened && gcc-specs-pie ; then |
267 |
if has_version '<sys-devel/gcc-6' ; then |
268 |
# Force PIC macro definition for all compilations since they're all |
268 |
# Spec files are no longer used with >=gcc-6, these functions are controlled via |
269 |
# either -fPIC or -fPIE with the default-PIE compiler. |
269 |
# the useflags on gcc |
270 |
append-cppflags -DPIC |
270 |
if use hardened && gcc-specs-pie ; then |
271 |
else |
271 |
# Force PIC macro definition for all compilations since they're all |
272 |
# Don't build -fPIE without the default-PIE compiler and the |
272 |
# either -fPIC or -fPIE with the default-PIE compiler. |
273 |
# hardened-pie patch |
273 |
append-cppflags -DPIC |
274 |
filter-flags -fPIE |
274 |
else |
|
|
275 |
# Don't build -fPIE without the default-PIE compiler and the |
276 |
# hardened-pie patch |
277 |
filter-flags -fPIE |
278 |
fi |
275 |
fi |
279 |
fi |
276 |
} |
280 |
} |
277 |
|
281 |
|