@@ -536,7 +536,6 @@ In your shell, move to this directory: `cd exports`.
536536To build OpenBLAS for Android, you will need the following tools installed on your machine:
537537
538538- [The Android NDK](https:// developer.android.com/ ndk/ )
539- - Perl
540539- Clang compiler on the build machine
541540
542541The next two sections below describe how to build with Clang for ARMV7 and
@@ -578,7 +577,9 @@ utility in the make command above, like so:
578577AR=${NDK_BUNDLE_DIR} / toolchains/ arm- linux- androideabi- 4 .9 / prebuilt/ darwin- x86 _64 / bin/ arm- linux- androideabi- gcc- ar
579578```
580579otherwise you may get a linker error complaining like `malformed archive header
581- name at 8 ` when the native macOS `ar` command was invoked instead.
580+ name at 8 ` when the native macOS `ar` command was invoked instead. Note that
581+ with recent NDK versions, the AR tool may be named `llvm-ar` rather than what
582+ is assumed above.
582583
583584
584585#### Building for ARMV8
@@ -608,12 +609,17 @@ Note: for NDK 23b, something as simple as:
608609export PATH=/opt/android-ndk-r23 b/toolchains/llvm/prebuilt/linux-x86 _64 /bin/:$PATH
609610make HOSTCC=gcc CC=/opt/android-ndk-r23 b/toolchains/llvm/prebuilt/linux-x86 _64 /bin/aarch64 -linux-android31 -clang ONLY_CBLAS=1 TARGET=ARMV8
610611```
611- appears to be sufficient on Linux.
612+ appears to be sufficient on Linux. On OSX, setting AR to the ar provided in the
613+ "bin" path of the NDK (probably `llvm-ar`) is also necessary.
612614
613615
614616??? note "Alternative build script for 3 architectures"
615617
616- This script will build OpenBLAS for 3 architecture (`ARMV7 `, `ARMV8 `, `X86 `) and install them to `/opt/OpenBLAS/lib`.
618+ This script will build OpenBLAS for 3 architecture (`ARMV7 `, `ARMV8 `,
619+ `X86 `) and install them to `/opt/OpenBLAS/lib`. Of course you can also copy
620+ only the section that is of interest to you - also notice that the `AR=`
621+ line may need adapting to the name of the ar tool provided in your
622+ `$TOOLCHAIN /bin` - for example `llvm-ar` in some recent NDK versions.
617623 It was tested on macOS with NDK version 21 .3 .6528147 .
618624
619625 ```bash
0 commit comments