1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-05-13 17:26:13 +02:00

Explicitly turn on size optimizations

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-10-20 19:27:23 +02:00
parent cf2e438a45
commit e87a8ec43c
10 changed files with 30 additions and 30 deletions

View file

@ -12,12 +12,12 @@ prepare() {
build() {
cp -r ${1}/* ${PKGBUILDDIR}
local cflags=""
local cflags="-O2 -Os"
local ldflags=""
if [ "x$TC_HARDENING" = "xyes" ]; then
cflags="-fstack-protector-all"
ldflags="-z noexecstack -z relro -z now"
cflags="$cflags -fstack-protector-all"
ldflags="$ldflags -z noexecstack -z relro -z now"
fi
make CFLAGS="-Wall -Winline -O2 -D_FILE_OFFSET_BITS=64 $cflags" \

View file

@ -12,12 +12,12 @@ prepare() {
build() {
cp -r ${1}/* ${PKGBUILDDIR}
local cflags=""
local cflags="-O2 -Os"
local ldflags=""
if [ "x$TC_HARDENING" = "xyes" ]; then
cflags="-fstack-protector-all"
ldflags="-z noexecstack -z relro -z now"
cflags="$cflags -fstack-protector-all"
ldflags="$ldflags -z noexecstack -z relro -z now"
fi
CFLAGS="-O2 $cflags" \

View file

@ -13,12 +13,12 @@ build() {
cp -r ${1}/* ${PKGBUILDDIR}
cp "$SCRIPTDIR/pkg/$PKGNAME/config" "$PKGBUILDDIR/hostapd/.config"
local cflags=""
local cflags="-O2 -Os"
local ldflags=""
if [ "x$TC_HARDENING" = "xyes" ]; then
cflags="-fstack-protector-all"
ldflags="-z noexecstack -z relro -z now"
cflags="$cflags -fstack-protector-all"
ldflags="$ldflags -z noexecstack -z relro -z now"
fi
PKG_CONFIG_SYSROOT_DIR="$TCDIR/$TARGET" \

View file

@ -12,12 +12,12 @@ prepare() {
build() {
cp -r ${1}/* ${PKGBUILDDIR}
local cflags=""
local cflags="-O2 -Os"
local ldflags=""
if [ "x$TC_HARDENING" = "xyes" ]; then
cflags="-fstack-protector-all"
ldflags="-z noexecstack -z relro -z now"
cflags="$cflags -fstack-protector-all"
ldflags="$ldflags -z noexecstack -z relro -z now"
fi
make CCOPTS="-O2 $cflags" LDFLAGS="$ldflags" \

View file

@ -12,12 +12,12 @@ prepare() {
build() {
cp -r ${1}/* ${PKGBUILDDIR}
local cflags=""
local cflags="-O2 -Os"
local ldflags=""
if [ "x$TC_HARDENING" = "xyes" ]; then
cflags="-fstack-protector-all"
ldflags="-z noexecstack -z relro -z now"
cflags="$cflags -fstack-protector-all"
ldflags="$ldflags -z noexecstack -z relro -z now"
fi
CFLAGS="-O2 $cflags" \

View file

@ -10,12 +10,12 @@ prepare() {
}
build() {
local cflags=""
local cflags="-O2 -Os"
local ldflags=""
if [ "x$TC_HARDENING" = "xyes" ]; then
cflags="-fPIE -fPIC -fstack-protector-all"
ldflags="-z noexecstack -z relro -z now"
cflags="$cflags -fPIE -fPIC -fstack-protector-all"
ldflags="$ldflags -z noexecstack -z relro -z now"
${TARGET}-gcc -c "$SCRIPTDIR/pkg/$PKGNAME/__stack_chk_fail_local.c" -o __stack_chk_fail_local.o
${TARGET}-ar r libssp_nonshared.a __stack_chk_fail_local.o

View file

@ -12,12 +12,12 @@ prepare() {
build() {
cp -r ${1}/* ${PKGBUILDDIR}
local cflags=""
local cflags="-O2 -Os"
local ldflags=""
if [ "x$TC_HARDENING" = "xyes" ]; then
cflags="-fstack-protector-all"
ldflags="-z noexecstack -z relro -z now"
cflags="$cflags -fstack-protector-all"
ldflags="$ldflags -z noexecstack -z relro -z now"
fi
./configure --prefix="" --sbin-path=/bin/nginx \

View file

@ -11,12 +11,12 @@ prepare() {
build() {
local OPENSSL_TARGET=""
local cflags=""
local cflags="-O2 -Os"
local ldflags=""
if [ "x$TC_HARDENING" = "yes" ]; then
cflags="-fstack-protector-all"
ldflags="-z noexecstack -z relro -z now"
cflags="$cflags -fstack-protector-all"
ldflags="$ldflags -z noexecstack -z relro -z now"
fi
case "$TARGET" in

View file

@ -10,12 +10,12 @@ prepare() {
}
build() {
local cflags=""
local cflags="-O2 -Os"
local ldflags=""
if [ "x$TC_HARDENING" = "xyes" ]; then
cflags="-fstack-protector-all"
ldflags="-z noexecstack -z relro -z now"
cflags="$cflags -fstack-protector-all"
ldflags="$ldflags -z noexecstack -z relro -z now"
fi
CFLAGS="$cflags" LDFLAGS="$ldflags" \

View file

@ -2,12 +2,12 @@ run_configure() {
local srcdir="$1"
shift
local cflags=""
local cflags="-O2 -Os"
local ldflags=""
if [ "x$TC_HARDENING" = "xyes" ]; then
cflags="-fstack-protector-all"
ldflags="-z noexecstack -z relro -z now"
cflags="$cflags -fstack-protector-all"
ldflags="$ldflags -z noexecstack -z relro -z now"
fi
ac_cv_func_malloc_0_nonnull=yes \