From 2be2034bf6e7c3af65e802c0c02255fb9a6a4d0c Mon Sep 17 00:00:00 2001 From: jolavillette Date: Sun, 30 Aug 2026 10:38:05 +0200 Subject: [PATCH] Android: reword the libdl comment and point at the upstream rnp PR The ordering claim only holds for linkers that resolve archives in a single pass; the NDK's lld picks libdl.a up either way. Reference rnpgp/rnp#2473 so the sed can be dropped once it lands. --- misc/Android/prepare-toolchain-clang.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/misc/Android/prepare-toolchain-clang.sh b/misc/Android/prepare-toolchain-clang.sh index b232aee59..7ab02c330 100755 --- a/misc/Android/prepare-toolchain-clang.sh +++ b/misc/Android/prepare-toolchain-clang.sh @@ -888,9 +888,10 @@ endif(CMAKE_CROSSCOMPILING_EMULATOR)' \ # >>> dso_dlfcn.o:(dlfcn_load) in archive .../libcrypto.a # # The NDK ships a static libdl.a defining those symbols, so link it - # explicitly. It has to come after libcrypto.a for the static linker to - # pick it up, hence a linked library rather than CMAKE_EXE_LINKER_FLAGS, - # which CMake places before the objects. + # explicitly, as a linked library rather than CMAKE_EXE_LINKER_FLAGS so + # it is ordered after libcrypto.a for linkers that resolve archives in a + # single pass (lld does not care, GNU ld does). + # Submitted upstream as rnpgp/rnp#2473; drop this sed once it is in. sed -i \ 's|(findopensslfeatures PRIVATE OpenSSL::Crypto)|(findopensslfeatures PRIVATE OpenSSL::Crypto dl)|' \ "${S_dir}/cmake/Modules/FindOpenSSLFeatures.cmake"