summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2023-01-20 16:35:09 -0600
committerWilliam Hubbs <williamh@gentoo.org>2023-01-20 16:38:25 -0600
commitf4dade77c0882aab06f35f8db1154d0a52f0ba1b (patch)
treeab7e65dc72d51eaba0f5c7da2f55c26053abb3ce /eclass
parent*/*: Deproxify arsen@aarsen.me (diff)
downloadgentoo-f4dade77c0882aab06f35f8db1154d0a52f0ba1b.tar.gz
gentoo-f4dade77c0882aab06f35f8db1154d0a52f0ba1b.tar.bz2
gentoo-f4dade77c0882aab06f35f8db1154d0a52f0ba1b.zip
go-module.eclass: add -buildmode=pie
Bug: https://bugs.gentoo.org/702598 Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/go-module.eclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass
index 10ed475c5b11..6b1038f46d31 100644
--- a/eclass/go-module.eclass
+++ b/eclass/go-module.eclass
@@ -1,4 +1,4 @@
-# Copyright 2019-2022 Gentoo Authors
+# Copyright 2019-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: go-module.eclass
@@ -95,11 +95,12 @@ export GOCACHE="${T}/go-build"
export GOMODCACHE="${WORKDIR}/go-mod"
# The following go flags should be used for all builds.
+# -buildmode=pie builds position independent executables
# -buildvcs=false omits version control information
# -modcacherw makes the build cache read/write
# -v prints the names of packages as they are compiled
# -x prints commands as they are executed
-export GOFLAGS="-buildvcs=false -modcacherw -v -x"
+export GOFLAGS="-buildmod=pie -buildvcs=false -modcacherw -v -x"
# Do not complain about CFLAGS etc since go projects do not use them.
QA_FLAGS_IGNORED='.*'