summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2018-04-30 16:56:25 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2018-06-06 15:22:41 (GMT)
commit66ea1a3795f76ce921bc48f82ff228bcceed4524 (patch)
tree48d060e55c547dc5d06fcccba7186bb5beb4fc13 /Modules/Platform
parentc1f5a44b28047cde74e2fb10e8d68e314272f699 (diff)
downloadCMake-66ea1a3795f76ce921bc48f82ff228bcceed4524.zip
CMake-66ea1a3795f76ce921bc48f82ff228bcceed4524.tar.gz
CMake-66ea1a3795f76ce921bc48f82ff228bcceed4524.tar.bz2
LINK_OPTIONS: Add support of "LINKER:" prefix
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Apple-Intel.cmake3
-rw-r--r--Modules/Platform/Generic-ADSP-C.cmake4
-rw-r--r--Modules/Platform/Generic-ADSP-CXX.cmake4
-rw-r--r--Modules/Platform/Generic-SDCC-C.cmake3
-rw-r--r--Modules/Platform/Linux-Intel.cmake3
-rw-r--r--Modules/Platform/Windows-Embarcadero.cmake2
6 files changed, 16 insertions, 3 deletions
diff --git a/Modules/Platform/Apple-Intel.cmake b/Modules/Platform/Apple-Intel.cmake
index 2d4f7e5..a854be9 100644
--- a/Modules/Platform/Apple-Intel.cmake
+++ b/Modules/Platform/Apple-Intel.cmake
@@ -10,6 +10,9 @@ macro(__apple_compiler_intel lang)
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
+ set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Wl,")
+ set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP ",")
+
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 12.0)
set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
endif()
diff --git a/Modules/Platform/Generic-ADSP-C.cmake b/Modules/Platform/Generic-ADSP-C.cmake
index de1cee2..c8597cd 100644
--- a/Modules/Platform/Generic-ADSP-C.cmake
+++ b/Modules/Platform/Generic-ADSP-C.cmake
@@ -9,6 +9,9 @@ string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " ")
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ")
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " ")
+set(CMAKE_C_LINKER_WRAPPER_FLAG "-flags-link" " ")
+set(CMAKE_C_LINKER_WRAPPER_FLAG_SEP ",")
+
set(CMAKE_C_CREATE_STATIC_LIBRARY
"<CMAKE_C_COMPILER> -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o <TARGET> <CMAKE_C_LINK_FLAGS> <OBJECTS>")
@@ -17,4 +20,3 @@ set(CMAKE_C_LINK_EXECUTABLE
set(CMAKE_C_CREATE_SHARED_LIBRARY)
set(CMAKE_C_CREATE_MODULE_LIBRARY)
-
diff --git a/Modules/Platform/Generic-ADSP-CXX.cmake b/Modules/Platform/Generic-ADSP-CXX.cmake
index 0cde8f2..d76bb66 100644
--- a/Modules/Platform/Generic-ADSP-CXX.cmake
+++ b/Modules/Platform/Generic-ADSP-CXX.cmake
@@ -7,6 +7,9 @@ string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " ")
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ")
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " ")
+set(CMAKE_CXX_LINKER_WRAPPER_FLAG "-flags-link" " ")
+set(CMAKE_CXX_LINKER_WRAPPER_FLAG_SEP ",")
+
set(CMAKE_CXX_CREATE_STATIC_LIBRARY
"<CMAKE_CXX_COMPILER> -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o <TARGET> <CMAKE_CXX_LINK_FLAGS> <OBJECTS>")
@@ -15,4 +18,3 @@ set(CMAKE_CXX_LINK_EXECUTABLE
set(CMAKE_CXX_CREATE_SHARED_LIBRARY)
set(CMAKE_CXX_CREATE_MODULE_LIBRARY)
-
diff --git a/Modules/Platform/Generic-SDCC-C.cmake b/Modules/Platform/Generic-SDCC-C.cmake
index 4b3912a..aef4abf 100644
--- a/Modules/Platform/Generic-SDCC-C.cmake
+++ b/Modules/Platform/Generic-SDCC-C.cmake
@@ -37,6 +37,8 @@ if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT)
set (CMAKE_EXE_LINKER_FLAGS_INIT --model-small)
endif()
+set(CMAKE_C_LINKER_WRAPPER_FLAG "-Wl" ",")
+
# compile a C file into an object file
set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>")
@@ -51,4 +53,3 @@ set(CMAKE_C_CREATE_STATIC_LIBRARY
# not supported by sdcc
set(CMAKE_C_CREATE_SHARED_LIBRARY "")
set(CMAKE_C_CREATE_MODULE_LIBRARY "")
-
diff --git a/Modules/Platform/Linux-Intel.cmake b/Modules/Platform/Linux-Intel.cmake
index ee9aac2..f712e2b 100644
--- a/Modules/Platform/Linux-Intel.cmake
+++ b/Modules/Platform/Linux-Intel.cmake
@@ -30,6 +30,9 @@ macro(__linux_compiler_intel lang)
# executables that use dlopen but do not set ENABLE_EXPORTS.
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-rdynamic")
+ set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Wl,")
+ set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP ",")
+
set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES)
if(XIAR)
diff --git a/Modules/Platform/Windows-Embarcadero.cmake b/Modules/Platform/Windows-Embarcadero.cmake
index f8e1c9e..48b936e 100644
--- a/Modules/Platform/Windows-Embarcadero.cmake
+++ b/Modules/Platform/Windows-Embarcadero.cmake
@@ -76,6 +76,8 @@ macro(__embarcadero_language lang)
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "${_tD}") # ... while this is a space separated string.
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_INCLUDES 1)
+ set (CMAKE_${lang}_LINKER_WRAPPER_FLAG "-l")
+
# compile a source file into an object file
# place <DEFINES> outside the response file because Borland refuses
# to parse quotes from the response file.