Skip to content

Commit

Permalink
go-module.eclass: add -buildmode=pie
Browse files Browse the repository at this point in the history
Bug: https://bugs.gentoo.org/702598
Signed-off-by: William Hubbs <[email protected]>
  • Loading branch information
williamh committed Jan 20, 2023
1 parent 7f0d3e6 commit f4dade7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eclass/go-module.eclass
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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='.*'
Expand Down

0 comments on commit f4dade7

Please sign in to comment.