1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 19:19:46 +01:00

Add hardening flags to autotools based packages

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-10-14 16:55:36 +02:00
parent 8063550d4e
commit 7b0e1f182c

View file

@ -2,8 +2,12 @@ run_configure() {
local srcdir="$1" local srcdir="$1"
shift shift
local cflags="-fstack-protector-all"
local ldflags="-z noexecstack -z relro -z now"
ac_cv_func_malloc_0_nonnull=yes \ ac_cv_func_malloc_0_nonnull=yes \
ac_cv_func_realloc_0_nonnull=yes \ ac_cv_func_realloc_0_nonnull=yes \
CFLAGS="$cflags" LDFLAGS="$ldflags" \
$srcdir/configure --prefix="" --build="$HOSTTUPLE" --host="$TARGET" \ $srcdir/configure --prefix="" --build="$HOSTTUPLE" --host="$TARGET" \
--bindir="/bin" --sbindir="/bin" --sysconfdir="/etc" \ --bindir="/bin" --sbindir="/bin" --sysconfdir="/etc" \
--libexecdir="/lib/libexec" --datarootdir="/share" \ --libexecdir="/lib/libexec" --datarootdir="/share" \