diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2019-03-17 17:03:59 +0100 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2020-04-17 13:16:42 +0200 |
commit | dcb7ec0c6b11a51c76ded5926f53530cc4c8b690 (patch) | |
tree | cfc0b8d519a8cec285b21912983db284590f1306 | |
parent | 3ea72b0a9ec5726c20ce653e0e09e3116d455ef0 (diff) | |
download | abuild-dcb7ec0c6b11a51c76ded5926f53530cc4c8b690.tar.bz2 abuild-dcb7ec0c6b11a51c76ded5926f53530cc4c8b690.tar.xz |
abuild.conf: enable PIE binaries by default for go as well
From `go help environment`:
GOFLAGS
A space-separated list of -flag=value settings to apply
to go commands by default, when the given flag is known by
the current command. Flags listed on the command-line
are applied after this list and therefore override it.
And from `go help build`:
-buildmode mode
build mode to use. See 'go help buildmode' for more.
Setting this environment variable in /etc/abuild.conf allows us to build
all go binaries on the builders as PIE without needing to patch the go
compiler itself.
-rw-r--r-- | abuild.conf | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/abuild.conf b/abuild.conf index 6721e7f..c00e31b 100644 --- a/abuild.conf +++ b/abuild.conf @@ -2,6 +2,7 @@ export CFLAGS="-Os -fomit-frame-pointer" export CXXFLAGS="$CFLAGS" export CPPFLAGS="$CFLAGS" export LDFLAGS="-Wl,--as-needed" +export GOFLAGS="-buildmode=pie" export JOBS=2 export MAKEFLAGS=-j$JOBS |