llvmPackages_12.llvm: create fix-llvm-issue-49955.patch

This patch addresses llvm/llvm-project#49955
This commit is contained in:
Moritz Angermann 2021-12-22 17:54:49 +08:00 committed by sterni
parent cf7efe1192
commit 08f22ce9cc
2 changed files with 16 additions and 0 deletions

View File

@ -63,6 +63,9 @@ in stdenv.mkDerivation (rec {
# a native libLLVM.so (which would fail) we force llvm-config to be linked
# statically against the necessary LLVM components always.
../../llvm-config-link-static.patch
# Fix llvm being miscompiled by some gccs. See llvm/llvm-project#49955
# Fix llvm being miscompiled by some gccs. See https://github.com/llvm/llvm-project/issues/49955
./fix-llvm-issue-49955.patch
./gnu-install-dirs.patch
# On older CPUs (e.g. Hydra/wendy) we'd be getting an error in this test.

View File

@ -0,0 +1,13 @@
diff --git a/lib/CodeGen/AsmPrinter/CMakeLists.txt b/lib/CodeGen/AsmPrinter/CMakeLists.txt
index eb924282..c77c140b 100644
--- a/lib/CodeGen/AsmPrinter/CMakeLists.txt
+++ b/lib/CodeGen/AsmPrinter/CMakeLists.txt
@@ -44,3 +44,8 @@ add_llvm_component_library(LLVMAsmPrinter
Support
Target
)
+
+if (CMAKE_COMPILER_IS_GNUCXX)
+ set_source_files_properties(DwarfCompileUnit.cpp PROPERTIES
+ COMPILE_FLAGS -fno-strict-aliasing)
+endif()