* config.guess (set_cc_for_build): Prevent multiple calls by

chechking if $tmp is already set. We can't check CC_FOR_BUILD as
	the user may set it externally. Thanks to Torbjörn Granlund for
	the bug report.
This commit is contained in:
Ben Elliston 2019-12-21 13:01:01 +11:00
parent 6f5b719255
commit c542caa003
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2019-12-21 Ben Elliston <bje@gnu.org>
* config.guess (set_cc_for_build): Prevent multiple calls by
chechking if $tmp is already set. We can't check CC_FOR_BUILD as
the user may set it externally. Thanks to Torbjörn Granlund for
the bug report.
2019-12-21 Torbjörn Granlund <tg@gmplib.org>
* config.guess (alpha:Linux:*:*): Guard against missing

2
config.guess vendored
View File

@ -99,6 +99,8 @@ tmp=
trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
set_cc_for_build() {
# prevent multiple calls if $tmp is already set
test "$tmp" && return 0
: "${TMPDIR=/tmp}"
# shellcheck disable=SC2039
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||