Skip to content

Commit

Permalink
Fix NDK version >= 22 compatibility
Browse files Browse the repository at this point in the history
See gh-110
  • Loading branch information
kleest committed Jun 16, 2021
1 parent d03d935 commit eeeaa74
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nfcd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ add_library(nfcgate SHARED ${NFCD_HEADERS} ${NFCD_SOURCES})

# platform specific flags
if (CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-execute-only -fuse-ld=lld -execute-only -ffixed-x18")
# FIXME XOM removed in NDK versions >= 22, retaining pre-22 behavior for compatibility
if (ANDROID_NDK_REVISION VERSION_GREATER 21)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld -execute-only -ffixed-x18")
else()
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-execute-only -fuse-ld=lld -execute-only -ffixed-x18")
endif()
endif()

# link library
Expand Down

0 comments on commit eeeaa74

Please sign in to comment.