Lines Matching +full:mostly +full:- +full:generic
3 # See NOTES-Android.md for details, and don't miss platform-specific
11 arm => "arm-linux-androideabi",
12 arm64 => "aarch64-linux-android",
13 mips => "mipsel-linux-android",
14 mips64 => "mips64el-linux-android",
15 riscv64 => "riscv64-linux-android",
16 x86 => "i686-linux-android",
17 x86_64 => "x86_64-linux-android",
34 my $is_standalone_toolchain = -f "$ndk/AndroidVersion.txt";
36 my $is_ndk = -f $ndk_src_props;
47 if (m|Pkg\.Revision\s*=\s*([0-9]+)|) {
57 $config{target} =~ m|[^-]+-([^-]+)$|; # split on dash
61 $sysroot =~ m|/android-([0-9]+)/arch-(\w+)/?$|;
68 # see if user passed -D__ANDROID_API__=N
70 if (m|__ANDROID_API__=([0-9]+)|) {
76 if (-d "$ndk/platforms") {
78 my @platforms = sort { $a =~ m/-([0-9]+)$/; my $aa = $1;
79 $b =~ m/-([0-9]+)$/; $aa <=> $1;
80 } glob("$ndk/platforms/android-$api");
81 die "no $ndk/platforms/android-$api" if ($#platforms < 0);
83 $sysroot = "@platforms[$#platforms]/arch-$arch";
84 $sysroot =~ m|/android-([0-9]+)/arch-$arch|;
100 die "no sysroot=$sysroot" if (length $sysroot && !-d $sysroot);
111 (my $tridefault = $triarch) =~ s/^arm-/$arm-/;
112 (my $tritools = $triarch) =~ s/(?:x|i6)86(_64)?-.*/x86$1/;
114 $cflags .= " -target $tridefault "
115 . "-gcc-toolchain \$($ndk_var)/toolchains"
116 . "/$tritools-4.9/prebuilt/$host";
119 $user{CC} = "$tridefault$api-clang";
122 if (which("llvm-ar") =~ m|^$ndk/.*/prebuilt/([^/]+)/|) {
123 $user{AR} = "llvm-ar";
134 if (which("$triarch-$cc") !~ m|^$ndk|) {
135 die "no NDK $triarch-$cc on \$PATH";
138 $user{CROSS_COMPILE} = "$triarch-";
142 if (which("$triarch-gcc") !~ m|^$ndk/.*/prebuilt/([^/]+)/|) {
143 die "no NDK $triarch-gcc on \$PATH";
145 $cflags .= " -mandroid";
146 $user{CROSS_COMPILE} = "$triarch-";
150 if (!-d "$sysroot/usr/include") {
152 die "no $incroot" if (!-d $incroot);
153 die "no $incroot/$triarch" if (!-d "$incroot/$triarch");
155 $cppflags = "-D__ANDROID_API__=$api";
156 $cppflags .= " -isystem \$($ndk_var)/$incroot/$triarch";
157 $cppflags .= " -isystem \$($ndk_var)/$incroot";
160 $sysroot = " --sysroot=\$($ndk_var)/$sysroot";
176 inherit_from => [ "linux-generic32" ],
179 # Special note about -pie. The underlying reason is that
180 # Lollipop refuses to run non-PIE. But what about older systems
181 # and NDKs? -fPIC was never problem, so the only concern is -pie.
183 # turn out mostly functional. "Mostly" means that oldest
188 cflags => add(sub { android_ndk()->{cflags} }),
189 cppflags => add(sub { android_ndk()->{cppflags} }),
190 cxxflags => add(sub { android_ndk()->{cflags} }),
191 bn_ops => sub { android_ndk()->{bn_ops} },
192 bin_cflags => "-fPIE",
193 bin_lflags => "-pie",
197 "android-arm" => {
201 # them there is "place" for two ARM flavours: generic eabi and
202 # armv7-a/hard-float. However, it should be noted that OpenSSL's
205 # compiled with floating-point ABI other than default 'soft'.
209 # itself benefits from NEON or is floating-point intensive, then
211 # just generic eabi would do. But in latter case it would be
214 # ./Configure android-arm -D__ARM_MAX_ARCH__=8
219 # Keep in mind that (just like with linux-armv4) we rely on
222 # -march and/or -mfloat-abi flags. NDK defaults to armv5te.
223 # Newer NDK versions reportedly require additional -latomic.
230 "android-arm64" => {
237 "android-mips" => {
243 "android-mips64" => {
259 "android-x86" => {
261 CFLAGS => add(picker(release => "-fomit-frame-pointer")),
265 ex_libs => add(threads("-latomic")),
267 "android-x86_64" => {
274 "android-riscv64" => {
283 "android-armeabi" => {
284 inherit_from => [ "android-arm" ],
289 "android64-aarch64" => {
290 inherit_from => [ "android-arm64" ],
292 "android64-x86_64" => {
293 inherit_from => [ "android-x86_64" ],
295 "android64-mips64" => {
296 inherit_from => [ "android-mips64" ],