mirror of
https://github.com/golang/go
synced 2024-11-26 10:38:07 -07:00
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 <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
63b968f4f8
commit
8eaf4d16bc
@ -130,8 +130,8 @@ if [ "$(uname -s)" = "GNU/kFreeBSD" ]; then
|
|||||||
export CGO_ENABLED=0
|
export CGO_ENABLED=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Test which linker/loader our system is using
|
# Test which linker/loader our system is using, if GO_LDSO is not set.
|
||||||
if type readelf >/dev/null 2>&1; then
|
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
|
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
|
LDSO=$(readelf -l ./test-musl-ldso | grep 'interpreter:' | sed -e 's/^.*interpreter: \(.*\)[]]/\1/') >/dev/null 2>&1
|
||||||
[ -z "$LDSO" ] || export GO_LDSO="$LDSO"
|
[ -z "$LDSO" ] || export GO_LDSO="$LDSO"
|
||||||
|
Loading…
Reference in New Issue
Block a user