diff options
author | Brian Fraser <fraserbn@gmail.com> | 2013-10-11 16:52:48 -0300 |
---|---|---|
committer | Brian Fraser <fraserbn@gmail.com> | 2014-01-17 11:35:46 -0300 |
commit | 083b43b68e72059c75d05f62a6183e677a4a0ace (patch) | |
tree | 1ecb8a420fd3bb7eb7b5ac81b26afc30557d94eb /Configure | |
parent | bda0aa4ad2c2109bf684a899b547be1e4dc44d7b (diff) | |
download | perl-083b43b68e72059c75d05f62a6183e677a4a0ace.tar.gz |
Configure: When cross-compiling, look for *-gcc* instead of *-*-gcc
Ditto with g++. This allows us to use, for example, ntox86-gcc or
x86_64-w64-mingw32-g++.exe to cross-compile, and have Configure detect
most things automatically.
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -2825,12 +2825,14 @@ $define|true|[yY]*) $echo "Cross-compiling..." croak='' case "$cc" in - *-*-gcc) # A cross-compiling gcc, probably. - targetarch=`$echo $cc|$sed 's/-gcc$//'` - ar=$targetarch-ar - # leave out ld, choosing it is more complex - nm=$targetarch-nm - ranlib=$targetarch-ranlib + *-gcc*|*-g++*) # A cross-compiling gcc, probably. + # arm-linux-androideabi-gcc -> arm-linux-androideabi + # x86_64-w64-mingw32-gcc.exe -> x86_64-w64-mingw32 + targetarch=`$echo $cc|$sed 's/-g[c\+][c\+].*$//'` + ar=`$echo $cc|$sed 's/-g[c\+][c\+]/-ar/'` + # 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/'` ;; esac case "$targetarch" in |