mirror of
https://github.com/PCSX2/pcsx2.git
synced 2024-10-08 08:13:23 +00:00
cmake: better gcc + gsdx integration
Only set fabi-version on older GCC (5.0 and below) Disable broken optimization for GCC7+ (until we find a better solution)
This commit is contained in:
parent
ec63b04719
commit
05763b3669
@ -69,6 +69,8 @@ function(check_compiler_version version_warn version_err)
|
|||||||
message(WARNING "PCSX2 will stop supporting GCC ${GCC_VERSION} in the near future. Please upgrade to at least GCC ${version_warn}.")
|
message(WARNING "PCSX2 will stop supporting GCC ${GCC_VERSION} in the near future. Please upgrade to at least GCC ${version_warn}.")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(GCC_VERSION "${GCC_VERSION}" PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
@ -20,8 +20,23 @@ if(USE_ICC)
|
|||||||
set(CommonFlags "${CommonFlags} -restrict")
|
set(CommonFlags "${CommonFlags} -restrict")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
# Newer version default to a correct ABI
|
||||||
|
if (${GCC_VERSION} VERSION_LESS "5.1")
|
||||||
|
set(GSdxFinalFlags ${GSdxFinalFlags} -fabi-version=6)
|
||||||
|
endif()
|
||||||
|
# github issue 1937
|
||||||
|
if (${GCC_VERSION} VERSION_GREATER "7.0")
|
||||||
|
set(GSdxFinalFlags ${GSdxFinalFlags} -fno-gcse-lm -fno-tree-pre)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
set(GSdxFinalFlags ${CommonFlags})
|
set(GSdxFinalFlags ${CommonFlags})
|
||||||
|
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCXX AND (${GCC_VERSION} VERSION_LESS "5.0"))
|
||||||
|
set(GSdxFinalFlags ${GSdxFinalFlags} -fabi-version=6)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(XDG_STD)
|
if(XDG_STD)
|
||||||
set(GSdxFinalFlags ${GSdxFinalFlags} -DXDG_STD)
|
set(GSdxFinalFlags ${GSdxFinalFlags} -DXDG_STD)
|
||||||
endif()
|
endif()
|
||||||
@ -34,11 +49,6 @@ if(LIBLZMA_FOUND)
|
|||||||
set(GSdxFinalFlags ${GSdxFinalFlags} -DLZMA_SUPPORTED)
|
set(GSdxFinalFlags ${GSdxFinalFlags} -DLZMA_SUPPORTED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#Clang doesn't support a few common flags that GCC does.
|
|
||||||
if(NOT USE_CLANG)
|
|
||||||
set(GSdxFinalFlags ${GSdxFinalFlags} -fabi-version=6)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(OPENCL_API)
|
if(OPENCL_API)
|
||||||
set(GSdxFinalFlags ${GSdxFinalFlags} -DENABLE_OPENCL)
|
set(GSdxFinalFlags ${GSdxFinalFlags} -DENABLE_OPENCL)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user