From ee0beea82a999f6a46f7f980c700867f860905f1 Mon Sep 17 00:00:00 2001 From: Zephyron Date: Fri, 17 Jan 2025 15:43:31 +1000 Subject: [PATCH] Remove x86-64 ISA compatibility flags and toolchain Remove the x86-64 instruction set architecture (ISA) compatibility flags and associated toolchain file that were setting CPU architecture compatibility levels. This simplifies the build system by removing the custom ISA flag handling and x86-64-v2 option. Changes: - Remove x86-64 ISA flags configuration block from CMakeLists.txt - Delete unused x86-64-toolchain.cmake file - Remove CITRON_USE_X86_64_V2 option --- CMakeLists.txt | 33 --------------------------------- cmake/x86-64-toolchain.cmake | 5 ----- 2 files changed, 38 deletions(-) delete mode 100644 cmake/x86-64-toolchain.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index eab04f370..a922a4f3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -673,36 +673,3 @@ if(ENABLE_QT AND UNIX AND NOT APPLE) install(FILES "dist/org.citron_emu.citron.metainfo.xml" DESTINATION "share/metainfo") endif() - -# Set CPU architecture compatibility flags -if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64") - # Default to x86-64 baseline for maximum compatibility - set(ISA_FLAGS "-march=x86-64") - - # Allow override via CMake option - option(CITRON_USE_X86_64_V2 "Enable x86-64-v2 instruction set" OFF) - - if(CITRON_USE_X86_64_V2) - set(ISA_FLAGS "-march=x86-64-v2") - endif() - - # Set for main project - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ISA_FLAGS}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ISA_FLAGS}") - - # Set for vcpkg dependencies - set(VCPKG_CXX_FLAGS "${ISA_FLAGS}") - set(VCPKG_C_FLAGS "${ISA_FLAGS}") - - # Set toolchain options for vcpkg - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/x86-64-toolchain.cmake") - - # Ensure we're not getting overridden by system defaults - add_compile_options(${ISA_FLAGS}) - - # Force disable higher ISA levels - add_compile_definitions( - __x86_64_v3__=0 - __x86_64_v4__=0 - ) -endif() diff --git a/cmake/x86-64-toolchain.cmake b/cmake/x86-64-toolchain.cmake deleted file mode 100644 index e94f1ee98..000000000 --- a/cmake/x86-64-toolchain.cmake +++ /dev/null @@ -1,5 +0,0 @@ -# Rename this file to x86-64-toolchain.cmake - -# Set baseline x86-64 flags for maximum compatibility -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=x86-64" CACHE STRING "C flags") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64" CACHE STRING "C++ flags") \ No newline at end of file