diff --git a/Toolchain/CMake/ClangToolchain.txt.in b/Toolchain/CMake/ClangToolchain.txt.in index 5a52bd3ee8..9a5b786542 100644 --- a/Toolchain/CMake/ClangToolchain.txt.in +++ b/Toolchain/CMake/ClangToolchain.txt.in @@ -1,7 +1,3 @@ -if (${CMAKE_VERSION} VERSION_LESS "3.25.0") - list(APPEND CMAKE_MODULE_PATH "@SERENITY_SOURCE_DIR@/Toolchain/CMake") -endif() - set(CMAKE_SYSTEM_NAME SerenityOS) set(CMAKE_SYSTEM_PROCESSOR "@SERENITY_ARCH@") diff --git a/Toolchain/CMake/GNUToolchain.txt.in b/Toolchain/CMake/GNUToolchain.txt.in index 05bd67a188..c9860fd597 100644 --- a/Toolchain/CMake/GNUToolchain.txt.in +++ b/Toolchain/CMake/GNUToolchain.txt.in @@ -1,7 +1,3 @@ -if (${CMAKE_VERSION} VERSION_LESS "3.25.0") - list(APPEND CMAKE_MODULE_PATH "@SERENITY_SOURCE_DIR@/Toolchain/CMake") -endif() - set(CMAKE_SYSTEM_NAME SerenityOS) set(CMAKE_SYSTEM_PROCESSOR "@SERENITY_ARCH@") diff --git a/Toolchain/CMake/Platform/README.md b/Toolchain/CMake/Platform/README.md deleted file mode 100644 index b64fa66fff..0000000000 --- a/Toolchain/CMake/Platform/README.md +++ /dev/null @@ -1,4 +0,0 @@ - -This directory contains Platform files for CMake to identify flags for SerenityOS when ``CMAKE_SYSTEM_NAME`` is "SerenityOS". - -Please keep these files in sync with upstream ``Modules/Platform/SerenityOS*.cmake`` in https://gitlab.kitware.com/cmake/cmake diff --git a/Toolchain/CMake/Platform/SerenityOS-Clang-ASM.cmake b/Toolchain/CMake/Platform/SerenityOS-Clang-ASM.cmake deleted file mode 100644 index ba1e18cfec..0000000000 --- a/Toolchain/CMake/Platform/SerenityOS-Clang-ASM.cmake +++ /dev/null @@ -1,2 +0,0 @@ -include(Platform/SerenityOS-GNU) -__serenity_compiler_gnu(ASM) diff --git a/Toolchain/CMake/Platform/SerenityOS-Clang-C.cmake b/Toolchain/CMake/Platform/SerenityOS-Clang-C.cmake deleted file mode 100644 index 791a1978dc..0000000000 --- a/Toolchain/CMake/Platform/SerenityOS-Clang-C.cmake +++ /dev/null @@ -1,2 +0,0 @@ -include(Platform/SerenityOS-GNU) -__serenity_compiler_gnu(C) diff --git a/Toolchain/CMake/Platform/SerenityOS-Clang-CXX.cmake b/Toolchain/CMake/Platform/SerenityOS-Clang-CXX.cmake deleted file mode 100644 index 084e319fa9..0000000000 --- a/Toolchain/CMake/Platform/SerenityOS-Clang-CXX.cmake +++ /dev/null @@ -1,2 +0,0 @@ -include(Platform/SerenityOS-GNU) -__serenity_compiler_gnu(CXX) diff --git a/Toolchain/CMake/Platform/SerenityOS-GNU-ASM.cmake b/Toolchain/CMake/Platform/SerenityOS-GNU-ASM.cmake deleted file mode 100644 index ba1e18cfec..0000000000 --- a/Toolchain/CMake/Platform/SerenityOS-GNU-ASM.cmake +++ /dev/null @@ -1,2 +0,0 @@ -include(Platform/SerenityOS-GNU) -__serenity_compiler_gnu(ASM) diff --git a/Toolchain/CMake/Platform/SerenityOS-GNU-C.cmake b/Toolchain/CMake/Platform/SerenityOS-GNU-C.cmake deleted file mode 100644 index 791a1978dc..0000000000 --- a/Toolchain/CMake/Platform/SerenityOS-GNU-C.cmake +++ /dev/null @@ -1,2 +0,0 @@ -include(Platform/SerenityOS-GNU) -__serenity_compiler_gnu(C) diff --git a/Toolchain/CMake/Platform/SerenityOS-GNU-CXX.cmake b/Toolchain/CMake/Platform/SerenityOS-GNU-CXX.cmake deleted file mode 100644 index 084e319fa9..0000000000 --- a/Toolchain/CMake/Platform/SerenityOS-GNU-CXX.cmake +++ /dev/null @@ -1,2 +0,0 @@ -include(Platform/SerenityOS-GNU) -__serenity_compiler_gnu(CXX) diff --git a/Toolchain/CMake/Platform/SerenityOS-GNU.cmake b/Toolchain/CMake/Platform/SerenityOS-GNU.cmake deleted file mode 100644 index ed39477a8c..0000000000 --- a/Toolchain/CMake/Platform/SerenityOS-GNU.cmake +++ /dev/null @@ -1,24 +0,0 @@ -# This module is shared by multiple languages; use include blocker. -include_guard() - -set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack,-z,separate-code,-z,max-page-size=0x1000") - -macro(__serenity_compiler_gnu lang) - set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-rpath,") - set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") - set(CMAKE_SHARED_LIBRARY_RPATH_LINK_${lang}_FLAG "-Wl,-rpath-link,") - set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,-soname,") - set(CMAKE_EXE_EXPORTS_${lang}_FLAG "-Wl,--export-dynamic") - - set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared -Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack,-z,separate-code") - - # Initialize link type selection flags. These flags are used when - # building a shared library, shared module, or executable that links - # to other libraries to select whether to use the static or shared - # versions of the libraries. - foreach(type SHARED_LIBRARY SHARED_MODULE EXE) - set(CMAKE_${type}_LINK_STATIC_${lang}_FLAGS "-Wl,-Bstatic") - set(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-Bdynamic") - endforeach() - -endmacro() diff --git a/Toolchain/CMake/Platform/SerenityOS.cmake b/Toolchain/CMake/Platform/SerenityOS.cmake deleted file mode 100644 index dc4f369dc0..0000000000 --- a/Toolchain/CMake/Platform/SerenityOS.cmake +++ /dev/null @@ -1,12 +0,0 @@ - -set(SERENITYOS 1) - -set(CMAKE_DL_LIBS "") -set(CMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN "\$ORIGIN") -set(CMAKE_SHARED_LIBRARY_SUFFIX ".so") - -# Shared libraries with no builtin soname may not be linked safely by -# specifying the file path. -set(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1) - -include(Platform/UnixPaths)