From: Andy Polyakov Date: Wed, 14 Mar 2018 08:45:31 +0000 (+0100) Subject: Configurations/15-android.conf: refine clang support. X-Git-Tag: OpenSSL_1_1_1-pre3~28 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=f41c8674c481ae32164430e0797979e29896cd77;ds=sidebyside Configurations/15-android.conf: refine clang support. Adjusting ARM default broke clang support, and x86[_64] needed path adjustment. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5613) --- diff --git a/Configurations/15-android.conf b/Configurations/15-android.conf index b524858077..e7c9fa0d1d 100644 --- a/Configurations/15-android.conf +++ b/Configurations/15-android.conf @@ -76,10 +76,13 @@ if (which("clang") !~ m|^$ndk/.*/prebuilt/([^/]+)/|) { die "no NDK clang on \$PATH"; } + my $host=$1; # harmonize with gcc default - (my $tridefault = $triarch) =~ s|^arm-|armv5te-|; - $cflags .= " -target $tridefault -gcc-toolchain " - . "\$(ANDROID_NDK)/toolchains/$triarch-4.9/prebuilt/$1"; + (my $tridefault = $triarch) =~ s/^arm-/armv5te-/; + (my $tritools = $triarch) =~ s/(?:x|i6)86(_64)?-.*/x86$1/; + $cflags .= " -target $tridefault " + . "-gcc-toolchain \$(ANDROID_NDK)/toolchains" + . "/$tritools-4.9/prebuilt/$host"; $user{CROSS_COMPILE} = undef; } else { $cflags .= " -mandroid";