carl9170: fix spurious "error: unrecognized command line option ‘-rdynamic’"
authorChristian Lamparter <chunkeey@gmail.com>
Sun, 5 Nov 2017 15:42:39 +0000 (16:42 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 5 Nov 2017 16:26:31 +0000 (17:26 +0100)
This error came from cmake's module Linux-GNU-C.cmake that sets the
linker options. However, this is an embedded target and it does not
support dynamic linking. Until this is fixed, let's just overwrite
the line.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
extra/sh-elf-linux.cmake

index 24294362c6cf3a329609ff091e268bdb93dfd0ae..3fdf98c5fe3018499b1550fdfb6c3c4cdc198508 100644 (file)
@@ -7,6 +7,7 @@ set(CMAKE_FIND_ROOT_PATH ${CMAKE_SOURCE_DIR}/toolchain/inst/)
 
 set(CMAKE_C_FLAGS "-m2 -ml -Os -ffreestanding -nostartfiles")
 set(CMAKE_C_LINK_FLAGS "-Wl,-static,-EL,-x,--gc-sections")
+set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
 
 set(OBJCOPY ${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-objcopy)
 set(CMAKE_C_COMPILER "${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-gcc")