mirror of
https://github.com/pygos/build.git
synced 2024-11-26 04:40:41 +01:00
Add hardening flags to autotools based packages
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
8063550d4e
commit
7b0e1f182c
1 changed files with 4 additions and 0 deletions
|
@ -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" \
|
||||||
|
|
Loading…
Reference in a new issue