Includes a few tweaks needed to build bpftools with a recent NDK:
Libcxx prebuilts are no longer included in sources/cxx-stl [1], so use the sysroot path instead.
NDK now defaults to android-legacy.toolchain.cmake [2], irrespective of CMake version. With the legacy toolchain some env variables we set such as LDFLAGS aren't used, leading to build errors. Force the use of new toolchain file and switch to CXXFLAGS as opposed to CMAKE_CXX_FLAGS to avoid overriding toolchain defaults [3].
Test: make NDK_PATH=/opt/ndk/android-ndk-r25c bpftools-min
Includes a few tweaks needed to build bpftools with a recent NDK:
Test: make NDK_PATH=/opt/ndk/android-ndk-r25c bpftools-min
[1] https://android-review.googlesource.com/c/platform/ndk/+/2051541 [2] https://android-review.googlesource.com/c/platform/ndk/+/2064269 [3] https://github.com/android/ndk/issues/1693