abuild.conf: add -modcacherw to default Go build flags

By default, the Go module cache is read-only. This become a problem
when cleaning up the build directory from within abuild. For this
reason, many existing aports for Go software employ one of the following
solutions: (1) passing -modcacherw manually (2) setting the chmod-clean
option or (3) overwriting default_cleanup_srcdir. By solving this
problem globally we make it easier to create packages for Go software
and ensure consistency in regards to cleaning the module cache.
This commit is contained in:
Sören Tempel 2022-02-05 14:32:02 +01:00 committed by Natanael Copa
parent b69e0230d0
commit 0ab9d5b621

View File

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