aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/make.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/make.bash b/src/make.bash
index 4fb13f6275..f5e1b60bd5 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -130,8 +130,8 @@ if [ "$(uname -s)" = "GNU/kFreeBSD" ]; then
export CGO_ENABLED=0
fi
-# Test which linker/loader our system is using
-if type readelf >/dev/null 2>&1; then
+# Test which linker/loader our system is using, if GO_LDSO is not set.
+if [ -z "$GO_LDSO" ] && type readelf >/dev/null 2>&1; then
if echo "int main() { return 0; }" | ${CC:-cc} -o ./test-musl-ldso -x c - >/dev/null 2>&1; then
LDSO=$(readelf -l ./test-musl-ldso | grep 'interpreter:' | sed -e 's/^.*interpreter: \(.*\)[]]/\1/') >/dev/null 2>&1
[ -z "$LDSO" ] || export GO_LDSO="$LDSO"