X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=extra%2Fsh-elf-linux.cmake;h=3fdf98c5fe3018499b1550fdfb6c3c4cdc198508;hb=779fb16265ed0e9dcb7975ee46f0411fb26d86a3;hp=8be6d3602279c8b284377dd6adcc2c6b2d6bfdfe;hpb=e72388a0aa23da8bc8e24a0cbe9d523c5a9ce294;p=carl9170fw.git diff --git a/extra/sh-elf-linux.cmake b/extra/sh-elf-linux.cmake index 8be6d36..3fdf98c 100644 --- a/extra/sh-elf-linux.cmake +++ b/extra/sh-elf-linux.cmake @@ -6,7 +6,8 @@ set_property(DIRECTORY PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) set(CMAKE_FIND_ROOT_PATH ${CMAKE_SOURCE_DIR}/toolchain/inst/) set(CMAKE_C_FLAGS "-m2 -ml -Os -ffreestanding -nostartfiles") -set(CMAKE_C_LINK_FLAGS "-static -EL -x --gc-sections") +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") @@ -14,7 +15,7 @@ set(CMAKE_AR ${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-ar) set(CMAKE_ASM_COMPILER ${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-as) set(CMAKE_ASM-ATT_COMPILER ${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-as) set(CMAKE_LINKER ${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-ld) -set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-ld -o ") +set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_SOURCE_DIR}/toolchain/inst/bin/sh-elf-gcc ${CMAKE_C_FLAGS} -o ") set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)