From 8a87981d94ddbce771c35e842cf46ec0dae07e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=2E=20Col=C3=B3n=20V=C3=A9lez?= Date: Fri, 7 Aug 2015 02:39:39 -0400 Subject: [PATCH 1/3] Add options to not install optional files. --- CMakeLists.txt | 8 ++++++-- cmake/BuildParameters.cmake | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bb7cadd54..89df8d871f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,7 +88,9 @@ endif() #------------------------------------------------------------------------------- # Install some files to ease package creation if(PACKAGE_MODE) - INSTALL(FILES "${CMAKE_SOURCE_DIR}/bin/cheats_ws.zip" DESTINATION "${GAMEINDEX_DIR}") + if(NOT DISABLE_CHEATS_ZIP) + INSTALL(FILES "${CMAKE_SOURCE_DIR}/bin/cheats_ws.zip" DESTINATION "${GAMEINDEX_DIR}") + endif() INSTALL(FILES "${CMAKE_SOURCE_DIR}/bin/GameIndex.dbf" DESTINATION "${GAMEINDEX_DIR}") # set categories depending on system/distribution in pcsx2.desktop @@ -104,5 +106,7 @@ if(PACKAGE_MODE) INSTALL(FILES "${CMAKE_SOURCE_DIR}/bin/docs/PCSX2_FAQ.pdf" DESTINATION "${DOC_DIR}") INSTALL(FILES "${CMAKE_SOURCE_DIR}/bin/docs/PCSX2_Readme.pdf" DESTINATION "${DOC_DIR}") INSTALL(FILES "${CMAKE_SOURCE_DIR}/bin/docs/PCSX2.1" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1/") - INSTALL(FILES "${CMAKE_SOURCE_DIR}/bin/PCSX2-linux.sh" DESTINATION "${BIN_DIR}") + if(NOT DISABLE_PCSX2_WRAPPER) + INSTALL(FILES "${CMAKE_SOURCE_DIR}/bin/PCSX2-linux.sh" DESTINATION "${BIN_DIR}") + endif() endif() diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index 3a1e829761..73bcd9ec24 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -40,6 +40,8 @@ option(BUILD_REPLAY_LOADERS "Build GS replayer to ease testing (developer option # Path and lib option #------------------------------------------------------------------------------- option(PACKAGE_MODE "Use this option to ease packaging of PCSX2 (developer/distribution option)") +option(DISABLE_CHEATS_ZIP "Disable including the cheats_ws.zip file") +option(DISABLE_PCSX2_WRAPPER "Disable including the PCSX2-linux.sh file") option(XDG_STD "Use XDG standard path instead of the standard PCSX2 path") option(EXTRA_PLUGINS "Build various 'extra' plugins") option(SDL2_API "Use SDL2 on spu2x and onepad (experimental/wxWidget mustn't be built with SDL1.2 support") From 1db74162e60668c4d3d391e3d539004980e03e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=2E=20Col=C3=B3n=20V=C3=A9lez?= Date: Fri, 7 Aug 2015 05:03:37 -0400 Subject: [PATCH 2/3] Update the gcc version requirements. It no longer builds with 4.6 and 4.7 since it requires features from 4.8. Start using c++11 since we no longer support 4.5 & 4.6. --- CMakeLists.txt | 2 +- cmake/BuildParameters.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 89df8d871f..4fcaaa3fcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,7 @@ include(Pcsx2Utils) check_no_parenthesis_in_path() detectOperatingSystem() -check_compiler_version("4.7" "4.5") +check_compiler_version("4.8" "4.8") #------------------------------------------------------------------------------- # Include specific module diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index 73bcd9ec24..dadf7c8ab0 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -226,7 +226,7 @@ endif() #------------------------------------------------------------------------------- # Set some default compiler flags #------------------------------------------------------------------------------- -set(COMMON_FLAG "-pipe -std=c++0x -fvisibility=hidden -pthread") +set(COMMON_FLAG "-pipe -std=c++11 -fvisibility=hidden -pthread") if (DISABLE_SVU) set(COMMON_FLAG "${COMMON_FLAG} -DDISABLE_SVU") endif() From 0d344605e127a11165965c67daffe93e95743e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=2E=20Col=C3=B3n=20V=C3=A9lez?= Date: Fri, 7 Aug 2015 05:04:19 -0400 Subject: [PATCH 3/3] Use glibc for strcmp and memcmp. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59048 . The bug is 5+ years old with no fix in sight. Mesa did some test that showed 50% improvement and enabled it by default. http://lists.freedesktop.org/archives/mesa-dev/2011-June/009078.html . It could also be coded but glibc version has mmx, sse2, and sse4 support. --- cmake/BuildParameters.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index dadf7c8ab0..3e5b0982dd 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -226,7 +226,7 @@ endif() #------------------------------------------------------------------------------- # Set some default compiler flags #------------------------------------------------------------------------------- -set(COMMON_FLAG "-pipe -std=c++11 -fvisibility=hidden -pthread") +set(COMMON_FLAG "-pipe -std=c++11 -fvisibility=hidden -pthread -fno-builtin-strcmp -fno-builtin-memcmp") if (DISABLE_SVU) set(COMMON_FLAG "${COMMON_FLAG} -DDISABLE_SVU") endif()