mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
Explicitly turn on size optimizations
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
cf2e438a45
commit
e87a8ec43c
10 changed files with 30 additions and 30 deletions
|
@ -12,12 +12,12 @@ prepare() {
|
||||||
build() {
|
build() {
|
||||||
cp -r ${1}/* ${PKGBUILDDIR}
|
cp -r ${1}/* ${PKGBUILDDIR}
|
||||||
|
|
||||||
local cflags=""
|
local cflags="-O2 -Os"
|
||||||
local ldflags=""
|
local ldflags=""
|
||||||
|
|
||||||
if [ "x$TC_HARDENING" = "xyes" ]; then
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
||||||
cflags="-fstack-protector-all"
|
cflags="$cflags -fstack-protector-all"
|
||||||
ldflags="-z noexecstack -z relro -z now"
|
ldflags="$ldflags -z noexecstack -z relro -z now"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
make CFLAGS="-Wall -Winline -O2 -D_FILE_OFFSET_BITS=64 $cflags" \
|
make CFLAGS="-Wall -Winline -O2 -D_FILE_OFFSET_BITS=64 $cflags" \
|
||||||
|
|
|
@ -12,12 +12,12 @@ prepare() {
|
||||||
build() {
|
build() {
|
||||||
cp -r ${1}/* ${PKGBUILDDIR}
|
cp -r ${1}/* ${PKGBUILDDIR}
|
||||||
|
|
||||||
local cflags=""
|
local cflags="-O2 -Os"
|
||||||
local ldflags=""
|
local ldflags=""
|
||||||
|
|
||||||
if [ "x$TC_HARDENING" = "xyes" ]; then
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
||||||
cflags="-fstack-protector-all"
|
cflags="$cflags -fstack-protector-all"
|
||||||
ldflags="-z noexecstack -z relro -z now"
|
ldflags="$ldflags -z noexecstack -z relro -z now"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CFLAGS="-O2 $cflags" \
|
CFLAGS="-O2 $cflags" \
|
||||||
|
|
|
@ -13,12 +13,12 @@ build() {
|
||||||
cp -r ${1}/* ${PKGBUILDDIR}
|
cp -r ${1}/* ${PKGBUILDDIR}
|
||||||
cp "$SCRIPTDIR/pkg/$PKGNAME/config" "$PKGBUILDDIR/hostapd/.config"
|
cp "$SCRIPTDIR/pkg/$PKGNAME/config" "$PKGBUILDDIR/hostapd/.config"
|
||||||
|
|
||||||
local cflags=""
|
local cflags="-O2 -Os"
|
||||||
local ldflags=""
|
local ldflags=""
|
||||||
|
|
||||||
if [ "x$TC_HARDENING" = "xyes" ]; then
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
||||||
cflags="-fstack-protector-all"
|
cflags="$cflags -fstack-protector-all"
|
||||||
ldflags="-z noexecstack -z relro -z now"
|
ldflags="$ldflags -z noexecstack -z relro -z now"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PKG_CONFIG_SYSROOT_DIR="$TCDIR/$TARGET" \
|
PKG_CONFIG_SYSROOT_DIR="$TCDIR/$TARGET" \
|
||||||
|
|
|
@ -12,12 +12,12 @@ prepare() {
|
||||||
build() {
|
build() {
|
||||||
cp -r ${1}/* ${PKGBUILDDIR}
|
cp -r ${1}/* ${PKGBUILDDIR}
|
||||||
|
|
||||||
local cflags=""
|
local cflags="-O2 -Os"
|
||||||
local ldflags=""
|
local ldflags=""
|
||||||
|
|
||||||
if [ "x$TC_HARDENING" = "xyes" ]; then
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
||||||
cflags="-fstack-protector-all"
|
cflags="$cflags -fstack-protector-all"
|
||||||
ldflags="-z noexecstack -z relro -z now"
|
ldflags="$ldflags -z noexecstack -z relro -z now"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
make CCOPTS="-O2 $cflags" LDFLAGS="$ldflags" \
|
make CCOPTS="-O2 $cflags" LDFLAGS="$ldflags" \
|
||||||
|
|
|
@ -12,12 +12,12 @@ prepare() {
|
||||||
build() {
|
build() {
|
||||||
cp -r ${1}/* ${PKGBUILDDIR}
|
cp -r ${1}/* ${PKGBUILDDIR}
|
||||||
|
|
||||||
local cflags=""
|
local cflags="-O2 -Os"
|
||||||
local ldflags=""
|
local ldflags=""
|
||||||
|
|
||||||
if [ "x$TC_HARDENING" = "xyes" ]; then
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
||||||
cflags="-fstack-protector-all"
|
cflags="$cflags -fstack-protector-all"
|
||||||
ldflags="-z noexecstack -z relro -z now"
|
ldflags="$ldflags -z noexecstack -z relro -z now"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CFLAGS="-O2 $cflags" \
|
CFLAGS="-O2 $cflags" \
|
||||||
|
|
|
@ -10,12 +10,12 @@ prepare() {
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
local cflags=""
|
local cflags="-O2 -Os"
|
||||||
local ldflags=""
|
local ldflags=""
|
||||||
|
|
||||||
if [ "x$TC_HARDENING" = "xyes" ]; then
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
||||||
cflags="-fPIE -fPIC -fstack-protector-all"
|
cflags="$cflags -fPIE -fPIC -fstack-protector-all"
|
||||||
ldflags="-z noexecstack -z relro -z now"
|
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}-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
|
${TARGET}-ar r libssp_nonshared.a __stack_chk_fail_local.o
|
||||||
|
|
|
@ -12,12 +12,12 @@ prepare() {
|
||||||
build() {
|
build() {
|
||||||
cp -r ${1}/* ${PKGBUILDDIR}
|
cp -r ${1}/* ${PKGBUILDDIR}
|
||||||
|
|
||||||
local cflags=""
|
local cflags="-O2 -Os"
|
||||||
local ldflags=""
|
local ldflags=""
|
||||||
|
|
||||||
if [ "x$TC_HARDENING" = "xyes" ]; then
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
||||||
cflags="-fstack-protector-all"
|
cflags="$cflags -fstack-protector-all"
|
||||||
ldflags="-z noexecstack -z relro -z now"
|
ldflags="$ldflags -z noexecstack -z relro -z now"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./configure --prefix="" --sbin-path=/bin/nginx \
|
./configure --prefix="" --sbin-path=/bin/nginx \
|
||||||
|
|
|
@ -11,12 +11,12 @@ prepare() {
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
local OPENSSL_TARGET=""
|
local OPENSSL_TARGET=""
|
||||||
local cflags=""
|
local cflags="-O2 -Os"
|
||||||
local ldflags=""
|
local ldflags=""
|
||||||
|
|
||||||
if [ "x$TC_HARDENING" = "yes" ]; then
|
if [ "x$TC_HARDENING" = "yes" ]; then
|
||||||
cflags="-fstack-protector-all"
|
cflags="$cflags -fstack-protector-all"
|
||||||
ldflags="-z noexecstack -z relro -z now"
|
ldflags="$ldflags -z noexecstack -z relro -z now"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$TARGET" in
|
case "$TARGET" in
|
||||||
|
|
|
@ -10,12 +10,12 @@ prepare() {
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
local cflags=""
|
local cflags="-O2 -Os"
|
||||||
local ldflags=""
|
local ldflags=""
|
||||||
|
|
||||||
if [ "x$TC_HARDENING" = "xyes" ]; then
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
||||||
cflags="-fstack-protector-all"
|
cflags="$cflags -fstack-protector-all"
|
||||||
ldflags="-z noexecstack -z relro -z now"
|
ldflags="$ldflags -z noexecstack -z relro -z now"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CFLAGS="$cflags" LDFLAGS="$ldflags" \
|
CFLAGS="$cflags" LDFLAGS="$ldflags" \
|
||||||
|
|
|
@ -2,12 +2,12 @@ run_configure() {
|
||||||
local srcdir="$1"
|
local srcdir="$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
local cflags=""
|
local cflags="-O2 -Os"
|
||||||
local ldflags=""
|
local ldflags=""
|
||||||
|
|
||||||
if [ "x$TC_HARDENING" = "xyes" ]; then
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
||||||
cflags="-fstack-protector-all"
|
cflags="$cflags -fstack-protector-all"
|
||||||
ldflags="-z noexecstack -z relro -z now"
|
ldflags="$ldflags -z noexecstack -z relro -z now"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ac_cv_func_malloc_0_nonnull=yes \
|
ac_cv_func_malloc_0_nonnull=yes \
|
||||||
|
|
Loading…
Reference in a new issue