summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2013-11-19 09:16:11 -0300
committerBrian Fraser <fraserbn@gmail.com>2014-01-17 11:35:47 -0300
commitade92af68a1edb93c9aac771aa8b9c46f26a0137 (patch)
tree44af7e5532e21978801271c77d053905aaec9081 /Configure
parent50e1d4f091dcc940a462769c13fcf873cc4ede52 (diff)
downloadperl-ade92af68a1edb93c9aac771aa8b9c46f26a0137.tar.gz
Configure: If using targetarch, the computed binaries should stick
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure13
1 files changed, 12 insertions, 1 deletions
diff --git a/Configure b/Configure
index cb44b33a9b..47017b2f7b 100755
--- a/Configure
+++ b/Configure
@@ -2836,7 +2836,18 @@ $define|true|[yY]*)
# leave out ld, choosing it is more complex
nm=`$echo $cc|$sed 's/-g[c\+][c\+]/-nm/'`
ranlib=`$echo $cc|$sed 's/-g[c\+][c\+]/-ranlib/'`
- ;;
+ # We are in a weird spot. Just before us, some values
+ # were 'saved', to be restored after the hints are
+ # run. This means that the changes we made to ar,
+ # nm and ranlib will get reverted.
+ # To avoid that, we hijack the saving mechanism and
+ # have it save our new values.
+ for file in ar nm ranlib; do
+ eval xxx=\$$file
+ eval $file=$xxx$_exe
+ eval _$file=$xxx
+ done
+ ;;
esac
case "$targetarch" in
'') echo "Targetarch not defined." >&4; croak=y ;;