From 4e548b722b55714dc1888f1df3a549bca0782081 Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Sat, 9 Jan 2021 21:34:19 +0000 Subject: [PATCH] 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 --- abuild.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abuild.conf b/abuild.conf index 9c4401d..fc61f26 100644 --- a/abuild.conf +++ b/abuild.conf @@ -1,7 +1,7 @@ export CFLAGS="-Os -fomit-frame-pointer" export CXXFLAGS="$CFLAGS" export CPPFLAGS="$CFLAGS" -export LDFLAGS="-Wl,--as-needed" +export LDFLAGS="-Wl,--as-needed,-O1,--sort-common" export GOFLAGS="-buildmode=pie" # Do note that these should work with at least GDC and LDC export DFLAGS="-Os"