Commit e3adfaf
build & ci: update to NDK r27c API level 29
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 #6081
No functional change1 parent bebffc5 commit e3adfaf
File tree
4 files changed
+16
-18
lines changed- .github
- ci
- workflows
- src
4 files changed
+16
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
536 | | - | |
537 | | - | |
538 | | - | |
| 536 | + | |
539 | 537 | | |
540 | | - | |
| 538 | + | |
541 | 539 | | |
542 | 540 | | |
543 | | - | |
| 541 | + | |
544 | 542 | | |
545 | 543 | | |
546 | 544 | | |
| |||
549 | 547 | | |
550 | 548 | | |
551 | 549 | | |
552 | | - | |
| 550 | + | |
553 | 551 | | |
554 | 552 | | |
555 | 553 | | |
556 | 554 | | |
557 | 555 | | |
558 | 556 | | |
559 | 557 | | |
560 | | - | |
| 558 | + | |
561 | 559 | | |
562 | 560 | | |
563 | 561 | | |
564 | 562 | | |
565 | 563 | | |
566 | 564 | | |
567 | | - | |
| 565 | + | |
568 | 566 | | |
569 | 567 | | |
570 | 568 | | |
| |||
0 commit comments