Skip to content

Commit 8eaf4d1

Browse files
committed
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 <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Go Bot <[email protected]>
1 parent 63b968f commit 8eaf4d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/make.bash

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ if [ "$(uname -s)" = "GNU/kFreeBSD" ]; then
130130
export CGO_ENABLED=0
131131
fi
132132

133-
# Test which linker/loader our system is using
134-
if type readelf >/dev/null 2>&1; then
133+
# Test which linker/loader our system is using, if GO_LDSO is not set.
134+
if [ -z "$GO_LDSO" ] && type readelf >/dev/null 2>&1; then
135135
if echo "int main() { return 0; }" | ${CC:-cc} -o ./test-musl-ldso -x c - >/dev/null 2>&1; then
136136
LDSO=$(readelf -l ./test-musl-ldso | grep 'interpreter:' | sed -e 's/^.*interpreter: \(.*\)[]]/\1/') >/dev/null 2>&1
137137
[ -z "$LDSO" ] || export GO_LDSO="$LDSO"

0 commit comments

Comments
 (0)