configure: build with -fstack-protector-strong if supported.

This commit is contained in:
Juan RP 2014-12-28 03:36:40 +01:00
parent b513a5e15e
commit b1b0264a4e
2 changed files with 10 additions and 7 deletions

3
NEWS
View File

@ -1,5 +1,8 @@
xbps-0.43 (???): xbps-0.43 (???):
* configure: build with -fstack-protector-strong if supported by the compiler,
and fallback to -fstack-protector-all otherwise.
* xbps-pkgdb(8): the `packaged-with` string obj is removed from pkgdb. * xbps-pkgdb(8): the `packaged-with` string obj is removed from pkgdb.
Since 0.42 that object is unnecessary and is being obsoleted. Since 0.42 that object is unnecessary and is being obsoleted.

14
configure vendored
View File

@ -269,15 +269,15 @@ done
check_compiler_flag PIC f CFLAGS check_compiler_flag PIC f CFLAGS
check_compiler_flag "inline-functions" f CFLAGS check_compiler_flag "inline-functions" f CFLAGS
check_compiler_flag stack-protector-all f CFLAGS check_compiler_flag stack-protector-strong f CFLAGS
if [ $? -eq 0 ]; then if [ $? -ne 0 ]; then
if [ "$CC" = "gcc" ]; then check_compiler_flag stack-protector-all f CFLAGS
check_compiler_flag "param ssp-buffer-size=1" - CFLAGS if [ $? -eq 0 ]; then
if [ "$CC" = "gcc" ]; then
check_compiler_flag "param ssp-buffer-size=1" - CFLAGS
fi
fi fi
fi fi
if [ $? -eq 0 ]; then
echo "CPPFLAGS += -D_FORTIFY_SOURCE=2" >>$CONFIG_MK
fi
check_compiler_flag "visibility=default" f SHAREDLIB_CFLAGS check_compiler_flag "visibility=default" f SHAREDLIB_CFLAGS
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
HAVE_VISIBILITY=yes HAVE_VISIBILITY=yes