diff options
author | Toyohisa Kameyama <kameyama@riken.jp> | 2019-07-25 02:30:32 +0900 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2019-07-24 12:30:32 -0500 |
commit | cb62b1ff85d8c7b797b0f013820588056f71d8df (patch) | |
tree | e1781b45979bf7284f65c7e219d66ecb415957a3 | |
parent | 63813fa9c0464f92b0c24fd56d5fedfc1be94188 (diff) | |
download | spack-cb62b1ff85d8c7b797b0f013820588056f71d8df.tar.gz spack-cb62b1ff85d8c7b797b0f013820588056f71d8df.tar.bz2 spack-cb62b1ff85d8c7b797b0f013820588056f71d8df.tar.xz spack-cb62b1ff85d8c7b797b0f013820588056f71d8df.zip |
rapidjson: Don't add -march=native on ARM and gcc 5.x or before. (#12117)
-rwxr-xr-x | var/spack/repos/builtin/packages/rapidjson/arm.patch | 15 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/rapidjson/package.py | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/rapidjson/arm.patch b/var/spack/repos/builtin/packages/rapidjson/arm.patch new file mode 100755 index 0000000000..db14814048 --- /dev/null +++ b/var/spack/repos/builtin/packages/rapidjson/arm.patch @@ -0,0 +1,15 @@ +diff -ru spack-src/CMakeLists.txt spack-src.new/CMakeLists.txt +--- spack-src/CMakeLists.txt 2019-07-24 15:44:41.200676445 +0900 ++++ spack-src.new/CMakeLists.txt 2019-07-24 15:43:52.140673234 +0900 +@@ -50,7 +50,10 @@ + endif(CCACHE_FOUND) + + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") ++ if(NOT (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") ++ endif() + if (RAPIDJSON_BUILD_CXX11) + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") diff --git a/var/spack/repos/builtin/packages/rapidjson/package.py b/var/spack/repos/builtin/packages/rapidjson/package.py index 737f0b6181..8b6f379086 100644 --- a/var/spack/repos/builtin/packages/rapidjson/package.py +++ b/var/spack/repos/builtin/packages/rapidjson/package.py @@ -20,3 +20,5 @@ class Rapidjson(CMakePackage): # released versions compile with -Werror and fail with gcc-7 # branch-fall-through warnings patch('0001-turn-off-Werror.patch') + + patch('arm.patch', when='@1.1.0 target=aarch64 %gcc@:5.9') |