From d2f78a9411da992271744c9c695d583a4de8c8e4 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sat, 10 Dec 2022 13:36:37 -0700 Subject: [PATCH] Toolchain: Remove upstreamed CMake platform files :^) --- Toolchain/CMake/ClangToolchain.txt.in | 4 ---- Toolchain/CMake/GNUToolchain.txt.in | 4 ---- Toolchain/CMake/Platform/README.md | 4 ---- .../CMake/Platform/SerenityOS-Clang-ASM.cmake | 2 -- .../CMake/Platform/SerenityOS-Clang-C.cmake | 2 -- .../CMake/Platform/SerenityOS-Clang-CXX.cmake | 2 -- .../CMake/Platform/SerenityOS-GNU-ASM.cmake | 2 -- .../CMake/Platform/SerenityOS-GNU-C.cmake | 2 -- .../CMake/Platform/SerenityOS-GNU-CXX.cmake | 2 -- Toolchain/CMake/Platform/SerenityOS-GNU.cmake | 24 ------------------- Toolchain/CMake/Platform/SerenityOS.cmake | 12 ---------- 11 files changed, 60 deletions(-) delete mode 100644 Toolchain/CMake/Platform/README.md delete mode 100644 Toolchain/CMake/Platform/SerenityOS-Clang-ASM.cmake delete mode 100644 Toolchain/CMake/Platform/SerenityOS-Clang-C.cmake delete mode 100644 Toolchain/CMake/Platform/SerenityOS-Clang-CXX.cmake delete mode 100644 Toolchain/CMake/Platform/SerenityOS-GNU-ASM.cmake delete mode 100644 Toolchain/CMake/Platform/SerenityOS-GNU-C.cmake delete mode 100644 Toolchain/CMake/Platform/SerenityOS-GNU-CXX.cmake delete mode 100644 Toolchain/CMake/Platform/SerenityOS-GNU.cmake delete mode 100644 Toolchain/CMake/Platform/SerenityOS.cmake diff --git a/Toolchain/CMake/ClangToolchain.txt.in b/Toolchain/CMake/ClangToolchain.txt.in index 5a52bd3ee8b..9a5b786542a 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 05bd67a1885..c9860fd5976 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 b64fa66fffa..00000000000 --- 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 ba1e18cfecf..00000000000 --- 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 791a1978dc8..00000000000 --- 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 084e319fa9c..00000000000 --- 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 ba1e18cfecf..00000000000 --- 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 791a1978dc8..00000000000 --- 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 084e319fa9c..00000000000 --- 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 ed39477a8c5..00000000000 --- 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 dc4f369dc0f..00000000000 --- 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)