From e6cf37a857aa0e239833da0bd97745b0a4f5629f Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Thu, 19 Dec 2019 16:22:00 -0800 Subject: [PATCH] cmake: ld: use linker prefix for undefined symbols The undefined symbol option "-u" applies to linker so prefix it with the linker prefix (usually "-Wl"). This fixes warnings from LLVM/Clang about unknown arguments. Signed-off-by: Daniel Leung --- cmake/linker/ld/target.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/linker/ld/target.cmake b/cmake/linker/ld/target.cmake index 9523f429854..8fd66a23493 100644 --- a/cmake/linker/ld/target.cmake +++ b/cmake/linker/ld/target.cmake @@ -57,7 +57,7 @@ endmacro() # Force symbols to be entered in the output file as undefined symbols function(toolchain_ld_force_undefined_symbols) foreach(symbol ${ARGN}) - zephyr_link_libraries(-u${symbol}) + zephyr_link_libraries(${LINKERFLAGPREFIX},-u,${symbol}) endforeach() endfunction()