Configurations/15-android.conf: refine clang support.

Adjusting ARM default broke clang support, and x86[_64] needed
path adjustment.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5613)
This commit is contained in:
Andy Polyakov 2018-03-14 09:45:31 +01:00
parent 6d5e74f3fc
commit f41c8674c4
1 changed files with 6 additions and 3 deletions

View File

@ -76,10 +76,13 @@
if (which("clang") !~ m|^$ndk/.*/prebuilt/([^/]+)/|) { if (which("clang") !~ m|^$ndk/.*/prebuilt/([^/]+)/|) {
die "no NDK clang on \$PATH"; die "no NDK clang on \$PATH";
} }
my $host=$1;
# harmonize with gcc default # harmonize with gcc default
(my $tridefault = $triarch) =~ s|^arm-|armv5te-|; (my $tridefault = $triarch) =~ s/^arm-/armv5te-/;
$cflags .= " -target $tridefault -gcc-toolchain " (my $tritools = $triarch) =~ s/(?:x|i6)86(_64)?-.*/x86$1/;
. "\$(ANDROID_NDK)/toolchains/$triarch-4.9/prebuilt/$1"; $cflags .= " -target $tridefault "
. "-gcc-toolchain \$(ANDROID_NDK)/toolchains"
. "/$tritools-4.9/prebuilt/$host";
$user{CROSS_COMPILE} = undef; $user{CROSS_COMPILE} = undef;
} else { } else {
$cflags .= " -mandroid"; $cflags .= " -mandroid";