1 # This module is shared by multiple languages; use include blocker.
4 set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack,-z,separate-code,-z,max-page-size=0x1000")
6 macro(__serenity_compiler_gnu lang)
7 set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-rpath,")
8 set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
9 set(CMAKE_SHARED_LIBRARY_RPATH_LINK_${lang}_FLAG "-Wl,-rpath-link,")
10 set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,-soname,")
11 set(CMAKE_EXE_EXPORTS_${lang}_FLAG "-Wl,--export-dynamic")
13 set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared -Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack,-z,separate-code")
15 # Initialize link type selection flags. These flags are used when
16 # building a shared library, shared module, or executable that links
17 # to other libraries to select whether to use the static or shared
18 # versions of the libraries.
19 foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
20 set(CMAKE_${type}_LINK_STATIC_${lang}_FLAGS "-Wl,-Bstatic")
21 set(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-Bdynamic")