mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-06 10:53:50 +08:00
Update to the latest LTS version NDK r27c (27.2.12479018), the previous NDK are unsupported by Google, see: https://developer.android.com/ndk/downloads A build with NDK r27c and API level < 29 returns this error: "executable's TLS segment is underaligned: alignment is 8 (skew 0), needs to be at least 64 for ARM64 Bionic" Update the API level to 29 to use the native ELF LTS and avoid the error: https://android.googlesource.com/platform/bionic/+/HEAD/docs/elf-tls.md https://android.googlesource.com/platform/bionic/+/HEAD/android-changes-for-ndk-developers.md#elf-tls-available-for-api-level-29 A dynamic link build of Stockfish uses these libraries: ldd stockfish-android-armv8-dynamic-api35 libm.so => /system/lib64/libm.so libdl.so => /system/lib64/libdl.so libc.so => /system/lib64/libc.so ld-android.so => /system/lib64/ld-android.so ld-android.so : the dynamic linker used by Android (on Linux is named ld-linux.so), responsible for loading and linking shared libraries into an executable at runtime. libdl.so : interface/library layer that provides function for dynamic loading, relies on the underlying functionality provided by the dynamic linker libm.so : math library for Android libc.so : standard C library for Android References: Doc for native (C/C++) API https://developer.android.com/ndk/guides/stable_apis C libraries (libc, libm, libdl): https://developer.android.com/ndk/guides/stable_apis#c_library Bionic changes with API levels: https://android.googlesource.com/platform/bionic/+/HEAD/docs/status.md NDK r27c build system: https://android.googlesource.com/platform/ndk/+/ndk-r27-release/docs/BuildSystemMaintainers.md CI: Update to NDK r27c (27.2.12479018), the default version in GitHub runner, to switch to a recent clang 18. A PGO build requires static linking, because the NDK doesn't ship the Android loaders (linker/linker64), see: https://groups.google.com/g/android-ndk/c/3Ep6zD3xxSY The API level should not be an issue when distributing a static build, use the API 29, the oldest one not affected by the LTS alignement issue. closes https://github.com/official-stockfish/Stockfish/pull/6081 No functional change
52 lines
1.1 KiB
JSON
52 lines
1.1 KiB
JSON
{
|
|
"config": [
|
|
{
|
|
"name": "Android NDK aarch64",
|
|
"os": "ubuntu-22.04",
|
|
"simple_name": "android",
|
|
"compiler": "aarch64-linux-android29-clang++",
|
|
"emu": "qemu-aarch64",
|
|
"comp": "ndk",
|
|
"shell": "bash",
|
|
"archive_ext": "tar"
|
|
},
|
|
{
|
|
"name": "Android NDK arm",
|
|
"os": "ubuntu-22.04",
|
|
"simple_name": "android",
|
|
"compiler": "armv7a-linux-androideabi29-clang++",
|
|
"emu": "qemu-arm",
|
|
"comp": "ndk",
|
|
"shell": "bash",
|
|
"archive_ext": "tar"
|
|
}
|
|
],
|
|
"binaries": ["armv8-dotprod", "armv8", "armv7", "armv7-neon"],
|
|
"exclude": [
|
|
{
|
|
"binaries": "armv8-dotprod",
|
|
"config": {
|
|
"compiler": "armv7a-linux-androideabi29-clang++"
|
|
}
|
|
},
|
|
{
|
|
"binaries": "armv8",
|
|
"config": {
|
|
"compiler": "armv7a-linux-androideabi29-clang++"
|
|
}
|
|
},
|
|
{
|
|
"binaries": "armv7",
|
|
"config": {
|
|
"compiler": "aarch64-linux-android29-clang++"
|
|
}
|
|
},
|
|
{
|
|
"binaries": "armv7-neon",
|
|
"config": {
|
|
"compiler": "aarch64-linux-android29-clang++"
|
|
}
|
|
}
|
|
]
|
|
}
|