Skip to content

Commit

Permalink
toolchain.eclass: add USE=ssp for gcc-6 to control default stack-prot…
Browse files Browse the repository at this point in the history
…ector-strong behavior
  • Loading branch information
vapier committed Aug 29, 2015
1 parent 68ff87d commit 5bd3e5a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions eclass/toolchain.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
# the older versions, we don't want to bother supporting it. #448024
tc_version_is_at_least 4.8 && IUSE+=" graphite" IUSE_DEF+=( sanitize )
tc_version_is_at_least 4.9 && IUSE+=" cilk"
tc_version_is_at_least 6.0 && IUSE+=" pie"
tc_version_is_at_least 6.0 && IUSE+=" pie +ssp"
fi

IUSE+=" ${IUSE_DEF[*]/#/+}"
Expand Down Expand Up @@ -1193,7 +1193,11 @@ toolchain_src_configure() {
fi

if tc_version_is_at_least 6.0 ; then
confgcc+=( $(use_enable pie default-pie) )
confgcc+=(
$(use_enable pie default-pie)
# This defaults to -fstack-protector-strong.
$(use_enable ssp default-ssp)
)
fi

# Disable gcc info regeneration -- it ships with generated info pages
Expand Down

0 comments on commit 5bd3e5a

Please sign in to comment.