Skip to content

Commit

Permalink
Add support in configuration for android-riscv64
Browse files Browse the repository at this point in the history
Android is enabling support for the riscv64 ISA. Add a configuration
option to support building for it, aligned with the existing
linux-riscv64 configuration.

Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Todd Short <[email protected]>
(Merged from openssl#23427)
  • Loading branch information
prashanthswami authored and t8m committed Feb 5, 2024
1 parent ed0f79c commit 2d32144
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions Configurations/15-android.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
arm64 => "aarch64-linux-android",
mips => "mipsel-linux-android",
mips64 => "mips64el-linux-android",
riscv64 => "riscv64-linux-android",
x86 => "i686-linux-android",
x86_64 => "x86_64-linux-android",
);
Expand Down Expand Up @@ -270,6 +271,12 @@ my %targets = (
perlasm_scheme => "elf",
},

"android-riscv64" => {
inherit_from => [ "android" ],
asm_arch => 'riscv64',
perlasm_scheme => "linux64",
},

####################################################################
# Backward compatible targets, (might) require $CROSS_SYSROOT
#
Expand Down
4 changes: 2 additions & 2 deletions NOTES-ANDROID.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Notes for Android platforms
Android is a cross-compiled target and you can't rely on `./Configure`
to find out the configuration target for you. You have to name your
target explicitly; there are `android-arm`, `android-arm64`, `android-mips`,
`android-mip64`, `android-x86` and `android-x86_64` (`*MIPS` targets are no
longer supported with NDK R20+).
`android-mip64`, `android-x86`, `android-x86_64` and `android-riscv64`
(`*MIPS` targets are no longer supported with NDK R20+).

Do not pass --cross-compile-prefix (as you might be tempted), as it
will be "calculated" automatically based on chosen platform. However,
Expand Down
1 change: 1 addition & 0 deletions util/perl/OpenSSL/config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,7 @@ EOF
cflags => [ '-march=armv7-a' ],
cxxflags => [ '-march=armv7-a' ] } ],
[ 'arm.*-.*-android', { target => "android-armeabi" } ],
[ 'riscv64-.*-android', { target => "android-riscv64" } ],
[ '.*-hpux1.*',
sub {
my $KERNEL_BITS = $ENV{KERNEL_BITS};
Expand Down

0 comments on commit 2d32144

Please sign in to comment.