ASM: Fix executable link lines with GNU 'as' tool as CMAKE_ASM_COMPILER

The GNU `as` tool does not know how to drive linking like the C compiler
does.  When using `as` as the compiler, use the linker directly.
This commit is contained in:
Brad King
2020-03-12 09:05:07 -04:00
parent 5932f0be4f
commit 9728839b9e

View File

@@ -7,4 +7,6 @@ __compiler_gnu(ASM)
if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_MATCH STREQUAL "GNU assembler")
set(CMAKE_DEPFILE_FLAGS_ASM${ASM_DIALECT} "--MD <DEPFILE>")
set(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE
"<CMAKE_LINKER> <FLAGS> <CMAKE_ASM${ASM_DIALECT}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
endif()