From 0adaa54209cb6b7c07f849e15c64ec9703b92f07 Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Wed, 21 Oct 2020 11:18:25 +0000 Subject: security/helib: disable -march=native Also fixes a build issue on powerpc64/12.1-RELEASE: g++9: error: unrecognized command line option '-march=native'; did you mean '-mcpu=native'? --- security/helib/files/patch-CMakeLists.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 security/helib/files/patch-CMakeLists.txt (limited to 'security/helib/files/patch-CMakeLists.txt') diff --git a/security/helib/files/patch-CMakeLists.txt b/security/helib/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..bd282f610bbc --- /dev/null +++ b/security/helib/files/patch-CMakeLists.txt @@ -0,0 +1,29 @@ +--- CMakeLists.txt.orig 2020-10-21 10:59:03 UTC ++++ CMakeLists.txt +@@ -87,18 +87,6 @@ set_property(CACHE + PROPERTY + STRINGS "Debug" "RelWithDebInfo" "Release" "MinSizeRel") + +-# Creating and documenting TARGET_ARCHITECTURE cmake property +-set(TARGET_ARCHITECTURE "${TARGET_ARCHITECTURE}" +- CACHE +- STRING "Target architecture used for -march (default is native)") +-# If TARGET_ARCHITECTURE is not set use default +-if (NOT TARGET_ARCHITECTURE) +- set(TARGET_ARCHITECTURE "native" +- CACHE +- STRING "Target architecture used for -march (default is native)" +- FORCE) +-endif (NOT TARGET_ARCHITECTURE) +- + # Path containing FindGMP.cmake and FindNTL.cmake + list(APPEND CMAKE_MODULE_PATH "${HELIB_CMAKE_EXTRA_DIR}") + +@@ -150,7 +138,6 @@ endif (NOT PACKAGE_BUILD) + + # Setting flag lists to avoid polluting CMAKE_CXX_FLAGS. + # PUBLIC_HELIB_CXX_FLAGS will be exported to the installed target. +-set(PRIVATE_HELIB_CXX_FLAGS "-march=${TARGET_ARCHITECTURE}") + set(PUBLIC_HELIB_CXX_FLAGS "") + # Add extra checks during build + if (PEDANTIC_BUILD) -- cgit v1.2.3