ipmctl/ipmctl-fix-SLE12-build.patch

19 lines
825 B
Diff
Raw Normal View History

--- ipmctl-01.00.00.3091.v.d/CMakeLists.txt 2018-05-30 01:54:48.000000000 +0200
+++ ipmctl-01.00.00.3091.tar.d/CMakeLists.txt 2018-06-08 21:25:25.000000000 +0200
@@ -113,9 +113,12 @@
-D_GNU_SOURCE
-D__LINUX__
)
-
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-strong")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong")
+ if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.9)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-strong")
+ endif()
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong")
+ endif()
endif()
#----------------------------------------------------------------------------------------------------