Browse Source

gcc: fixed parse-config to only inject -fstack-protector if we have a proper compiler supporting it

Note:

At stage 0 (toolchain) we are building a static gcc with explicitely disabled
stack-smashing protection.
stable/0.6
Christian Wiese 11 years ago
parent
commit
d738fcc5dd
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      base/gcc/parse-config

+ 5
- 1
base/gcc/parse-config

@ -18,7 +18,11 @@
# #
if [ "${SDECFG_DEFAULT_CC:0:3}" = "gcc" -a "$SDECFG_PKG_GCC_STACKPRO" = 1 ]; then if [ "${SDECFG_DEFAULT_CC:0:3}" = "gcc" -a "$SDECFG_PKG_GCC_STACKPRO" = 1 ]; then
if ! hasflag NO-SSP; then if ! hasflag NO-SSP; then
var_append GCC_WRAPPER_INSERT ' ' '-fstack-protector'
if pkginstalled -f gcc; then
var_append GCC_WRAPPER_INSERT ' ' '-fstack-protector'
else
echo_warning 'Disabling GCC stack-protector (not supported by toolchain gcc)'
fi
else else
echo_warning 'Package incompatible with GCC stack-protector, disabled' echo_warning 'Package incompatible with GCC stack-protector, disabled'
fi fi

Loading…
Cancel
Save