]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Configurations/15-android.conf: refine clang support.
authorAndy Polyakov <appro@openssl.org>
Wed, 14 Mar 2018 08:45:31 +0000 (09:45 +0100)
committerAndy Polyakov <appro@openssl.org>
Mon, 19 Mar 2018 13:31:30 +0000 (14:31 +0100)
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)

Configurations/15-android.conf

index b5248580771297657f0de078b8fd4daead18cad3..e7c9fa0d1d51ec5bbab28ec3b73e94e1453af29c 100644 (file)
                 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";