@@ -20,11 +20,21 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN
2020 endif ()
2121 endif ()
2222
23- if (COMPILER_IS_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
24- add_compile_options (-fstack-clash-protection -fcf-protection)
25- endif ()
2623
2724 if (COMPILER_IS_GCC OR COMPILER_IS_CLANG)
25+
26+ # This fails under Fedora - MinGW - Gcc 8.3
27+ if (NOT MINGW)
28+ if (COMPILER_IS_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
29+ add_compile_options (-fstack-clash-protection -fcf-protection)
30+ endif ()
31+
32+ if (COMPILER_IS_GCC OR (COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 3.7 ))
33+ # is not available for clang 3.4.2. it appears to be present in clang 3.7.
34+ add_compile_options (-fstack-protector-strong)
35+ endif ()
36+ endif ()
37+
2838 add_compile_options (-Wp,-D_GLIBCXX_ASSERTIONS)
2939
3040 if (CMAKE_BUILD_TYPE STREQUAL Release AND NOT APPLE )
@@ -39,12 +49,10 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN
3949 endif ()
4050
4151 add_compile_options (-Wall -Wcast-align -Wpointer-arith -Wformat-security -Wmissing-format-attribute -Woverloaded-virtual -W)
42- add_compile_options (-fasynchronous-unwind-tables)
4352
44- if (COMPILER_IS_GCC OR (COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 3.7 ))
45- # is not available for clang 3.4.2. it appears to be present in clang 3.7.
46- add_compile_options (-fstack-protector-strong)
47- endif ()
53+ # This seems to be causing issues in the Fedora_MinGW GitLab job
54+ #add_compile_options(-fasynchronous-unwind-tables)
55+
4856
4957 if ( EXIV2_TEAM_USE_SANITIZERS )
5058 # ASAN is available in gcc from 4.8 and UBSAN from 4.9
0 commit comments