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 <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2019-12-19 16:22:00 -08:00 committed by Johan Hedberg
commit e6cf37a857

View file

@ -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()