diff --git a/.gitignore b/.gitignore index 02c09e2..2dfebc8 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ /llvm-6.0.1.src.tar.xz /llvm-7.0.0rc1.src.tar.xz /llvm-7.0.0rc2.src.tar.xz +/llvm-7.0.0rc3.src.tar.xz diff --git a/0001-bpf-fix-an-assertion-in-BPFAsmBackend-applyFixup.patch b/0001-bpf-fix-an-assertion-in-BPFAsmBackend-applyFixup.patch deleted file mode 100644 index 7a5831c..0000000 --- a/0001-bpf-fix-an-assertion-in-BPFAsmBackend-applyFixup.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 39184e407cd937f2f20d3f61eec205925bae7b13 Mon Sep 17 00:00:00 2001 -From: Yonghong Song -Date: Wed, 22 Aug 2018 21:21:03 +0000 -Subject: [PATCH] bpf: fix an assertion in BPFAsmBackend applyFixup() - -Fix bug https://bugs.llvm.org/show_bug.cgi?id=38643 - -In BPFAsmBackend applyFixup(), there is an assertion for FixedValue to be 0. -This may not be true, esp. for optimiation level 0. -For example, in the above bug, for the following two -static variables: - @bpf_map_lookup_elem = internal global i8* (i8*, i8*)* - inttoptr (i64 1 to i8* (i8*, i8*)*), align 8 - @bpf_map_update_elem = internal global i32 (i8*, i8*, i8*, i64)* - inttoptr (i64 2 to i32 (i8*, i8*, i8*, i64)*), align 8 - -The static variable @bpf_map_update_elem will have a symbol -offset of 8 and a FK_SecRel_8 with FixupValue 8 will cause -the assertion if llvm is built with -DLLVM_ENABLE_ASSERTIONS=ON. - -The above relocations will not exist if the program is compiled -with optimization level -O1 and above as the compiler optimizes -those static variables away. In the below error message, -O2 -is suggested as this is the common practice. - -Note that FixedValue = 0 in applyFixup() does exist and is valid, -e.g., for the global variable my_map in the above bug. The bpf -loader will process them properly for map_id's before loading -the program into the kernel. - -The static variables, which are not optimized away by compiler, -may have FK_SecRel_8 relocation with non-zero FixedValue. - -The patch removed the offending assertion and will issue -a hard error as below if the FixedValue in applyFixup() -is not 0. - $ llc -march=bpf -filetype=obj fixup.ll - LLVM ERROR: Unsupported relocation: try to compile with -O2 or above, - or check your static variable usage - -Signed-off-by: Yonghong Song - -git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340455 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp b/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp -index 6c255e9..1822d86 100644 ---- a/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp -+++ b/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp -@@ -10,6 +10,8 @@ - #include "MCTargetDesc/BPFMCTargetDesc.h" - #include "llvm/ADT/StringRef.h" - #include "llvm/MC/MCAsmBackend.h" -+#include "llvm/MC/MCAssembler.h" -+#include "llvm/MC/MCContext.h" - #include "llvm/MC/MCFixup.h" - #include "llvm/MC/MCObjectWriter.h" - #include "llvm/Support/EndianStream.h" -@@ -71,7 +73,12 @@ void BPFAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup, - bool IsResolved, - const MCSubtargetInfo *STI) const { - if (Fixup.getKind() == FK_SecRel_4 || Fixup.getKind() == FK_SecRel_8) { -- assert(Value == 0); -+ if (Value) { -+ MCContext &Ctx = Asm.getContext(); -+ Ctx.reportError(Fixup.getLoc(), -+ "Unsupported relocation: try to compile with -O2 or above, " -+ "or check your static variable usage"); -+ } - } else if (Fixup.getKind() == FK_Data_4) { - support::endian::write(&Data[Fixup.getOffset()], Value, Endian); - } else if (Fixup.getKind() == FK_Data_8) { --- -1.8.3.1 - diff --git a/0001-lit-Use-sys.executable-for-executing-builtin-command.patch b/0001-lit-Use-sys.executable-for-executing-builtin-command.patch deleted file mode 100644 index afd2f95..0000000 --- a/0001-lit-Use-sys.executable-for-executing-builtin-command.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 3235c2488c3cd661b4421cc3e4739baefdc80783 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Thu, 30 Aug 2018 12:53:56 -0700 -Subject: [PATCH] lit: Use sys.executable for executing builtin commands - -The python executable may not exist on all systems so use sys.executable -instead. ---- - utils/lit/lit/TestRunner.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py -index e304381..4d903b4 100644 ---- a/utils/lit/lit/TestRunner.py -+++ b/utils/lit/lit/TestRunner.py -@@ -879,7 +879,7 @@ def _executeShCmd(cmd, shenv, results, timeoutHelper): - # Expand all glob expressions - args = expand_glob_expressions(args, cmd_shenv.cwd) - if is_builtin_cmd: -- args.insert(0, "python") -+ args.insert(0, sys.executable) - args[1] = os.path.join(builtin_commands_dir ,args[1] + ".py") - - # On Windows, do our own command line quoting for better compatibility --- -1.8.3.1 - diff --git a/llvm.spec b/llvm.spec index fe88054..9e21058 100644 --- a/llvm.spec +++ b/llvm.spec @@ -12,7 +12,7 @@ %global maj_ver 7 %global min_ver 0 %global patch_ver 0 -%global rc_ver 2 +%global rc_ver 3 %ifarch s390x %global llvm_targets SystemZ;BPF @@ -50,7 +50,7 @@ Name: %{pkg_name} Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 0.11.rc%{rc_ver}%{?dist} +Release: 0.12.rc%{rc_ver}%{?dist} Summary: The Low Level Virtual Machine License: NCSA @@ -62,13 +62,10 @@ Patch3: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch Patch7: 0001-Filter-out-cxxflags-not-supported-by-clang.patch Patch12: 0001-unittests-Don-t-install-TestPlugin.so.patch -# rhbz#1618958 -Patch13: 0001-bpf-fix-an-assertion-in-BPFAsmBackend-applyFixup.patch # If python2 is available on the system, llvm will try to use it. This patch # removes the preferences for python2, so we can make sure we always use # python3. Patch14: 0001-CMake-Don-t-prefer-python2.7.patch -Patch15: 0001-lit-Use-sys.executable-for-executing-builtin-command.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -419,6 +416,9 @@ fi %endif %changelog +* Mon Sep 10 2018 Tom Stellard - 7.0.0-0.12.rc3 +- 7.0.0-rc3 Release + * Fri Sep 07 2018 Tom Stellard - 7.0.0-0.11.rc2 - Use python3 shebang for opt-viewewr scripts diff --git a/sources b/sources index f1fbd2c..0b739f5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (llvm-7.0.0rc2.src.tar.xz) = 4211fdbd2278ed325d3f6a1f1fa706351e768e2cd1445abf6664bed39b7b5d0c5e04514711d627f9ae1e271300f410635bb54ba004a5bece0d68450d3a1b52e4 +SHA512 (llvm-7.0.0rc3.src.tar.xz) = 8a19d6cad7bf485d3800ed41a2aadaa3b60eb75c31e984b277756cc5c5eb1a39f12d554d71614d3781cd7f1c85e39de40d9062b77a5299b8ba9659d91bd4c0f7