From 0ab9d5b621d0db23313f07c542a953a8cd7e98e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Sat, 5 Feb 2022 14:32:02 +0100 Subject: [PATCH] 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. --- abuild.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abuild.conf b/abuild.conf index 4ff34f1..a89aca0 100644 --- a/abuild.conf +++ b/abuild.conf @@ -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"