disabling stack smashing protector
Moderator: Forum Moderators
Forum rules
Before reporting issues in this section, you must read the following topic:
Before reporting issues in this section, you must read the following topic:
disabling stack smashing protector
One of my computers has a gentoo install with the stack smashing protector and position independent code compiled into all the libraries by default. I would like to compile wesnoth on it with the -fno-stack-protector-all or -fno-stack-protector compiler options but am not sure how to do this 
I would rather compile it myself than use gentoo.. but I'm not sure where to add the -fno-stack-protector option in the config process.
Any help would be appriciated

I would rather compile it myself than use gentoo.. but I'm not sure where to add the -fno-stack-protector option in the config process.
Any help would be appriciated
Re: disabling stack smashing protector
This should work:qleak wrote:but I'm not sure where to add the -fno-stack-protector option in the config process.
Code: Select all
./configure CXXFLAGS=-fno-stack-protector
-
- Posts: 199
- Joined: May 26th, 2004, 9:38 pm
Persistent and flexible solution for gentoo
Albeit untested for wesnoth as of this posting, this solution works for customizing the environment for other packages. For example:
2) Add the following to the file /etc/portage/env/games-strategy/wesnoth
3) (Re)?Compile wesnoth
- /etc/portage/env/x11-base/x11-drm:VIDEO_CARDS=radeon
/env/media-sound/alsa-driver:ALSA_CARDS=emu10k1
/etc/portage/env/games-strategy/wesnoth:CFLAGS="$CFLAGS -fno-stack-protector"
Code: Select all
for conf in ${PN}-${PV}-${PR} ${PN}-${PV} ${PN}; do
if [[ -f /etc/portage/env/$CATEGORY/${conf} ]]; then
. /etc/portage/env/$CATEGORY/${conf}
break
fi
done
Code: Select all
CFLAGS="${CFLAGS} -fno-stack-protector"
Code: Select all
emerge wesnoth