abuild.conf: LDFLAGS+=-O1,--sort-common

These options are used by default in Arch Linux [0], and slightly reduce
binary size.

Note that -D_FORTIFY_SOURCE=2 and -z relro -z now are already enabled by
default in Alpine for all gcc invocations.

[0] https://git.archlinux.org/svntogit/packages.git/tree/trunk/makepkg.conf?h=packages/pacman
This commit is contained in:
Alex Xu (Hello71) 2021-01-09 21:34:19 +00:00 committed by Natanael Copa
parent f523aabce3
commit 4e548b722b

View File

@ -1,7 +1,7 @@
export CFLAGS="-Os -fomit-frame-pointer" export CFLAGS="-Os -fomit-frame-pointer"
export CXXFLAGS="$CFLAGS" export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS" export CPPFLAGS="$CFLAGS"
export LDFLAGS="-Wl,--as-needed" export LDFLAGS="-Wl,--as-needed,-O1,--sort-common"
export GOFLAGS="-buildmode=pie" export GOFLAGS="-buildmode=pie"
# Do note that these should work with at least GDC and LDC # Do note that these should work with at least GDC and LDC
export DFLAGS="-Os" export DFLAGS="-Os"