root/root-ppc-codemodel.patch
Mattias Ellert 1fd9670b71 Update to 6.24.02
ROOT now uses llvm/clang version 9 (updated from version 5)
No longer exclude arch s390x (better supported in llvm/clang 9)
Drop patches accepted upstream or previously backported
Backport some fixes that make more tests work
New subpackages: python{2,3}-distrdf, root-roofit-batchcompute
Require js-jsroot >= 6
2021-08-22 19:10:24 +02:00

36 lines
1.5 KiB
Diff

From 774ab9358d852e2c004564183de4a60eaaa5ac98 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Fri, 23 Apr 2021 21:40:14 +0200
Subject: [PATCH 2/2] Actually request the use of the large code model for
ppc64/ppc64le
Instead of erroring out with an assert.
---
interpreter/cling/lib/Interpreter/IncrementalExecutor.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/interpreter/cling/lib/Interpreter/IncrementalExecutor.cpp b/interpreter/cling/lib/Interpreter/IncrementalExecutor.cpp
index 46771aa8c0..93a48f31f3 100644
--- a/interpreter/cling/lib/Interpreter/IncrementalExecutor.cpp
+++ b/interpreter/cling/lib/Interpreter/IncrementalExecutor.cpp
@@ -73,14 +73,14 @@ CreateHostTargetMachine(const clang::CompilerInstance& CI) {
JTMB->getOptions().EmulatedTLS = false;
#endif // _WIN32
- std::unique_ptr<TargetMachine> TM = cantFail(JTMB->createTargetMachine());
-
#if defined(__powerpc64__) || defined(__PPC64__)
// We have to use large code model for PowerPC64 because TOC and text sections
// can be more than 2GB apart.
- assert(TM->getCodeModel() >= CodeModel::Large);
+ JTMB->setCodeModel(CodeModel::Large);
#endif
+ std::unique_ptr<TargetMachine> TM = cantFail(JTMB->createTargetMachine());
+
// Forcefully disable GlobalISel, it might be enabled on AArch64 without
// optimizations. In tests on an Apple M1 after the upgrade to LLVM 9, this
// new instruction selection framework emits branches / calls that expect all
--
2.30.2