mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-28 09:59:20 -05:00
SDCC: Remove default flags for a specific target
Remove defaults for a specific target (8051) because they are incorrect for other targets. Fixes: #20308
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
sdcc-no-default-target
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
* The default flags used for SDCC no longer include any target-specific flags.
|
||||||
|
Previously the default flags were hard-coded for 8051.
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
# This file implements basic support for sdcc (http://sdcc.sourceforge.net/)
|
# This file implements basic support for sdcc (http://sdcc.sourceforge.net/)
|
||||||
# a free C compiler for 8 and 16 bit microcontrollers.
|
# a free C compiler for 8 and 16 bit microcontrollers.
|
||||||
# To use it either a toolchain file is required or cmake has to be run like this:
|
# To use it either a toolchain file is required or cmake has to be run like this:
|
||||||
@@ -35,22 +34,12 @@ else()
|
|||||||
set(CMAKE_AR "${SDCCAR_EXECUTABLE}" CACHE FILEPATH "The sdcc librarian" FORCE)
|
set(CMAKE_AR "${SDCCAR_EXECUTABLE}" CACHE FILEPATH "The sdcc librarian" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if("${SDCCAR_EXECUTABLE}" MATCHES "sdcclib")
|
if("${SDCCAR_EXECUTABLE}" MATCHES "sdcclib")
|
||||||
set(CMAKE_AR_OPTIONS "-a")
|
set(CMAKE_AR_OPTIONS "-a")
|
||||||
else()
|
else()
|
||||||
set(CMAKE_AR_OPTIONS "-rc")
|
set(CMAKE_AR_OPTIONS "-rc")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# CMAKE_C_FLAGS_INIT and CMAKE_EXE_LINKER_FLAGS_INIT should be set in a CMAKE_SYSTEM_PROCESSOR file
|
|
||||||
if(NOT DEFINED CMAKE_C_FLAGS_INIT)
|
|
||||||
string(APPEND CMAKE_C_FLAGS_INIT " -mmcs51 --model-small")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT)
|
|
||||||
set (CMAKE_EXE_LINKER_FLAGS_INIT --model-small)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CMAKE_C_LINKER_WRAPPER_FLAG "-Wl" ",")
|
set(CMAKE_C_LINKER_WRAPPER_FLAG "-Wl" ",")
|
||||||
|
|
||||||
# compile a C file into an object file
|
# compile a C file into an object file
|
||||||
|
|||||||
Reference in New Issue
Block a user