ASM: cmake seems to be passing <FLAGS> to link step incorrectly
I'm working on a snes project using cmake and a fork of GNU Binutils. I'm having issues with linking the project, in that cmake seems insistant on passing -O3 -DNDEBUG
to that step, which causes the linker, ld, to issue an "unknown command line option" error.
The link step should be configured by CMAKE_ASM_LINK_EXECUTABLE
, which is set, in the toolchain file, by
set(CMAKE_ASM_LINK_EXECUTABLE "<CMAKE_LINKER> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
however, the resulting command in rules.ninja is
[redacted]/bin/w65-snes-elf-ld $FLAGS $LINK_FLAGS $in -o $TARGET_FILE $LINK_PATH $LINK_LIBRARIES
Is there a reason for the disparity, or is something else the issue. The rule previously contained <FLAGS>
following <CMAKE_LINKER>
, but that was removed, and a total rebuild was performed (including removing the CMakeCache.txt
).
Cross Toolchain File in use is: w65-snes-gas-cross.cmake
Edited by Brad King