From 8eaf4d16bc69724cd450345cbaf55f2e2aef9b9c Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Fri, 6 Aug 2021 15:37:10 -0400 Subject: make.bash: do not overwrite GO_LDSO if already set Change-Id: I704bdb411bda3d8a40906c12f182e268dca4718f Reviewed-on: https://go-review.googlesource.com/c/go/+/340450 Trust: Cherry Mui Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Go Bot --- src/make.bash | 4 ++-- 1 file 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" -- cgit v1.2.3-54-g00ecf