kstars appends -Wl,-z,nodump to the linker flags, which is not supported by lld>=7 (previous versions just discareded unkonwn flags).
Add an ecm module to check whether a linker flag is supported.
Usage:
include(ECMCheckLinkerFlags) [...] # Check for nodump support SET(NODUMP_FLAGS "-Wl,-z,nodump") ecm_check_linker_flags("${NODUMP_FLAGS}" NODUMP_SUPPORTED) if (NODUMP_SUPPORTED) SET(SEC_LINK_FLAGS "${SEC_LINK_FLAGS} ${NODUMP_FLAGS}") endif ()