diff --git a/0001-Filter-out-cxxflags-not-supported-by-clang.patch b/0001-Filter-out-cxxflags-not-supported-by-clang.patch new file mode 100644 index 0000000..5511315 --- /dev/null +++ b/0001-Filter-out-cxxflags-not-supported-by-clang.patch @@ -0,0 +1,28 @@ +From acdb4ab5aa8076469fa551cc79e6bc7bbe8c06a5 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Fri, 16 Mar 2018 07:52:33 -0700 +Subject: [PATCH] Filter out cxxflags not supported by clang + +--- + tools/llvm-config/CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt +index 25f99ce..922d4c5 100644 +--- a/tools/llvm-config/CMakeLists.txt ++++ b/tools/llvm-config/CMakeLists.txt +@@ -33,7 +33,11 @@ set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR}) + set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR}) + set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}") + set(LLVM_CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}") ++STRING(REGEX REPLACE "-mcet" "" LLVM_CFLAGS ${LLVM_CFLAGS}) ++STRING(REGEX REPLACE "-fcf-protection" "" LLVM_CFLAGS ${LLVM_CFLAGS}) + set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}") ++STRING(REGEX REPLACE "-mcet" "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS}) ++STRING(REGEX REPLACE "-fcf-protection" "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS}) + set(LLVM_BUILD_SYSTEM cmake) + set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI}) + set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX}") +-- +1.8.3.1 + diff --git a/llvm.spec b/llvm.spec index 0423d90..f74c0c6 100644 --- a/llvm.spec +++ b/llvm.spec @@ -12,7 +12,7 @@ Name: llvm Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 6%{?dist} +Release: 7%{?dist} Summary: The Low Level Virtual Machine License: NCSA @@ -24,6 +24,7 @@ Patch0: llvm-3.7.1-cmake-s390.patch Patch3: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch Patch5: 0001-DebugInfo-Discard-invalid-DBG_VALUE-instructions-in-.patch Patch6: 0001-Fixup-for-rL326769-RegState-Debug-is-being-truncated.patch +Patch7: 0001-Filter-out-cxxflags-not-supported-by-clang.patch BuildRequires: cmake BuildRequires: ninja-build @@ -215,6 +216,10 @@ fi %{_libdir}/cmake/llvm/LLVMStaticExports.cmake %changelog +* Fri Mar 16 2018 Tom Stellard - 6.0.0-7 +- Filter out cxxflags and cflags from llvm-config that aren't supported by clang +- rhbz#1556980 + * Wed Mar 14 2018 Tom Stellard - 6.0.0-6 - Enable symbol versioning in libLLVM.so