aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorKevin Daudt <kdaudt@alpinelinux.org>2021-03-03 06:35:13 +0000
committerKevin Daudt <kdaudt@alpinelinux.org>2021-03-03 06:37:39 +0000
commit4b871b08841759fc72b2df7f5f63b62c04eea986 (patch)
treebd995f5874fed7a1e777b5fdc965f1f593c4a9fc /community
parent0c5145247dfb4ffee09e75319e89544ab54d25af (diff)
community/mongodb-tools: fix buildmode=pie for mips64
The buildscript hardcodes -buildmode=pie when built on linux. This does not work on mips64. Because we control this with GOFLAGS, just remove the buildflags.
Diffstat (limited to 'community')
-rw-r--r--community/mongodb-tools/APKBUILD10
-rw-r--r--community/mongodb-tools/remove-buildflags.patch15
2 files changed, 18 insertions, 7 deletions
diff --git a/community/mongodb-tools/APKBUILD b/community/mongodb-tools/APKBUILD
index f9f77f8728c..7da89583584 100644
--- a/community/mongodb-tools/APKBUILD
+++ b/community/mongodb-tools/APKBUILD
@@ -11,15 +11,10 @@ makedepends="$depends_dev go cyrus-sasl-dev openssl-dev libpcap-dev bash perl"
options="!check"
source="$pkgname-$pkgver.tar.gz::https://github.com/mongodb/mongo-tools/archive/r$pkgver.tar.gz
fix-build.patch
+ remove-buildflags.patch
"
builddir="$srcdir/src/github.com/mongodb/mongo-tools"
-case $CARCH in
- mips64)
- export GOFLAGS="${GOFLAGS/-buildmode=pie}" # buildmode=pie is not supported on mips64
- ;;
-esac
-
export GO111MODULE=auto
prepare() {
@@ -42,4 +37,5 @@ package() {
}
sha512sums="d8852865b9c0a05a8fbe8866bd8143dc79caeb751af1d79c24443cafbac596a5803e1734b94c9caa2355007bbb3f621a3ea6bf0b201009752a62562f1d9874a6 mongodb-tools-4.2.9.tar.gz
-74e432b354fd75209b87461e54f79a173ba0d647a2e45a48d520ee9342236b6a50ef1c634312f4804402578b8534d59ebf10973ce90cae2bbe76407102f2b404 fix-build.patch"
+74e432b354fd75209b87461e54f79a173ba0d647a2e45a48d520ee9342236b6a50ef1c634312f4804402578b8534d59ebf10973ce90cae2bbe76407102f2b404 fix-build.patch
+52d1fe25cd0c44331fac7320d3d77d8a72dee18ccace4f301a01ce9f6fda8e6daa0334a4b62fc8c9c8bc791717fd25fe2e3a4550d9d4f66367b63937d2bdc8ac remove-buildflags.patch"
diff --git a/community/mongodb-tools/remove-buildflags.patch b/community/mongodb-tools/remove-buildflags.patch
new file mode 100644
index 00000000000..46ac171597e
--- /dev/null
+++ b/community/mongodb-tools/remove-buildflags.patch
@@ -0,0 +1,15 @@
+Description: buildflags only set -buildmode=pie on linux, which we control with
+GOFLAGS. -buildmode=pie is not supported on mips.
+diff --git a/build.sh b/build.sh
+index 519f9c8..c96ed9c 100755
+--- a/build.sh
++++ b/build.sh
+@@ -29,7 +29,7 @@ mkdir -p bin
+ ec=0
+ for i in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop mongoreplay; do
+ echo "Building ${i}..."
+- go build -o "bin/$i$BINARY_EXT" $(buildflags) -ldflags "$(print_ldflags)" -tags "$(print_tags $tags)" "$i/main/$i.go" || { echo "Error building $i"; ec=1; break; }
++ go build -o "bin/$i$BINARY_EXT" -ldflags "$(print_ldflags)" -tags "$(print_tags $tags)" "$i/main/$i.go" || { echo "Error building $i"; ec=1; break; }
+ ./bin/${i}${BINARY_EXT} --version | head -1
+ done
+