* add missing patches and left out changes

This commit is contained in:
Alexander Baldeck 2021-06-14 23:08:30 +02:00
parent 0b6678f121
commit 1882a2b961
41 changed files with 7990 additions and 1395 deletions

View File

@ -1,32 +0,0 @@
From 8ea70c9ede7ac82d9363c122a9a84aded054984c Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Mon, 30 Sep 2019 23:42:17 +0000
Subject: [PATCH] Fix Driver/modules.cpp test to work when build directory name
contains '.s'
Reviewers: dyung, rsmith, hansw
Subscribers: mati865, mgorny, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D66176
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373275 91177308-0d34-0410-b5e6-96231b3b80d8
---
test/Driver/modules.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/Driver/modules.cpp b/test/Driver/modules.cpp
index 7c549c1300..4f4e3a4140 100644
--- a/test/Driver/modules.cpp
+++ b/test/Driver/modules.cpp
@@ -15,7 +15,7 @@
// RUN: %clang -std=c++2a %t/module.pcm -S -o %t/module.pcm.o -v 2>&1 | FileCheck %s --check-prefix=CHECK-COMPILE
//
// CHECK-COMPILE: -cc1 {{.*}} {{-emit-obj|-S}}
-// CHECK-COMPILE-SAME: -o {{.*}}.{{pcm.o|s}}
+// CHECK-COMPILE-SAME: -o {{.*}}module{{2*}}.pcm.o
// CHECK-COMPILE-SAME: -x pcm
// CHECK-COMPILE-SAME: {{.*}}.pcm

View File

@ -1,40 +0,0 @@
From a1445cd0340006d7635101c4c2b27ae51328642c Mon Sep 17 00:00:00 2001
From: Serge Guelton <sguelton@redhat.com>
Date: Thu, 19 Sep 2019 00:54:40 +0000
Subject: [PATCH] Initialize all fields in ABIArgInfo.
Due to usage of an uninitialized fields, we end up with
a Conditional jump or move depends on uninitialised value
Fixes https://bugs.llvm.org/show_bug.cgi?id=40547
Commited on behalf of Martin Liska <mliska@suse.cz>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372281 91177308-0d34-0410-b5e6-96231b3b80d8
---
include/clang/CodeGen/CGFunctionInfo.h | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/include/clang/CodeGen/CGFunctionInfo.h b/include/clang/CodeGen/CGFunctionInfo.h
index 1f81072e23d0..5069d9af42a3 100644
--- a/include/clang/CodeGen/CGFunctionInfo.h
+++ b/include/clang/CodeGen/CGFunctionInfo.h
@@ -109,14 +109,12 @@ class ABIArgInfo {
UnpaddedCoerceAndExpandType = T;
}
- ABIArgInfo(Kind K)
- : TheKind(K), PaddingInReg(false), InReg(false) {
- }
-
public:
- ABIArgInfo()
+ ABIArgInfo(Kind K = Direct)
: TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
- TheKind(Direct), PaddingInReg(false), InReg(false) {}
+ TheKind(K), PaddingInReg(false), InAllocaSRet(false),
+ IndirectByVal(false), IndirectRealign(false), SRetAfterThis(false),
+ InReg(false), CanBeFlattened(false), SignExt(false) {}
static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0,
llvm::Type *Padding = nullptr,

View File

@ -1,152 +0,0 @@
From 2f6eec18566fb235097bb2f0b00852e858330dc5 Mon Sep 17 00:00:00 2001
From: Alexey Bader <alexey.bader@intel.com>
Date: Tue, 19 Feb 2019 15:19:06 +0000
Subject: [PATCH 1/3] [OpenCL] Change type of block pointer for OpenCL
Summary:
For some reason OpenCL blocks in LLVM IR are represented as function pointers.
These pointers do not point to any real function and never get called. Actually
they point to some structure, which in turn contains pointer to the real block
invoke function.
This patch changes represntation of OpenCL blocks in LLVM IR from function
pointers to pointers to `%struct.__block_literal_generic`.
Such representation allows to avoid unnecessary bitcasts and simplifies
further processing (e.g. translation to SPIR-V ) of the module for targets
which do not support function pointers.
Patch by: Alexey Sotkin.
Reviewers: Anastasia, yaxunl, svenvh
Reviewed By: Anastasia
Subscribers: alexbatashev, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58277
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354337 91177308-0d34-0410-b5e6-96231b3b80d8
---
lib/CodeGen/CodeGenTypes.cpp | 4 +++-
test/CodeGenOpenCL/blocks.cl | 18 ++++++++----------
test/CodeGenOpenCL/cl20-device-side-enqueue.cl | 18 +++++++++---------
3 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp
index 2acf1ac161..93b3ebf5c2 100644
--- a/lib/CodeGen/CodeGenTypes.cpp
+++ b/lib/CodeGen/CodeGenTypes.cpp
@@ -637,7 +637,9 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) {
case Type::BlockPointer: {
const QualType FTy = cast<BlockPointerType>(Ty)->getPointeeType();
- llvm::Type *PointeeType = ConvertTypeForMem(FTy);
+ llvm::Type *PointeeType = CGM.getLangOpts().OpenCL
+ ? CGM.getGenericBlockLiteralType()
+ : ConvertTypeForMem(FTy);
unsigned AS = Context.getTargetAddressSpace(FTy);
ResultType = llvm::PointerType::get(PointeeType, AS);
break;
diff --git a/test/CodeGenOpenCL/blocks.cl b/test/CodeGenOpenCL/blocks.cl
index 675240c6f0..19aacc3f0d 100644
--- a/test/CodeGenOpenCL/blocks.cl
+++ b/test/CodeGenOpenCL/blocks.cl
@@ -35,11 +35,10 @@ void foo(){
// SPIR: %[[block_captured:.*]] = getelementptr inbounds <{ i32, i32, i8 addrspace(4)*, i32 }>, <{ i32, i32, i8 addrspace(4)*, i32 }>* %[[block]], i32 0, i32 3
// SPIR: %[[i_value:.*]] = load i32, i32* %i
// SPIR: store i32 %[[i_value]], i32* %[[block_captured]],
- // SPIR: %[[blk_ptr:.*]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32 }>* %[[block]] to i32 ()*
- // SPIR: %[[blk_gen_ptr:.*]] = addrspacecast i32 ()* %[[blk_ptr]] to i32 () addrspace(4)*
- // SPIR: store i32 () addrspace(4)* %[[blk_gen_ptr]], i32 () addrspace(4)** %[[block_B:.*]],
- // SPIR: %[[blk_gen_ptr:.*]] = load i32 () addrspace(4)*, i32 () addrspace(4)** %[[block_B]]
- // SPIR: %[[block_literal:.*]] = bitcast i32 () addrspace(4)* %[[blk_gen_ptr]] to %struct.__opencl_block_literal_generic addrspace(4)*
+ // SPIR: %[[blk_ptr:.*]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32 }>* %[[block]] to %struct.__opencl_block_literal_generic*
+ // SPIR: %[[blk_gen_ptr:.*]] = addrspacecast %struct.__opencl_block_literal_generic* %[[blk_ptr]] to %struct.__opencl_block_literal_generic addrspace(4)*
+ // SPIR: store %struct.__opencl_block_literal_generic addrspace(4)* %[[blk_gen_ptr]], %struct.__opencl_block_literal_generic addrspace(4)** %[[block_B:.*]],
+ // SPIR: %[[block_literal:.*]] = load %struct.__opencl_block_literal_generic addrspace(4)*, %struct.__opencl_block_literal_generic addrspace(4)** %[[block_B]]
// SPIR: %[[invoke_addr:.*]] = getelementptr inbounds %struct.__opencl_block_literal_generic, %struct.__opencl_block_literal_generic addrspace(4)* %[[block_literal]], i32 0, i32 2
// SPIR: %[[blk_gen_ptr:.*]] = bitcast %struct.__opencl_block_literal_generic addrspace(4)* %[[block_literal]] to i8 addrspace(4)*
// SPIR: %[[invoke_func_ptr:.*]] = load i8 addrspace(4)*, i8 addrspace(4)* addrspace(4)* %[[invoke_addr]]
@@ -50,11 +49,10 @@ void foo(){
// AMDGCN: %[[block_captured:.*]] = getelementptr inbounds <{ i32, i32, i8*, i32 }>, <{ i32, i32, i8*, i32 }> addrspace(5)* %[[block]], i32 0, i32 3
// AMDGCN: %[[i_value:.*]] = load i32, i32 addrspace(5)* %i
// AMDGCN: store i32 %[[i_value]], i32 addrspace(5)* %[[block_captured]],
- // AMDGCN: %[[blk_ptr:.*]] = bitcast <{ i32, i32, i8*, i32 }> addrspace(5)* %[[block]] to i32 () addrspace(5)*
- // AMDGCN: %[[blk_gen_ptr:.*]] = addrspacecast i32 () addrspace(5)* %[[blk_ptr]] to i32 ()*
- // AMDGCN: store i32 ()* %[[blk_gen_ptr]], i32 ()* addrspace(5)* %[[block_B:.*]],
- // AMDGCN: %[[blk_gen_ptr:.*]] = load i32 ()*, i32 ()* addrspace(5)* %[[block_B]]
- // AMDGCN: %[[block_literal:.*]] = bitcast i32 ()* %[[blk_gen_ptr]] to %struct.__opencl_block_literal_generic*
+ // AMDGCN: %[[blk_ptr:.*]] = bitcast <{ i32, i32, i8*, i32 }> addrspace(5)* %[[block]] to %struct.__opencl_block_literal_generic addrspace(5)*
+ // AMDGCN: %[[blk_gen_ptr:.*]] = addrspacecast %struct.__opencl_block_literal_generic addrspace(5)* %[[blk_ptr]] to %struct.__opencl_block_literal_generic*
+ // AMDGCN: store %struct.__opencl_block_literal_generic* %[[blk_gen_ptr]], %struct.__opencl_block_literal_generic* addrspace(5)* %[[block_B:.*]],
+ // AMDGCN: %[[block_literal:.*]] = load %struct.__opencl_block_literal_generic*, %struct.__opencl_block_literal_generic* addrspace(5)* %[[block_B]]
// AMDGCN: %[[invoke_addr:.*]] = getelementptr inbounds %struct.__opencl_block_literal_generic, %struct.__opencl_block_literal_generic* %[[block_literal]], i32 0, i32 2
// AMDGCN: %[[blk_gen_ptr:.*]] = bitcast %struct.__opencl_block_literal_generic* %[[block_literal]] to i8*
// AMDGCN: %[[invoke_func_ptr:.*]] = load i8*, i8** %[[invoke_addr]]
diff --git a/test/CodeGenOpenCL/cl20-device-side-enqueue.cl b/test/CodeGenOpenCL/cl20-device-side-enqueue.cl
index 473219478a..84450162da 100644
--- a/test/CodeGenOpenCL/cl20-device-side-enqueue.cl
+++ b/test/CodeGenOpenCL/cl20-device-side-enqueue.cl
@@ -11,7 +11,7 @@ typedef struct {int a;} ndrange_t;
// For a block global variable, first emit the block literal as a global variable, then emit the block variable itself.
// COMMON: [[BL_GLOBAL:@__block_literal_global[^ ]*]] = internal addrspace(1) constant { i32, i32, i8 addrspace(4)* } { i32 {{[0-9]+}}, i32 {{[0-9]+}}, i8 addrspace(4)* addrspacecast (i8* bitcast (void (i8 addrspace(4)*, i8 addrspace(3)*)* [[INV_G:@[^ ]+]] to i8*) to i8 addrspace(4)*) }
-// COMMON: @block_G = addrspace(1) constant void (i8 addrspace(3)*) addrspace(4)* addrspacecast (void (i8 addrspace(3)*) addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BL_GLOBAL]] to void (i8 addrspace(3)*) addrspace(1)*) to void (i8 addrspace(3)*) addrspace(4)*)
+// COMMON: @block_G = addrspace(1) constant %struct.__opencl_block_literal_generic addrspace(4)* addrspacecast (%struct.__opencl_block_literal_generic addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BL_GLOBAL]] to %struct.__opencl_block_literal_generic addrspace(1)*) to %struct.__opencl_block_literal_generic addrspace(4)*)
// For anonymous blocks without captures, emit block literals as global variable.
// COMMON: [[BLG1:@__block_literal_global[^ ]*]] = internal addrspace(1) constant { i32, i32, i8 addrspace(4)* } { i32 {{[0-9]+}}, i32 {{[0-9]+}}, i8 addrspace(4)* addrspacecast (i8* bitcast (void (i8 addrspace(4)*, i8 addrspace(3)*)* {{@[^ ]+}} to i8*) to i8 addrspace(4)*) }
@@ -77,9 +77,9 @@ kernel void device_side_enqueue(global int *a, global int *b, int i) {
// COMMON: [[DEF_Q:%[0-9]+]] = load %opencl.queue_t{{.*}}*, %opencl.queue_t{{.*}}** %default_queue
// COMMON: [[FLAGS:%[0-9]+]] = load i32, i32* %flags
// COMMON: store i8 addrspace(4)* addrspacecast (i8* bitcast (void (i8 addrspace(4)*)* [[INVL1:@__device_side_enqueue_block_invoke[^ ]*]] to i8*) to i8 addrspace(4)*), i8 addrspace(4)** %block.invoke
- // B32: [[BL:%[0-9]+]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32 addrspace(1)*, i32, i32 addrspace(1)* }>* %block to void ()*
- // B64: [[BL:%[0-9]+]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 }>* %block to void ()*
- // COMMON: [[BL_I8:%[0-9]+]] = addrspacecast void ()* [[BL]] to i8 addrspace(4)*
+ // B32: [[BL:%[0-9]+]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32 addrspace(1)*, i32, i32 addrspace(1)* }>* %block to %struct.__opencl_block_literal_generic*
+ // B64: [[BL:%[0-9]+]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 }>* %block to %struct.__opencl_block_literal_generic*
+ // COMMON: [[BL_I8:%[0-9]+]] = addrspacecast %struct.__opencl_block_literal_generic* [[BL]] to i8 addrspace(4)*
// COMMON-LABEL: call i32 @__enqueue_kernel_basic(
// COMMON-SAME: %opencl.queue_t{{.*}}* [[DEF_Q]], i32 [[FLAGS]], %struct.ndrange_t* byval [[NDR]]{{([0-9]+)?}},
// COMMON-SAME: i8 addrspace(4)* addrspacecast (i8* bitcast ({{.*}} [[INVLK1:[^ ]+_kernel]] to i8*) to i8 addrspace(4)*),
@@ -95,8 +95,8 @@ kernel void device_side_enqueue(global int *a, global int *b, int i) {
// COMMON: [[WAIT_EVNT:%[0-9]+]] = addrspacecast %opencl.clk_event_t{{.*}}** %event_wait_list to %opencl.clk_event_t{{.*}}* addrspace(4)*
// COMMON: [[EVNT:%[0-9]+]] = addrspacecast %opencl.clk_event_t{{.*}}** %clk_event to %opencl.clk_event_t{{.*}}* addrspace(4)*
// COMMON: store i8 addrspace(4)* addrspacecast (i8* bitcast (void (i8 addrspace(4)*)* [[INVL2:@__device_side_enqueue_block_invoke[^ ]*]] to i8*) to i8 addrspace(4)*), i8 addrspace(4)** %block.invoke
- // COMMON: [[BL:%[0-9]+]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32{{.*}}, i32{{.*}}, i32{{.*}} }>* %block3 to void ()*
- // COMMON: [[BL_I8:%[0-9]+]] = addrspacecast void ()* [[BL]] to i8 addrspace(4)*
+ // COMMON: [[BL:%[0-9]+]] = bitcast <{ i32, i32, i8 addrspace(4)*, i32{{.*}}, i32{{.*}}, i32{{.*}} }>* %block3 to %struct.__opencl_block_literal_generic*
+ // COMMON: [[BL_I8:%[0-9]+]] = addrspacecast %struct.__opencl_block_literal_generic* [[BL]] to i8 addrspace(4)*
// COMMON-LABEL: call i32 @__enqueue_kernel_basic_events
// COMMON-SAME: (%opencl.queue_t{{.*}}* [[DEF_Q]], i32 [[FLAGS]], %struct.ndrange_t* {{.*}}, i32 2, %opencl.clk_event_t{{.*}}* addrspace(4)* [[WAIT_EVNT]], %opencl.clk_event_t{{.*}}* addrspace(4)* [[EVNT]],
// COMMON-SAME: i8 addrspace(4)* addrspacecast (i8* bitcast ({{.*}} [[INVLK2:[^ ]+_kernel]] to i8*) to i8 addrspace(4)*),
@@ -300,13 +300,13 @@ kernel void device_side_enqueue(global int *a, global int *b, int i) {
// Emits global block literal [[BLG8]] and invoke function [[INVG8]].
// The full type of these expressions are long (and repeated elsewhere), so we
// capture it as part of the regex for convenience and clarity.
- // COMMON: store void () addrspace(4)* addrspacecast (void () addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to void () addrspace(1)*) to void () addrspace(4)*), void () addrspace(4)** %block_A
+ // COMMON: store %struct.__opencl_block_literal_generic addrspace(4)* addrspacecast (%struct.__opencl_block_literal_generic addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to %struct.__opencl_block_literal_generic addrspace(1)*) to %struct.__opencl_block_literal_generic addrspace(4)*), %struct.__opencl_block_literal_generic addrspace(4)** %block_A
void (^const block_A)(void) = ^{
return;
};
// Emits global block literal [[BLG9]] and invoke function [[INVG9]].
- // COMMON: store void (i8 addrspace(3)*) addrspace(4)* addrspacecast (void (i8 addrspace(3)*) addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG9]] to void (i8 addrspace(3)*) addrspace(1)*) to void (i8 addrspace(3)*) addrspace(4)*), void (i8 addrspace(3)*) addrspace(4)** %block_B
+ // COMMON: store %struct.__opencl_block_literal_generic addrspace(4)* addrspacecast (%struct.__opencl_block_literal_generic addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG9]] to %struct.__opencl_block_literal_generic addrspace(1)*) to %struct.__opencl_block_literal_generic addrspace(4)*), %struct.__opencl_block_literal_generic addrspace(4)** %block_B
void (^const block_B)(local void *) = ^(local void *a) {
return;
};
@@ -346,7 +346,7 @@ kernel void device_side_enqueue(global int *a, global int *b, int i) {
// COMMON: store i8 addrspace(4)* addrspacecast (i8* bitcast (void (i8 addrspace(4)*)* [[INVL3:@__device_side_enqueue_block_invoke[^ ]*]] to i8*) to i8 addrspace(4)*), i8 addrspace(4)** %block.invoke
// COMMON: [[DEF_Q:%[0-9]+]] = load %opencl.queue_t{{.*}}*, %opencl.queue_t{{.*}}** %default_queue
// COMMON: [[FLAGS:%[0-9]+]] = load i32, i32* %flags
- // COMMON: [[BL_I8:%[0-9]+]] = addrspacecast void ()* {{.*}} to i8 addrspace(4)*
+ // COMMON: [[BL_I8:%[0-9]+]] = addrspacecast %struct.__opencl_block_literal_generic* {{.*}} to i8 addrspace(4)*
// COMMON-LABEL: call i32 @__enqueue_kernel_basic(
// COMMON-SAME: %opencl.queue_t{{.*}}* [[DEF_Q]], i32 [[FLAGS]], %struct.ndrange_t* byval [[NDR]]{{([0-9]+)?}},
// COMMON-SAME: i8 addrspace(4)* addrspacecast (i8* bitcast ({{.*}} [[INVLK3:[^ ]+_kernel]] to i8*) to i8 addrspace(4)*),
--
2.21.0

View File

@ -1,290 +0,0 @@
From 46c42e19eb6ad426c07f4e33408c7288ddd5d053 Mon Sep 17 00:00:00 2001
From: Andrew Savonichev <andrew.savonichev@intel.com>
Date: Thu, 21 Feb 2019 11:02:10 +0000
Subject: [PATCH 2/3] [OpenCL] Simplify LLVM IR generated for OpenCL blocks
Summary:
Emit direct call of block invoke functions when possible, i.e. in case the
block is not passed as a function argument.
Also doing some refactoring of `CodeGenFunction::EmitBlockCallExpr()`
Reviewers: Anastasia, yaxunl, svenvh
Reviewed By: Anastasia
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58388
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354568 91177308-0d34-0410-b5e6-96231b3b80d8
---
lib/CodeGen/CGBlocks.cpp | 77 +++++++++----------
lib/CodeGen/CGOpenCLRuntime.cpp | 30 ++++++--
lib/CodeGen/CGOpenCLRuntime.h | 4 +
test/CodeGenOpenCL/blocks.cl | 10 +--
.../CodeGenOpenCL/cl20-device-side-enqueue.cl | 34 ++++++--
5 files changed, 91 insertions(+), 64 deletions(-)
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index fa3c3ee861..10a0238d91 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -1261,52 +1261,49 @@ RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr *E,
ReturnValueSlot ReturnValue) {
const BlockPointerType *BPT =
E->getCallee()->getType()->getAs<BlockPointerType>();
-
llvm::Value *BlockPtr = EmitScalarExpr(E->getCallee());
-
- // Get a pointer to the generic block literal.
- // For OpenCL we generate generic AS void ptr to be able to reuse the same
- // block definition for blocks with captures generated as private AS local
- // variables and without captures generated as global AS program scope
- // variables.
- unsigned AddrSpace = 0;
- if (getLangOpts().OpenCL)
- AddrSpace = getContext().getTargetAddressSpace(LangAS::opencl_generic);
-
- llvm::Type *BlockLiteralTy =
- llvm::PointerType::get(CGM.getGenericBlockLiteralType(), AddrSpace);
-
- // Bitcast the callee to a block literal.
- BlockPtr =
- Builder.CreatePointerCast(BlockPtr, BlockLiteralTy, "block.literal");
-
- // Get the function pointer from the literal.
- llvm::Value *FuncPtr =
- Builder.CreateStructGEP(CGM.getGenericBlockLiteralType(), BlockPtr,
- CGM.getLangOpts().OpenCL ? 2 : 3);
-
- // Add the block literal.
+ llvm::Type *GenBlockTy = CGM.getGenericBlockLiteralType();
+ llvm::Value *Func = nullptr;
+ QualType FnType = BPT->getPointeeType();
+ ASTContext &Ctx = getContext();
CallArgList Args;
- QualType VoidPtrQualTy = getContext().VoidPtrTy;
- llvm::Type *GenericVoidPtrTy = VoidPtrTy;
if (getLangOpts().OpenCL) {
- GenericVoidPtrTy = CGM.getOpenCLRuntime().getGenericVoidPointerType();
- VoidPtrQualTy =
- getContext().getPointerType(getContext().getAddrSpaceQualType(
- getContext().VoidTy, LangAS::opencl_generic));
- }
-
- BlockPtr = Builder.CreatePointerCast(BlockPtr, GenericVoidPtrTy);
- Args.add(RValue::get(BlockPtr), VoidPtrQualTy);
-
- QualType FnType = BPT->getPointeeType();
+ // For OpenCL, BlockPtr is already casted to generic block literal.
+
+ // First argument of a block call is a generic block literal casted to
+ // generic void pointer, i.e. i8 addrspace(4)*
+ llvm::Value *BlockDescriptor = Builder.CreatePointerCast(
+ BlockPtr, CGM.getOpenCLRuntime().getGenericVoidPointerType());
+ QualType VoidPtrQualTy = Ctx.getPointerType(
+ Ctx.getAddrSpaceQualType(Ctx.VoidTy, LangAS::opencl_generic));
+ Args.add(RValue::get(BlockDescriptor), VoidPtrQualTy);
+ // And the rest of the arguments.
+ EmitCallArgs(Args, FnType->getAs<FunctionProtoType>(), E->arguments());
+
+ // We *can* call the block directly unless it is a function argument.
+ if (!isa<ParmVarDecl>(E->getCalleeDecl()))
+ Func = CGM.getOpenCLRuntime().getInvokeFunction(E->getCallee());
+ else {
+ llvm::Value *FuncPtr = Builder.CreateStructGEP(GenBlockTy, BlockPtr, 2);
+ Func = Builder.CreateAlignedLoad(FuncPtr, getPointerAlign());
+ }
+ } else {
+ // Bitcast the block literal to a generic block literal.
+ BlockPtr = Builder.CreatePointerCast(
+ BlockPtr, llvm::PointerType::get(GenBlockTy, 0), "block.literal");
+ // Get pointer to the block invoke function
+ llvm::Value *FuncPtr = Builder.CreateStructGEP(GenBlockTy, BlockPtr, 3);
- // And the rest of the arguments.
- EmitCallArgs(Args, FnType->getAs<FunctionProtoType>(), E->arguments());
+ // First argument is a block literal casted to a void pointer
+ BlockPtr = Builder.CreatePointerCast(BlockPtr, VoidPtrTy);
+ Args.add(RValue::get(BlockPtr), Ctx.VoidPtrTy);
+ // And the rest of the arguments.
+ EmitCallArgs(Args, FnType->getAs<FunctionProtoType>(), E->arguments());
- // Load the function.
- llvm::Value *Func = Builder.CreateAlignedLoad(FuncPtr, getPointerAlign());
+ // Load the function.
+ Func = Builder.CreateAlignedLoad(FuncPtr, getPointerAlign());
+ }
const FunctionType *FuncTy = FnType->castAs<FunctionType>();
const CGFunctionInfo &FnInfo =
diff --git a/lib/CodeGen/CGOpenCLRuntime.cpp b/lib/CodeGen/CGOpenCLRuntime.cpp
index 7f6f595dd5..75003e569f 100644
--- a/lib/CodeGen/CGOpenCLRuntime.cpp
+++ b/lib/CodeGen/CGOpenCLRuntime.cpp
@@ -123,6 +123,23 @@ llvm::PointerType *CGOpenCLRuntime::getGenericVoidPointerType() {
CGM.getContext().getTargetAddressSpace(LangAS::opencl_generic));
}
+// Get the block literal from an expression derived from the block expression.
+// OpenCL v2.0 s6.12.5:
+// Block variable declarations are implicitly qualified with const. Therefore
+// all block variables must be initialized at declaration time and may not be
+// reassigned.
+static const BlockExpr *getBlockExpr(const Expr *E) {
+ const Expr *Prev = nullptr; // to make sure we do not stuck in infinite loop.
+ while(!isa<BlockExpr>(E) && E != Prev) {
+ Prev = E;
+ E = E->IgnoreCasts();
+ if (auto DR = dyn_cast<DeclRefExpr>(E)) {
+ E = cast<VarDecl>(DR->getDecl())->getInit();
+ }
+ }
+ return cast<BlockExpr>(E);
+}
+
/// Record emitted llvm invoke function and llvm block literal for the
/// corresponding block expression.
void CGOpenCLRuntime::recordBlockInfo(const BlockExpr *E,
@@ -137,20 +154,17 @@ void CGOpenCLRuntime::recordBlockInfo(const BlockExpr *E,
EnqueuedBlockMap[E].Kernel = nullptr;
}
+llvm::Function *CGOpenCLRuntime::getInvokeFunction(const Expr *E) {
+ return EnqueuedBlockMap[getBlockExpr(E)].InvokeFunc;
+}
+
CGOpenCLRuntime::EnqueuedBlockInfo
CGOpenCLRuntime::emitOpenCLEnqueuedBlock(CodeGenFunction &CGF, const Expr *E) {
CGF.EmitScalarExpr(E);
// The block literal may be assigned to a const variable. Chasing down
// to get the block literal.
- if (auto DR = dyn_cast<DeclRefExpr>(E)) {
- E = cast<VarDecl>(DR->getDecl())->getInit();
- }
- E = E->IgnoreImplicit();
- if (auto Cast = dyn_cast<CastExpr>(E)) {
- E = Cast->getSubExpr();
- }
- auto *Block = cast<BlockExpr>(E);
+ const BlockExpr *Block = getBlockExpr(E);
assert(EnqueuedBlockMap.find(Block) != EnqueuedBlockMap.end() &&
"Block expression not emitted");
diff --git a/lib/CodeGen/CGOpenCLRuntime.h b/lib/CodeGen/CGOpenCLRuntime.h
index 750721f1b8..4effc7eaa8 100644
--- a/lib/CodeGen/CGOpenCLRuntime.h
+++ b/lib/CodeGen/CGOpenCLRuntime.h
@@ -92,6 +92,10 @@ public:
/// \param Block block literal emitted for the block expression.
void recordBlockInfo(const BlockExpr *E, llvm::Function *InvokeF,
llvm::Value *Block);
+
+ /// \return LLVM block invoke function emitted for an expression derived from
+ /// the block expression.
+ llvm::Function *getInvokeFunction(const Expr *E);
};
}
diff --git a/test/CodeGenOpenCL/blocks.cl b/test/CodeGenOpenCL/blocks.cl
index 19aacc3f0d..ab5a2c643c 100644
--- a/test/CodeGenOpenCL/blocks.cl
+++ b/test/CodeGenOpenCL/blocks.cl
@@ -39,11 +39,8 @@ void foo(){
// SPIR: %[[blk_gen_ptr:.*]] = addrspacecast %struct.__opencl_block_literal_generic* %[[blk_ptr]] to %struct.__opencl_block_literal_generic addrspace(4)*
// SPIR: store %struct.__opencl_block_literal_generic addrspace(4)* %[[blk_gen_ptr]], %struct.__opencl_block_literal_generic addrspace(4)** %[[block_B:.*]],
// SPIR: %[[block_literal:.*]] = load %struct.__opencl_block_literal_generic addrspace(4)*, %struct.__opencl_block_literal_generic addrspace(4)** %[[block_B]]
- // SPIR: %[[invoke_addr:.*]] = getelementptr inbounds %struct.__opencl_block_literal_generic, %struct.__opencl_block_literal_generic addrspace(4)* %[[block_literal]], i32 0, i32 2
// SPIR: %[[blk_gen_ptr:.*]] = bitcast %struct.__opencl_block_literal_generic addrspace(4)* %[[block_literal]] to i8 addrspace(4)*
- // SPIR: %[[invoke_func_ptr:.*]] = load i8 addrspace(4)*, i8 addrspace(4)* addrspace(4)* %[[invoke_addr]]
- // SPIR: %[[invoke_func:.*]] = addrspacecast i8 addrspace(4)* %[[invoke_func_ptr]] to i32 (i8 addrspace(4)*)*
- // SPIR: call {{.*}}i32 %[[invoke_func]](i8 addrspace(4)* %[[blk_gen_ptr]])
+ // SPIR: call {{.*}}i32 @__foo_block_invoke(i8 addrspace(4)* %[[blk_gen_ptr]])
// AMDGCN: %[[block_invoke:.*]] = getelementptr inbounds <{ i32, i32, i8*, i32 }>, <{ i32, i32, i8*, i32 }> addrspace(5)* %[[block:.*]], i32 0, i32 2
// AMDGCN: store i8* bitcast (i32 (i8*)* @__foo_block_invoke to i8*), i8* addrspace(5)* %[[block_invoke]]
// AMDGCN: %[[block_captured:.*]] = getelementptr inbounds <{ i32, i32, i8*, i32 }>, <{ i32, i32, i8*, i32 }> addrspace(5)* %[[block]], i32 0, i32 3
@@ -53,11 +50,8 @@ void foo(){
// AMDGCN: %[[blk_gen_ptr:.*]] = addrspacecast %struct.__opencl_block_literal_generic addrspace(5)* %[[blk_ptr]] to %struct.__opencl_block_literal_generic*
// AMDGCN: store %struct.__opencl_block_literal_generic* %[[blk_gen_ptr]], %struct.__opencl_block_literal_generic* addrspace(5)* %[[block_B:.*]],
// AMDGCN: %[[block_literal:.*]] = load %struct.__opencl_block_literal_generic*, %struct.__opencl_block_literal_generic* addrspace(5)* %[[block_B]]
- // AMDGCN: %[[invoke_addr:.*]] = getelementptr inbounds %struct.__opencl_block_literal_generic, %struct.__opencl_block_literal_generic* %[[block_literal]], i32 0, i32 2
// AMDGCN: %[[blk_gen_ptr:.*]] = bitcast %struct.__opencl_block_literal_generic* %[[block_literal]] to i8*
- // AMDGCN: %[[invoke_func_ptr:.*]] = load i8*, i8** %[[invoke_addr]]
- // AMDGCN: %[[invoke_func:.*]] = bitcast i8* %[[invoke_func_ptr]] to i32 (i8*)*
- // AMDGCN: call {{.*}}i32 %[[invoke_func]](i8* %[[blk_gen_ptr]])
+ // AMDGCN: call {{.*}}i32 @__foo_block_invoke(i8* %[[blk_gen_ptr]])
int (^ block_B)(void) = ^{
return i;
diff --git a/test/CodeGenOpenCL/cl20-device-side-enqueue.cl b/test/CodeGenOpenCL/cl20-device-side-enqueue.cl
index 84450162da..1566912ded 100644
--- a/test/CodeGenOpenCL/cl20-device-side-enqueue.cl
+++ b/test/CodeGenOpenCL/cl20-device-side-enqueue.cl
@@ -312,9 +312,7 @@ kernel void device_side_enqueue(global int *a, global int *b, int i) {
};
// Uses global block literal [[BLG8]] and invoke function [[INVG8]].
- // COMMON: [[r1:%.*]] = load i8 addrspace(4)*, i8 addrspace(4)* addrspace(4)* getelementptr inbounds (%struct.__opencl_block_literal_generic, %struct.__opencl_block_literal_generic addrspace(4)* addrspacecast (%struct.__opencl_block_literal_generic addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to %struct.__opencl_block_literal_generic addrspace(1)*) to %struct.__opencl_block_literal_generic addrspace(4)*), i32 0, i32 2)
- // COMMON: [[r2:%.*]] = addrspacecast i8 addrspace(4)* [[r1]] to void (i8 addrspace(4)*)*
- // COMMON: call spir_func void [[r2]](i8 addrspace(4)* addrspacecast (i8 addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to i8 addrspace(1)*) to i8 addrspace(4)*))
+ // COMMON: call spir_func void @__device_side_enqueue_block_invoke_11(i8 addrspace(4)* addrspacecast (i8 addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to i8 addrspace(1)*) to i8 addrspace(4)*))
block_A();
// Emits global block literal [[BLG8]] and block kernel [[INVGK8]]. [[INVGK8]] calls [[INVG8]].
@@ -333,15 +331,35 @@ kernel void device_side_enqueue(global int *a, global int *b, int i) {
unsigned size = get_kernel_work_group_size(block_A);
// Uses global block literal [[BLG8]] and invoke function [[INVG8]]. Make sure no redundant block literal and invoke functions are emitted.
- // COMMON: [[r1:%.*]] = load i8 addrspace(4)*, i8 addrspace(4)* addrspace(4)* getelementptr inbounds (%struct.__opencl_block_literal_generic, %struct.__opencl_block_literal_generic addrspace(4)* addrspacecast (%struct.__opencl_block_literal_generic addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to %struct.__opencl_block_literal_generic addrspace(1)*) to %struct.__opencl_block_literal_generic addrspace(4)*), i32 0, i32 2)
- // COMMON: [[r2:%.*]] = addrspacecast i8 addrspace(4)* [[r1]] to void (i8 addrspace(4)*)*
- // COMMON: call spir_func void [[r2]](i8 addrspace(4)* addrspacecast (i8 addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to i8 addrspace(1)*) to i8 addrspace(4)*))
+ // COMMON: call spir_func void @__device_side_enqueue_block_invoke_11(i8 addrspace(4)* addrspacecast (i8 addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BLG8]] to i8 addrspace(1)*) to i8 addrspace(4)*))
block_A();
+ // Make sure that block invoke function is resolved correctly after sequence of assignements.
+ // COMMON: store %struct.__opencl_block_literal_generic addrspace(4)*
+ // COMMON-SAME: addrspacecast (%struct.__opencl_block_literal_generic addrspace(1)*
+ // COMMON-SAME: bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BL_GLOBAL]] to %struct.__opencl_block_literal_generic addrspace(1)*)
+ // COMMON-SAME: to %struct.__opencl_block_literal_generic addrspace(4)*),
+ // COMMON-SAME: %struct.__opencl_block_literal_generic addrspace(4)** %b1,
+ bl_t b1 = block_G;
+ // COMMON: store %struct.__opencl_block_literal_generic addrspace(4)*
+ // COMMON-SAME: addrspacecast (%struct.__opencl_block_literal_generic addrspace(1)*
+ // COMMON-SAME: bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BL_GLOBAL]] to %struct.__opencl_block_literal_generic addrspace(1)*)
+ // COMMON-SAME: to %struct.__opencl_block_literal_generic addrspace(4)*),
+ // COMMON-SAME: %struct.__opencl_block_literal_generic addrspace(4)** %b2,
+ bl_t b2 = b1;
+ // COMMON: call spir_func void @block_G_block_invoke(i8 addrspace(4)* addrspacecast (i8 addrspace(1)*
+ // COMMON-SAME: bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BL_GLOBAL]] to i8 addrspace(1)*)
+ // COOMON-SAME: to i8 addrspace(4)*), i8 addrspace(3)* null)
+ b2(0);
+ // Uses global block literal [[BL_GLOBAL]] and block kernel [[INV_G_K]]. [[INV_G_K]] calls [[INV_G]].
+ // COMMON: call i32 @__get_kernel_preferred_work_group_size_multiple_impl(
+ // COMMON-SAME: i8 addrspace(4)* addrspacecast (i8* bitcast ({{.*}} [[INV_G_K:[^ ]+_kernel]] to i8*) to i8 addrspace(4)*),
+ // COMMON-SAME: i8 addrspace(4)* addrspacecast (i8 addrspace(1)* bitcast ({ i32, i32, i8 addrspace(4)* } addrspace(1)* [[BL_GLOBAL]] to i8 addrspace(1)*) to i8 addrspace(4)*))
+ size = get_kernel_preferred_work_group_size_multiple(b2);
+
void (^block_C)(void) = ^{
callee(i, a);
};
-
// Emits block literal on stack and block kernel [[INVLK3]].
// COMMON: store i8 addrspace(4)* addrspacecast (i8* bitcast (void (i8 addrspace(4)*)* [[INVL3:@__device_side_enqueue_block_invoke[^ ]*]] to i8*) to i8 addrspace(4)*), i8 addrspace(4)** %block.invoke
// COMMON: [[DEF_Q:%[0-9]+]] = load %opencl.queue_t{{.*}}*, %opencl.queue_t{{.*}}** %default_queue
@@ -404,8 +422,8 @@ kernel void device_side_enqueue(global int *a, global int *b, int i) {
// COMMON: define internal spir_func void [[INVG8]](i8 addrspace(4)*{{.*}})
// COMMON: define internal spir_func void [[INVG9]](i8 addrspace(4)*{{.*}}, i8 addrspace(3)* %{{.*}})
// COMMON: define internal spir_kernel void [[INVGK8]](i8 addrspace(4)*{{.*}})
+// COMMON: define internal spir_kernel void [[INV_G_K]](i8 addrspace(4)*{{.*}}, i8 addrspace(3)*{{.*}})
// COMMON: define internal spir_kernel void [[INVLK3]](i8 addrspace(4)*{{.*}})
// COMMON: define internal spir_kernel void [[INVGK9]](i8 addrspace(4)*{{.*}}, i8 addrspace(3)*{{.*}})
-// COMMON: define internal spir_kernel void [[INV_G_K]](i8 addrspace(4)*{{.*}}, i8 addrspace(3)*{{.*}})
// COMMON: define internal spir_kernel void [[INVGK10]](i8 addrspace(4)*{{.*}})
// COMMON: define internal spir_kernel void [[INVGK11]](i8 addrspace(4)*{{.*}})
--
2.21.0

View File

@ -1,57 +0,0 @@
From 94a65066cccbe50358dca0a9da7712cf5294912a Mon Sep 17 00:00:00 2001
From: Yaxun Liu <Yaxun.Liu@amd.com>
Date: Tue, 26 Feb 2019 16:20:41 +0000
Subject: [PATCH 3/3] [OpenCL] Fix assertion due to blocks
A recent change caused assertion in CodeGenFunction::EmitBlockCallExpr when a block is called.
There is code
Func = CGM.getOpenCLRuntime().getInvokeFunction(E->getCallee());
getCalleeDecl calls Expr::getReferencedDeclOfCallee, which does not handle
BlockExpr and returns nullptr, which causes isa to assert.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D58658
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354893 91177308-0d34-0410-b5e6-96231b3b80d8
---
lib/AST/Expr.cpp | 2 ++
test/CodeGenOpenCL/blocks.cl | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 7cdd3b2c2a..50a65e02bf 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -1359,6 +1359,8 @@ Decl *Expr::getReferencedDeclOfCallee() {
return DRE->getDecl();
if (MemberExpr *ME = dyn_cast<MemberExpr>(CEE))
return ME->getMemberDecl();
+ if (auto *BE = dyn_cast<BlockExpr>(CEE))
+ return BE->getBlockDecl();
return nullptr;
}
diff --git a/test/CodeGenOpenCL/blocks.cl b/test/CodeGenOpenCL/blocks.cl
index ab5a2c643c..c3e26855df 100644
--- a/test/CodeGenOpenCL/blocks.cl
+++ b/test/CodeGenOpenCL/blocks.cl
@@ -90,6 +90,12 @@ int get42() {
return blockArgFunc(^{return 42;});
}
+// COMMON-LABEL: define {{.*}}@call_block
+// call {{.*}}@__call_block_block_invoke
+int call_block() {
+ return ^int(int num) { return num; } (11);
+}
+
// CHECK-DEBUG: !DIDerivedType(tag: DW_TAG_member, name: "__size"
// CHECK-DEBUG: !DIDerivedType(tag: DW_TAG_member, name: "__align"
--
2.21.0

View File

@ -3,13 +3,15 @@
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=clang
pkgver=11.1.0
pkgver=12.0.0
pkgrel=1
pkgdesc="C language family frontend for LLVM"
arch=(x86_64 powerpc64le powerpc)
url="https://clang.llvm.org/"
license=('custom:Apache 2.0 with LLVM Exception')
depends=('llvm-libs' 'gcc' 'compiler-rt')
depends=('llvm-libs' 'gcc')
depends_powerpc64le=('compiler-rt')
depends_x86_64=('compiler-rt')
makedepends=('llvm' 'cmake' 'ninja' 'python-sphinx' 'python2')
optdepends=('openmp: OpenMP support in clang with -fopenmp'
'python: for scan-view and git-clang-format'
@ -21,21 +23,29 @@ _source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkg
source=($_source_base/$pkgname-$pkgver.src.tar.xz{,.sig}
$_source_base/clang-tools-extra-$pkgver.src.tar.xz{,.sig}
$_source_base/llvm-$pkgver.src.tar.xz{,.sig}
enable-SSP-and-PIE-by-default.patch)
sha256sums=('0a8288f065d1f57cb6d96da4d2965cbea32edc572aa972e466e954d17148558b'
partially-revert-scan-view-remove-Reporter.py.patch
opencl-respect-calling-convention-for-builtin.patch
clangd-CompletionModel-cmake.patch
clang-link-with-Bsymbolic-functions.patch
enable-SSP-and-PIE-by-default.patch
clang-001-fix-unwind-chain-inclusion.patch
clang-002-ppc64-dynamic-linker-path.patch)
sha256sums=('e26e452e91d4542da3ebbf404f024d3e1cbf103f4cd110c26bf0a19621cca9ed'
'SKIP'
'76707c249de7a9cde3456b960c9a36ed9bbde8e3642c01f0ef61a43d61e0c1a2'
'ad41e0b527a65ade95c1ba690a5434cefaab4a2daa1be307caaa1e8541fe6d5c'
'SKIP'
'ce8508e318a01a63d4e8b3090ab2ded3c598a50258cc49e2625b9120d4c03ea5'
'49dc47c8697a1a0abd4ee51629a696d7bfe803662f2a7252a3b16fc75f3a8b50'
'SKIP'
'248a0e8609b00689e82ce5e05e1de58b7c8ae09a35bbb9625e9069e1f13d2fec')
'68be2fb78e62f76702a156d4c1759b4c6f0d805e1b492e9c6f490ce40862138d'
'859d34dac43999edfc4c33e1cbb6e7458921fa9f16a93514701c1a9706665d24'
'6739abedc8870879618414c5358fda4fcfd4a3ac7a22030ac7c409779b68f669'
'5bc0b47c70990bb8dd0cf4138a8ab9e15cf6b008b7c0cf2c7aac3736b559e0e6'
'a877fa5cf1c1cca3bd55f9a36cf8c1bdd061ff398aeace90fe3cbd9e82550da3'
'b194d6a69450c20bdee3fe678e85288229ce169c770e2d7dc18a98527c461ef3'
'58bd0b1e6a685778732969e1a3a7a4b6a99b50f7e2e376aea33ff2333d0810e8')
validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>
export CFLAGS=${CFLAGS/-flto=auto/}
export CXXFLAGS=${CXXFLAGS/-flto=auto/}
export LDFLAGS=${LDFLAGS/-flto=auto/}
# Utilizing LLVM_DISTRIBUTION_COMPONENTS to avoid
# installing static libraries; inspired by Gentoo
_get_distribution_components() {
@ -63,6 +73,19 @@ prepare() {
mkdir build
mv "$srcdir/clang-tools-extra-$pkgver.src" tools/extra
patch -Np2 -i ../enable-SSP-and-PIE-by-default.patch
# Some fixes from the release/12.x branch
patch -Np2 -i ../partially-revert-scan-view-remove-Reporter.py.patch
patch -Np2 -i ../opencl-respect-calling-convention-for-builtin.patch
# https://bugs.llvm.org/show_bug.cgi?id=49990
patch -Np2 -d tools/extra <../clangd-CompletionModel-cmake.patch
# https://bugs.archlinux.org/task/70697
patch -Np2 -i ../clang-link-with-Bsymbolic-functions.patch
patch -Np1 -i ${srcdir}/clang-001-fix-unwind-chain-inclusion.patch
patch -Np1 -i ${srcdir}/clang-002-ppc64-dynamic-linker-path.patch
}
build() {
@ -72,7 +95,6 @@ build() {
-G Ninja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=/usr
-DPYTHON_EXECUTABLE=/usr/bin/python
-DLLVM_LINK_LLVM_DYLIB=ON
-DCLANG_LINK_CLANG_DYLIB=ON
-DLLVM_ENABLE_RTTI=ON
@ -84,6 +106,12 @@ build() {
-DLLVM_EXTERNAL_LIT=/usr/bin/lit
-DLLVM_MAIN_SRC_DIR="$srcdir/llvm-$pkgver.src"
)
case "${CARCH}" in
powerpc)
LDFLAGS+=' -Wl,--no-keep-memory'
cmake_args+=(-DCLANG_ENABLE_CLANGD=OFF)
;;
esac
cmake .. "${cmake_args[@]}"
local distribution_components=$(_get_distribution_components | paste -sd\;)

View File

@ -1,44 +0,0 @@
From 352974169f0d2b5da3d5321f588f5e3b5941330e Mon Sep 17 00:00:00 2001
From: Andrea Brancaleoni <miwaxe@gmail.com>
Date: Tue, 8 Sep 2015 22:14:57 +0200
Subject: [PATCH 2/7] fix unwind chain inclusion
---
lib/Headers/unwind.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/Headers/unwind.h b/lib/Headers/unwind.h
index 303d792..44e10cc 100644
--- a/lib/Headers/unwind.h
+++ b/lib/Headers/unwind.h
@@ -9,9 +9,6 @@
/* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
-#ifndef __CLANG_UNWIND_H
-#define __CLANG_UNWIND_H
-
#if defined(__APPLE__) && __has_include_next(<unwind.h>)
/* Darwin (from 11.x on) provide an unwind.h. If that's available,
* use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
@@ -39,6 +36,9 @@
# endif
#else
+#ifndef __CLANG_UNWIND_H
+#define __CLANG_UNWIND_H
+
#include <stdint.h>
#ifdef __cplusplus
@@ -322,6 +322,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *);
}
#endif
+#endif /* __CLANG_UNWIND_H */
+
#endif
-#endif /* __CLANG_UNWIND_H */
--
2.5.1

View File

@ -1,18 +0,0 @@
--- a/lib/Driver/ToolChains/Linux.cpp
+++ b/lib/Driver/ToolChains/Linux.cpp
@@ -593,12 +593,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
Loader = "ld.so.1";
break;
case llvm::Triple::ppc64:
- LibDir = "lib64";
+ LibDir = "lib";
Loader =
- (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1";
+ (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2";
break;
case llvm::Triple::ppc64le:
- LibDir = "lib64";
+ LibDir = "lib";
Loader =
(tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2";
break;

View File

@ -1,26 +0,0 @@
From 45e92fcf45def2b59c06b6407c73b798eaa321ae Mon Sep 17 00:00:00 2001
From: Julie Hockett <juliehockett@google.com>
Date: Fri, 29 Mar 2019 16:56:36 +0000
Subject: [PATCH] [clang-doc] Build as clang_tool
Instead of as clang_executable.
Differential Revision: https://reviews.llvm.org/D59974
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@357274 91177308-0d34-0410-b5e6-96231b3b80d8
---
clang-doc/tool/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang-doc/tool/CMakeLists.txt b/clang-doc/tool/CMakeLists.txt
index d7f28cf681..35f99ea08e 100644
--- a/clang-doc/tool/CMakeLists.txt
+++ b/clang-doc/tool/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
-add_clang_executable(clang-doc
+add_clang_tool(clang-doc
ClangDocMain.cpp
)

View File

@ -0,0 +1,63 @@
From 4f05f4c8e66bc76b1d94f5283494404382e3bacd Mon Sep 17 00:00:00 2001
From: Fangrui Song <i@maskray.me>
Date: Thu, 13 May 2021 13:44:57 -0700
Subject: [PATCH] [CMake][ELF] Link libLLVM.so and libclang-cpp.so with
-Bsymbolic-functions
llvm-dev message: https://lists.llvm.org/pipermail/llvm-dev/2021-May/150465.html
In an ELF shared object, a default visibility defined symbol is preemptible by
default. This creates some missed optimization opportunities.
-Bsymbolic-functions is more aggressive than our current -fvisibility-inlines-hidden
(present since 2012) as it applies to all function definitions. It can
* avoid PLT for cross-TU function calls && reduce dynamic symbol lookup
* reduce dynamic symbol lookup for taking function addresses and optimize out GOT/TOC on x86-64/ppc64
In a -DLLVM_TARGETS_TO_BUILD=X86 build, the number of JUMP_SLOT decreases from 12716 to 1628, and the number of GLOB_DAT decreases from 1918 to 1313
The built clang with `-DLLVM_LINK_LLVM_DYLIB=on -DCLANG_LINK_CLANG_DYLIB=on` is significantly faster.
See the Linux kernel build result https://bugs.archlinux.org/task/70697
Note: the performance of -fno-semantic-interposition -Bsymbolic-functions
libLLVM.so and libclang-cpp.so is close to a PIE binary linking against
`libLLVM*.a` and `libclang*.a`. When the host compiler is Clang,
-Bsymbolic-functions is the major contributor. On x86-64 (with GOTPCRELX) and
ppc64 ELFv2, the GOT/TOC relocations can be optimized.
Some implication:
Interposing a subset of functions is no longer supported.
(This is fragile on ELF and unsupported on Mach-O at all. For Mach-O we don't
use `ld -interpose` or `-flat_namespace`)
Compiling a program which takes the address of any LLVM function with
`{gcc,clang} -fno-pic` and expects the address to equal to the address taken
from libLLVM.so or libclang-cpp.so is unsupported. I am fairly confident that
llvm-project shouldn't have different behaviors depending on such pointer
equality (as we've been using -fvisibility-inlines-hidden which applies to
inline functions for a long time), but if we accidentally do, users should be
aware that they should not make assumption on pointer equality in `-fno-pic`
mode.
See more on https://maskray.me/blog/2021-05-09-fno-semantic-interposition
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D102090
---
clang/tools/clang-shlib/CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt
index 5949223fc8e3..d08cf8938328 100644
--- a/clang/tools/clang-shlib/CMakeLists.txt
+++ b/clang/tools/clang-shlib/CMakeLists.txt
@@ -48,3 +48,8 @@ add_clang_library(clang-cpp
${_OBJECTS}
LINK_LIBS
${_DEPS})
+# Optimize function calls for default visibility definitions to avoid PLT and
+# reduce dynamic relocations.
+if (NOT APPLE)
+ target_link_options(clang-cpp PRIVATE LINKER:-Bsymbolic-functions)
+endif()

View File

@ -0,0 +1,66 @@
From f51ab1871655a9a96134c2636c37dcb5a6b01ac3 Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton@redhat.com>
Date: Mon, 22 Mar 2021 10:05:25 +0100
Subject: [PATCH] Make clangd CompletionModel usable even with non-standard
(but supported) layout
llvm supports specifying a non-standard layout where each project lies in its
own place. Do not assume a fixed layout and use the appropriate cmake variable
instead.
Differential Revision: https://reviews.llvm.org/D96787
---
clang-tools-extra/clangd/quality/CompletionModel.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang-tools-extra/clangd/quality/CompletionModel.cmake b/clang-tools-extra/clangd/quality/CompletionModel.cmake
index 60c6d2aa8433..41bc2ed1890b 100644
--- a/clang-tools-extra/clangd/quality/CompletionModel.cmake
+++ b/clang-tools-extra/clangd/quality/CompletionModel.cmake
@@ -5,8 +5,8 @@
# will define a C++ class called ${cpp_class} - which may be a
# namespace-qualified class name.
function(gen_decision_forest model filename cpp_class)
- set(model_compiler ${CMAKE_SOURCE_DIR}/../clang-tools-extra/clangd/quality/CompletionModelCodegen.py)
-
+ set(model_compiler ${LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR}/clangd/quality/CompletionModelCodegen.py)
+
set(output_dir ${CMAKE_CURRENT_BINARY_DIR})
set(header_file ${output_dir}/${filename}.h)
set(cpp_file ${output_dir}/${filename}.cpp)
From 7907c46fe6195728fafd843b8c0fb19a3e68e9ad Mon Sep 17 00:00:00 2001
From: Harald van Dijk <harald@gigawatt.nl>
Date: Wed, 5 May 2021 19:25:34 +0100
Subject: [PATCH] Make clangd CompletionModel not depend on directory layout.
The current code accounts for two possible layouts, but there is at
least a third supported layout: clang-tools-extra may also be checked
out as clang/tools/extra with the releases, which was not yet handled.
Rather than treating that as a special case, use the location of
CompletionModel.cmake to handle all three cases. This should address the
problems that prompted D96787 and the problems that prompted the
proposed revert D100625.
Reviewed By: usaxena95
Differential Revision: https://reviews.llvm.org/D101851
---
clang-tools-extra/clangd/quality/CompletionModel.cmake | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/clang-tools-extra/clangd/quality/CompletionModel.cmake b/clang-tools-extra/clangd/quality/CompletionModel.cmake
index 41bc2ed1890b..dc0c0cde4dab 100644
--- a/clang-tools-extra/clangd/quality/CompletionModel.cmake
+++ b/clang-tools-extra/clangd/quality/CompletionModel.cmake
@@ -4,8 +4,9 @@
# ${CMAKE_CURRENT_BINARY_DIR}. The generated header
# will define a C++ class called ${cpp_class} - which may be a
# namespace-qualified class name.
+set(CLANGD_COMPLETION_MODEL_COMPILER ${CMAKE_CURRENT_LIST_DIR}/CompletionModelCodegen.py)
function(gen_decision_forest model filename cpp_class)
- set(model_compiler ${LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR}/clangd/quality/CompletionModelCodegen.py)
+ set(model_compiler ${CLANGD_COMPLETION_MODEL_COMPILER})
set(output_dir ${CMAKE_CURRENT_BINARY_DIR})
set(header_file ${output_dir}/${filename}.h)

View File

@ -1,6 +1,6 @@
From bb7bdc61f8a80db9aa16370d9c9fd0ae7be825cc Mon Sep 17 00:00:00 2001
From 6878f5376dec0a3d75674d5a2076d4af911f7c7c Mon Sep 17 00:00:00 2001
From: Evangelos Foutras <evangelos@foutrelis.com>
Date: Mon, 12 Oct 2020 16:40:41 +0300
Date: Wed, 12 May 2021 08:55:14 +0300
Subject: [PATCH] Enable SSP and PIE by default
This is a minimal set of changes needed to make clang use SSP and PIE by
@ -17,26 +17,27 @@ solution, but a simple temporary fix.
Hopefully these changes will be obsoleted by the introduction upstream
of a compile-time option (https://bugs.llvm.org/show_bug.cgi?id=13410)
---
clang/lib/Driver/ToolChains/Linux.cpp | 14 ++++++++++++--
clang/lib/Driver/ToolChains/Linux.h | 1 +
clang/lib/Driver/ToolChains/Linux.cpp | 10 ++++++++--
clang/lib/Driver/ToolChains/Linux.h | 5 +++++
clang/test/Driver/cross-linux.c | 16 ++++++++--------
clang/test/Driver/env.c | 2 +-
clang/test/Driver/fsanitize.c | 14 +++++++-------
clang/test/Driver/gcc-toolchain.cpp | 2 +-
clang/test/Driver/hexagon-toolchain-elf.c | 2 +-
clang/test/Driver/hip-fpie-option.hip | 4 ++--
clang/test/Driver/linux-as.c | 4 ++--
clang/test/Driver/linux-ld.c | 2 ++
clang/test/Driver/ppc-abi.c | 16 +++++++++-------
clang/test/Driver/ppc-abi.c | 18 +++++++++++-------
clang/test/Driver/riscv32-toolchain.c | 4 ++--
clang/test/Driver/riscv64-toolchain.c | 4 ++--
clang/test/Driver/stack-protector.c | 4 ++--
13 files changed, 50 insertions(+), 35 deletions(-)
14 files changed, 54 insertions(+), 37 deletions(-)
diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
index 180350476c3..119f32ceec6 100644
index 9663a7390ada..2f8d01092557 100644
--- a/clang/lib/Driver/ToolChains/Linux.cpp
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
@@ -819,8 +819,18 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs,
@@ -832,8 +832,14 @@ void Linux::AddIAMCUIncludeArgs(const ArgList &DriverArgs,
}
bool Linux::isPIEDefault() const {
@ -50,27 +51,34 @@ index 180350476c3..119f32ceec6 100644
+ getTriple().isMusl() || getSanitizerArgs().requiresPIE();
+
+ return true;
+}
+
+unsigned Linux::GetDefaultStackProtectorLevel(bool KernelOrKext) const {
+ return 2;
}
bool Linux::isNoExecStackDefault() const {
diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h
index 6b16b0e6499..d0024110aef 100644
index 6b16b0e64990..04c4d176ca71 100644
--- a/clang/lib/Driver/ToolChains/Linux.h
+++ b/clang/lib/Driver/ToolChains/Linux.h
@@ -39,6 +39,7 @@ public:
@@ -10,6 +10,7 @@
#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_LINUX_H
#include "Gnu.h"
+#include "clang/Basic/LangOptions.h"
#include "clang/Driver/ToolChain.h"
namespace clang {
@@ -39,6 +40,10 @@ public:
bool isPIEDefault() const override;
bool isNoExecStackDefault() const override;
bool IsMathErrnoDefault() const override;
+ unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override;
+ LangOptions::StackProtectorMode
+ GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
+ return LangOptions::SSPStrong;
+ }
SanitizerMask getSupportedSanitizers() const override;
void addProfileRTLibs(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs) const override;
diff --git a/clang/test/Driver/cross-linux.c b/clang/test/Driver/cross-linux.c
index 6c2dab26069..c28c5653e34 100644
index 6c2dab260695..c28c5653e348 100644
--- a/clang/test/Driver/cross-linux.c
+++ b/clang/test/Driver/cross-linux.c
@@ -42,8 +42,8 @@
@ -118,7 +126,7 @@ index 6c2dab26069..c28c5653e34 100644
// CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib"
// CHECK-MULTI64-X86-64: "-L[[sysroot]]/lib"
diff --git a/clang/test/Driver/env.c b/clang/test/Driver/env.c
index 0371bc91c4a..ea89f525121 100644
index 0371bc91c4a3..ea89f5251217 100644
--- a/clang/test/Driver/env.c
+++ b/clang/test/Driver/env.c
@@ -20,7 +20,7 @@
@ -131,10 +139,10 @@ index 0371bc91c4a..ea89f525121 100644
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib"
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.."
diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c
index 7340bfb35e4..681bb90b50e 100644
index 8926d55a0cf4..40f628ccae45 100644
--- a/clang/test/Driver/fsanitize.c
+++ b/clang/test/Driver/fsanitize.c
@@ -329,15 +329,15 @@
@@ -330,15 +330,15 @@
// RUN: %clang -target x86_64-linux-gnu -fsanitize=vptr -fno-sanitize=vptr -fsanitize=undefined,address %s -### 2>&1
// OK
@ -154,7 +162,7 @@ index 7340bfb35e4..681bb90b50e 100644
// CHECK-NO-PIE-NOT: "-pie"
// CHECK-NO-PIE: "-mrelocation-model" "static"
@@ -662,12 +662,12 @@
@@ -667,12 +667,12 @@
// RUN: %clang -fno-sanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NOSP
// NOSP-NOT: "-fsanitize=safe-stack"
@ -171,7 +179,7 @@ index 7340bfb35e4..681bb90b50e 100644
// NO-SP-NOT: stack-protector
// NO-SP: "-fsanitize=safe-stack"
diff --git a/clang/test/Driver/gcc-toolchain.cpp b/clang/test/Driver/gcc-toolchain.cpp
index 6c872f4255c..f5006d1dd9a 100644
index 6c872f4255c3..f5006d1dd9ab 100644
--- a/clang/test/Driver/gcc-toolchain.cpp
+++ b/clang/test/Driver/gcc-toolchain.cpp
@@ -26,6 +26,6 @@
@ -183,7 +191,7 @@ index 6c872f4255c..f5006d1dd9a 100644
// CHECK: "-L[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5"
// CHECK: "-L[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../.."
diff --git a/clang/test/Driver/hexagon-toolchain-elf.c b/clang/test/Driver/hexagon-toolchain-elf.c
index cc11f9fcba9..1fe8b5db587 100644
index cc11f9fcba9e..1fe8b5db587b 100644
--- a/clang/test/Driver/hexagon-toolchain-elf.c
+++ b/clang/test/Driver/hexagon-toolchain-elf.c
@@ -487,7 +487,7 @@
@ -195,8 +203,26 @@ index cc11f9fcba9..1fe8b5db587 100644
// CHECK042: "-mllvm" "-hexagon-small-data-threshold=8"
// CHECK042-NEXT: llvm-mc
// CHECK042: "-gpsize=8"
diff --git a/clang/test/Driver/hip-fpie-option.hip b/clang/test/Driver/hip-fpie-option.hip
index 2e296a099dea..86915f1c8c25 100644
--- a/clang/test/Driver/hip-fpie-option.hip
+++ b/clang/test/Driver/hip-fpie-option.hip
@@ -5,11 +5,11 @@
// RUN: %clang -### -target x86_64-unknown-linux-gnu \
// RUN: --offload-arch=gfx906 %s -nogpulib -nogpuinc \
-// RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-STATIC %s
+// RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s
// RUN: %clang -### -target x86_64-unknown-linux-gnu \
// RUN: -fgpu-rdc --offload-arch=gfx906 %s -nogpulib -nogpuinc \
-// RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-STATIC %s
+// RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s
// RUN: %clang -### -target x86_64-unknown-linux-gnu \
// RUN: --offload-arch=gfx906 %s -nogpulib -nogpuinc \
diff --git a/clang/test/Driver/linux-as.c b/clang/test/Driver/linux-as.c
index 0959bd7ba0a..4056a672b6f 100644
index 0959bd7ba0a1..4056a672b6f9 100644
--- a/clang/test/Driver/linux-as.c
+++ b/clang/test/Driver/linux-as.c
@@ -164,7 +164,7 @@
@ -218,7 +244,7 @@ index 0959bd7ba0a..4056a672b6f 100644
// CHECK-SPARCV9PIC: as
// CHECK-SPARCV9PIC: -64
diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c
index ec539522c25..caf96020a15 100644
index 24d3c78643f8..9ea22e6e0f64 100644
--- a/clang/test/Driver/linux-ld.c
+++ b/clang/test/Driver/linux-ld.c
@@ -1,3 +1,5 @@
@ -228,10 +254,10 @@ index ec539522c25..caf96020a15 100644
// sysroot to make these tests independent of the host system.
//
diff --git a/clang/test/Driver/ppc-abi.c b/clang/test/Driver/ppc-abi.c
index aef8d8576ad..ec595f4cd96 100644
index a74a19953ca2..0452661ba5a7 100644
--- a/clang/test/Driver/ppc-abi.c
+++ b/clang/test/Driver/ppc-abi.c
@@ -1,9 +1,9 @@
@@ -1,20 +1,20 @@
// Check passing PowerPC ABI options to the backend.
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
@ -241,21 +267,24 @@ index aef8d8576ad..ec595f4cd96 100644
-// RUN: -mabi=elfv1 | FileCheck -check-prefix=CHECK-ELFv1 %s
+// RUN: -mabi=elfv1 | FileCheck -check-prefix=CHECK-ELFv1-PIE %s
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
// RUN: -mabi=elfv1-qpx | FileCheck -check-prefix=CHECK-ELFv1-QPX %s
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
@@ -11,9 +11,9 @@
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
// RUN: -mcpu=a2 -mqpx | FileCheck -check-prefix=CHECK-ELFv1-QPX %s
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN: -mcpu=a2q -mno-qpx | FileCheck -check-prefix=CHECK-ELFv1 %s
+// RUN: -mcpu=a2q -mno-qpx | FileCheck -check-prefix=CHECK-ELFv1-PIE %s
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN: -mabi=elfv2 | FileCheck -check-prefix=CHECK-ELFv2-BE %s
+// RUN: -mabi=elfv2 | FileCheck -check-prefix=CHECK-ELFv2-BE-PIE %s
// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-ELFv2 %s
@@ -33,11 +33,13 @@
-// RUN: | FileCheck -check-prefix=CHECK-ELFv2 %s
+// RUN: | FileCheck -check-prefix=CHECK-ELFv2-PIE %s
// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
// RUN: -mabi=elfv1 | FileCheck -check-prefix=CHECK-ELFv1-LE %s
// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN: -mabi=elfv2 | FileCheck -check-prefix=CHECK-ELFv2 %s
+// RUN: -mabi=elfv2 | FileCheck -check-prefix=CHECK-ELFv2-PIE %s
// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN: -mabi=altivec | FileCheck -check-prefix=CHECK-ELFv2 %s
+// RUN: -mabi=altivec | FileCheck -check-prefix=CHECK-ELFv2-PIE %s
// RUN: %clang -target powerpc64-unknown-freebsd11 %s -### 2>&1 | FileCheck --check-prefix=CHECK-ELFv1 %s
// RUN: %clang -target powerpc64-unknown-freebsd12 %s -### 2>&1 | FileCheck --check-prefix=CHECK-ELFv1 %s
@@ -26,10 +26,14 @@
// CHECK-ELFv1: "-mrelocation-model" "static"
// CHECK-ELFv1: "-target-abi" "elfv1"
@ -264,19 +293,18 @@ index aef8d8576ad..ec595f4cd96 100644
+// CHECK-ELFv1-PIE: "-target-abi" "elfv1"
+// CHECK-ELFv1-LE: "-mrelocation-model" "pic" "-pic-level" "2"
// CHECK-ELFv1-LE: "-target-abi" "elfv1"
-// CHECK-ELFv1-QPX: "-mrelocation-model" "static"
+// CHECK-ELFv1-QPX: "-mrelocation-model" "pic" "-pic-level" "2"
// CHECK-ELFv1-QPX: "-target-abi" "elfv1-qpx"
-// CHECK-ELFv2: "-mrelocation-model" "static"
+// CHECK-ELFv2: "-mrelocation-model" "pic" "-pic-level" "2"
// CHECK-ELFv2: "-mrelocation-model" "static"
// CHECK-ELFv2: "-target-abi" "elfv2"
+// CHECK-ELFv2-PIE: "-mrelocation-model" "pic" "-pic-level" "2"
+// CHECK-ELFv2-PIE: "-target-abi" "elfv2"
// CHECK-ELFv2-BE: "-mrelocation-model" "static"
// CHECK-ELFv2-BE: "-target-abi" "elfv2"
// CHECK-ELFv2-BE-PIE: "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie"
diff --git a/clang/test/Driver/riscv32-toolchain.c b/clang/test/Driver/riscv32-toolchain.c
index b83c9aafcbf..15b6f6496b2 100644
index a5852f5f3997..233d9ef003cf 100644
--- a/clang/test/Driver/riscv32-toolchain.c
+++ b/clang/test/Driver/riscv32-toolchain.c
@@ -81,7 +81,7 @@
@@ -84,7 +84,7 @@
// C-RV32-LINUX-MULTI-ILP32: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot"
// C-RV32-LINUX-MULTI-ILP32: "-m" "elf32lriscv"
// C-RV32-LINUX-MULTI-ILP32: "-dynamic-linker" "/lib/ld-linux-riscv32-ilp32.so.1"
@ -285,7 +313,7 @@ index b83c9aafcbf..15b6f6496b2 100644
// C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/lib32/ilp32"
// C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib32/ilp32"
// C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib32/ilp32"
@@ -96,7 +96,7 @@
@@ -99,7 +99,7 @@
// C-RV32-LINUX-MULTI-ILP32D: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot"
// C-RV32-LINUX-MULTI-ILP32D: "-m" "elf32lriscv"
// C-RV32-LINUX-MULTI-ILP32D: "-dynamic-linker" "/lib/ld-linux-riscv32-ilp32d.so.1"
@ -295,10 +323,10 @@ index b83c9aafcbf..15b6f6496b2 100644
// C-RV32-LINUX-MULTI-ILP32D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib32/ilp32d"
// C-RV32-LINUX-MULTI-ILP32D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib32/ilp32d"
diff --git a/clang/test/Driver/riscv64-toolchain.c b/clang/test/Driver/riscv64-toolchain.c
index 5df069eb9fd..2617551ec35 100644
index e727f20bb601..a801e5eee462 100644
--- a/clang/test/Driver/riscv64-toolchain.c
+++ b/clang/test/Driver/riscv64-toolchain.c
@@ -81,7 +81,7 @@
@@ -84,7 +84,7 @@
// C-RV64-LINUX-MULTI-LP64: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot"
// C-RV64-LINUX-MULTI-LP64: "-m" "elf64lriscv"
// C-RV64-LINUX-MULTI-LP64: "-dynamic-linker" "/lib/ld-linux-riscv64-lp64.so.1"
@ -307,7 +335,7 @@ index 5df069eb9fd..2617551ec35 100644
// C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/lib/gcc/riscv64-unknown-linux-gnu/7.2.0/lib64/lp64"
// C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib64/lp64"
// C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib64/lp64"
@@ -96,7 +96,7 @@
@@ -99,7 +99,7 @@
// C-RV64-LINUX-MULTI-LP64D: "--sysroot={{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot"
// C-RV64-LINUX-MULTI-LP64D: "-m" "elf64lriscv"
// C-RV64-LINUX-MULTI-LP64D: "-dynamic-linker" "/lib/ld-linux-riscv64-lp64d.so.1"
@ -317,7 +345,7 @@ index 5df069eb9fd..2617551ec35 100644
// C-RV64-LINUX-MULTI-LP64D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/lib64/lp64d"
// C-RV64-LINUX-MULTI-LP64D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib64/lp64d"
diff --git a/clang/test/Driver/stack-protector.c b/clang/test/Driver/stack-protector.c
index a3e40b50eed..dfffe0d6cf8 100644
index a3e40b50eed8..dfffe0d6cf85 100644
--- a/clang/test/Driver/stack-protector.c
+++ b/clang/test/Driver/stack-protector.c
@@ -3,11 +3,11 @@

View File

@ -0,0 +1,107 @@
From e0fe1c58acfa0bde36afde8354cb31fc1e0b75e2 Mon Sep 17 00:00:00 2001
From: Luke Drummond <luke.drummond@codeplay.com>
Date: Wed, 10 Mar 2021 18:14:42 +0000
Subject: [PATCH] [OpenCL] Respect calling convention for builtin
`__translate_sampler_initializer` has a calling convention of
`spir_func`, but clang generated calls to it using the default CC.
Instruction Combining was lowering these mismatching calling conventions
to `store i1* undef` which itself was subsequently lowered to a trap
instruction by simplifyCFG resulting in runtime `SIGILL`
There are arguably two bugs here: but whether there's any wisdom in
converting an obviously invalid call into a runtime crash over aborting
with a sensible error message will require further discussion. So for
now it's enough to set the right calling convention on the runtime
helper.
Reviewed By: svenh, bader
Differential Revision: https://reviews.llvm.org/D98411
(cherry picked from commit fcfd3fda71905d7c48f75a531c2265ad3b9876ea)
---
clang/lib/CodeGen/CodeGenModule.cpp | 12 +++++++-----
clang/test/CodeGenOpenCL/sampler.cl | 12 ++++++------
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 31afbc6b4262..9c9bd4e374af 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -6215,15 +6215,17 @@ llvm::SanitizerStatReport &CodeGenModule::getSanStats() {
return *SanStats;
}
+
llvm::Value *
CodeGenModule::createOpenCLIntToSamplerConversion(const Expr *E,
CodeGenFunction &CGF) {
llvm::Constant *C = ConstantEmitter(CGF).emitAbstract(E, E->getType());
- auto SamplerT = getOpenCLRuntime().getSamplerType(E->getType().getTypePtr());
- auto FTy = llvm::FunctionType::get(SamplerT, {C->getType()}, false);
- return CGF.Builder.CreateCall(CreateRuntimeFunction(FTy,
- "__translate_sampler_initializer"),
- {C});
+ auto *SamplerT = getOpenCLRuntime().getSamplerType(E->getType().getTypePtr());
+ auto *FTy = llvm::FunctionType::get(SamplerT, {C->getType()}, false);
+ auto *Call = CGF.Builder.CreateCall(
+ CreateRuntimeFunction(FTy, "__translate_sampler_initializer"), {C});
+ Call->setCallingConv(Call->getCalledFunction()->getCallingConv());
+ return Call;
}
CharUnits CodeGenModule::getNaturalPointeeTypeAlignment(
diff --git a/clang/test/CodeGenOpenCL/sampler.cl b/clang/test/CodeGenOpenCL/sampler.cl
index e6bda49f51c8..5ad8d0dbbf37 100644
--- a/clang/test/CodeGenOpenCL/sampler.cl
+++ b/clang/test/CodeGenOpenCL/sampler.cl
@@ -39,7 +39,7 @@ kernel void foo(sampler_t smp_par) {
// Case 2b
sampler_t smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_NEAREST;
// CHECK: [[smp_ptr:%[A-Za-z0-9_\.]+]] = alloca %opencl.sampler_t addrspace(2)*
- // CHECK: [[SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 19)
+ // CHECK: [[SAMP:%[0-9]+]] = call spir_func %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 19)
// CHECK: store %opencl.sampler_t addrspace(2)* [[SAMP]], %opencl.sampler_t addrspace(2)** [[smp_ptr]]
// Case 1b
@@ -56,12 +56,12 @@ kernel void foo(sampler_t smp_par) {
// Case 1a/2a
fnc4smp(glb_smp);
- // CHECK: [[SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
+ // CHECK: [[SAMP:%[0-9]+]] = call spir_func %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
// CHECK: call spir_func void [[FUNCNAME]](%opencl.sampler_t addrspace(2)* [[SAMP]])
// Case 1a/2c
fnc4smp(glb_smp_const);
- // CHECK: [[SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
+ // CHECK: [[SAMP:%[0-9]+]] = call spir_func %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
// CHECK: call spir_func void [[FUNCNAME]](%opencl.sampler_t addrspace(2)* [[SAMP]])
// Case 1c
@@ -70,12 +70,12 @@ kernel void foo(sampler_t smp_par) {
// CHECK: call spir_func void [[FUNCNAME]](%opencl.sampler_t addrspace(2)* [[SAMP]])
fnc4smp(5);
- // CHECK: [[SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 5)
+ // CHECK: [[SAMP:%[0-9]+]] = call spir_func %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 5)
// CHECK: call spir_func void [[FUNCNAME]](%opencl.sampler_t addrspace(2)* [[SAMP]])
const sampler_t const_smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR;
fnc4smp(const_smp);
- // CHECK: [[CONST_SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
+ // CHECK: [[CONST_SAMP:%[0-9]+]] = call spir_func %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
// CHECK: store %opencl.sampler_t addrspace(2)* [[CONST_SAMP]], %opencl.sampler_t addrspace(2)** [[CONST_SMP_PTR:%[a-zA-Z0-9]+]]
fnc4smp(const_smp);
// CHECK: [[SAMP:%[0-9]+]] = load %opencl.sampler_t addrspace(2)*, %opencl.sampler_t addrspace(2)** [[CONST_SMP_PTR]]
@@ -83,7 +83,7 @@ kernel void foo(sampler_t smp_par) {
constant sampler_t constant_smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR;
fnc4smp(constant_smp);
- // CHECK: [[SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
+ // CHECK: [[SAMP:%[0-9]+]] = call spir_func %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
// CHECK: call spir_func void [[FUNCNAME]](%opencl.sampler_t addrspace(2)* [[SAMP]])
// TODO: enable sampler initialization with non-constant integer.

View File

@ -0,0 +1,225 @@
From 3263c81589eca689341ab5084723bdb7fe4a1286 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Thu, 11 Feb 2021 22:28:19 +0000
Subject: [PATCH] Partially Revert "scan-view: Remove Reporter.py and
associated AppleScript files"
This reverts some of commit dbb01536f6f49fa428f170e34466072ef439b3e9.
The Reporter module was still being used by the ScanView.py module and deleting
it caused scan-view to fail. This commit adds back Reporter.py but removes the
code the references the AppleScript files which were removed in
dbb01536f6f49fa428f170e34466072ef439b3e9.
Reviewed By: NoQ
Differential Revision: https://reviews.llvm.org/D96367
(cherry picked from commit e3cd3a3c91524c957e06bb0170343548f02b6842)
---
clang/tools/scan-view/CMakeLists.txt | 1 +
clang/tools/scan-view/share/Reporter.py | 183 ++++++++++++++++++++++++
2 files changed, 184 insertions(+)
create mode 100644 clang/tools/scan-view/share/Reporter.py
diff --git a/clang/tools/scan-view/CMakeLists.txt b/clang/tools/scan-view/CMakeLists.txt
index dd3d33439299..eccc6b83195b 100644
--- a/clang/tools/scan-view/CMakeLists.txt
+++ b/clang/tools/scan-view/CMakeLists.txt
@@ -5,6 +5,7 @@ set(BinFiles
set(ShareFiles
ScanView.py
+ Reporter.py
startfile.py
bugcatcher.ico)
diff --git a/clang/tools/scan-view/share/Reporter.py b/clang/tools/scan-view/share/Reporter.py
new file mode 100644
index 000000000000..31a14fb0cf74
--- /dev/null
+++ b/clang/tools/scan-view/share/Reporter.py
@@ -0,0 +1,183 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""Methods for reporting bugs."""
+
+import subprocess, sys, os
+
+__all__ = ['ReportFailure', 'BugReport', 'getReporters']
+
+#
+
+class ReportFailure(Exception):
+ """Generic exception for failures in bug reporting."""
+ def __init__(self, value):
+ self.value = value
+
+# Collect information about a bug.
+
+class BugReport(object):
+ def __init__(self, title, description, files):
+ self.title = title
+ self.description = description
+ self.files = files
+
+# Reporter interfaces.
+
+import os
+
+import email, mimetypes, smtplib
+from email import encoders
+from email.message import Message
+from email.mime.base import MIMEBase
+from email.mime.multipart import MIMEMultipart
+from email.mime.text import MIMEText
+
+#===------------------------------------------------------------------------===#
+# ReporterParameter
+#===------------------------------------------------------------------------===#
+
+class ReporterParameter(object):
+ def __init__(self, n):
+ self.name = n
+ def getName(self):
+ return self.name
+ def getValue(self,r,bugtype,getConfigOption):
+ return getConfigOption(r.getName(),self.getName())
+ def saveConfigValue(self):
+ return True
+
+class TextParameter (ReporterParameter):
+ def getHTML(self,r,bugtype,getConfigOption):
+ return """\
+<tr>
+<td class="form_clabel">%s:</td>
+<td class="form_value"><input type="text" name="%s_%s" value="%s"></td>
+</tr>"""%(self.getName(),r.getName(),self.getName(),self.getValue(r,bugtype,getConfigOption))
+
+class SelectionParameter (ReporterParameter):
+ def __init__(self, n, values):
+ ReporterParameter.__init__(self,n)
+ self.values = values
+
+ def getHTML(self,r,bugtype,getConfigOption):
+ default = self.getValue(r,bugtype,getConfigOption)
+ return """\
+<tr>
+<td class="form_clabel">%s:</td><td class="form_value"><select name="%s_%s">
+%s
+</select></td>"""%(self.getName(),r.getName(),self.getName(),'\n'.join(["""\
+<option value="%s"%s>%s</option>"""%(o[0],
+ o[0] == default and ' selected="selected"' or '',
+ o[1]) for o in self.values]))
+
+#===------------------------------------------------------------------------===#
+# Reporters
+#===------------------------------------------------------------------------===#
+
+class EmailReporter(object):
+ def getName(self):
+ return 'Email'
+
+ def getParameters(self):
+ return [TextParameter(x) for x in ['To', 'From', 'SMTP Server', 'SMTP Port']]
+
+ # Lifted from python email module examples.
+ def attachFile(self, outer, path):
+ # Guess the content type based on the file's extension. Encoding
+ # will be ignored, although we should check for simple things like
+ # gzip'd or compressed files.
+ ctype, encoding = mimetypes.guess_type(path)
+ if ctype is None or encoding is not None:
+ # No guess could be made, or the file is encoded (compressed), so
+ # use a generic bag-of-bits type.
+ ctype = 'application/octet-stream'
+ maintype, subtype = ctype.split('/', 1)
+ if maintype == 'text':
+ fp = open(path)
+ # Note: we should handle calculating the charset
+ msg = MIMEText(fp.read(), _subtype=subtype)
+ fp.close()
+ else:
+ fp = open(path, 'rb')
+ msg = MIMEBase(maintype, subtype)
+ msg.set_payload(fp.read())
+ fp.close()
+ # Encode the payload using Base64
+ encoders.encode_base64(msg)
+ # Set the filename parameter
+ msg.add_header('Content-Disposition', 'attachment', filename=os.path.basename(path))
+ outer.attach(msg)
+
+ def fileReport(self, report, parameters):
+ mainMsg = """\
+BUG REPORT
+---
+Title: %s
+Description: %s
+"""%(report.title, report.description)
+
+ if not parameters.get('To'):
+ raise ReportFailure('No "To" address specified.')
+ if not parameters.get('From'):
+ raise ReportFailure('No "From" address specified.')
+
+ msg = MIMEMultipart()
+ msg['Subject'] = 'BUG REPORT: %s'%(report.title)
+ # FIXME: Get config parameters
+ msg['To'] = parameters.get('To')
+ msg['From'] = parameters.get('From')
+ msg.preamble = mainMsg
+
+ msg.attach(MIMEText(mainMsg, _subtype='text/plain'))
+ for file in report.files:
+ self.attachFile(msg, file)
+
+ try:
+ s = smtplib.SMTP(host=parameters.get('SMTP Server'),
+ port=parameters.get('SMTP Port'))
+ s.sendmail(msg['From'], msg['To'], msg.as_string())
+ s.close()
+ except:
+ raise ReportFailure('Unable to send message via SMTP.')
+
+ return "Message sent!"
+
+class BugzillaReporter(object):
+ def getName(self):
+ return 'Bugzilla'
+
+ def getParameters(self):
+ return [TextParameter(x) for x in ['URL','Product']]
+
+ def fileReport(self, report, parameters):
+ raise NotImplementedError
+
+
+class RadarClassificationParameter(SelectionParameter):
+ def __init__(self):
+ SelectionParameter.__init__(self,"Classification",
+ [['1', 'Security'], ['2', 'Crash/Hang/Data Loss'],
+ ['3', 'Performance'], ['4', 'UI/Usability'],
+ ['6', 'Serious Bug'], ['7', 'Other']])
+
+ def saveConfigValue(self):
+ return False
+
+ def getValue(self,r,bugtype,getConfigOption):
+ if bugtype.find("leak") != -1:
+ return '3'
+ elif bugtype.find("dereference") != -1:
+ return '2'
+ elif bugtype.find("missing ivar release") != -1:
+ return '3'
+ else:
+ return '7'
+
+###
+
+def getReporters():
+ reporters = []
+ reporters.append(EmailReporter())
+ return reporters
+

View File

@ -1,2 +0,0 @@
mesa
qt5-tools

View File

@ -3,11 +3,11 @@
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=compiler-rt
pkgver=11.1.0
pkgver=12.0.0
pkgrel=1
pkgdesc="Compiler runtime libraries for clang"
arch=(x86_64 powerpc64le powerpc)
url="https://compiler-rt.llvm.org/"
arch=(x86_64 powerpc64le)
mrl="https://compiler-rt.llvm.org/"
license=('custom:Apache 2.0 with LLVM Exception')
depends=('gcc-libs')
makedepends=('llvm' 'cmake' 'ninja' 'python')
@ -15,19 +15,19 @@ makedepends=('llvm' 'cmake' 'ninja' 'python')
makedepends_x86_64=('lib32-gcc-libs')
options=('staticlibs')
_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
source=($_source_base/$pkgname-$pkgver.src.tar.xz{,.sig})
sha256sums=('def1fc00c764cd3abbba925c712ac38860a756a43b696b291f46fee09e453274'
'SKIP')
source=($_source_base/$pkgname-$pkgver.src.tar.xz{,.sig}
compiler-rt-size_t.patch)
sha256sums=('85a8cd0a62413eaa0457d8d02f8edac38c4dc0c96c00b09dc550260c23268434'
'SKIP'
'910b54988519be80492b9f3531303a5dd206f8c4401e7e7845cc2bb090134a5a')
validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>
export CFLAGS=${CFLAGS/-flto=auto/}
export CXXFLAGS=${CXXFLAGS/-flto=auto/}
export LDFLAGS=${LDFLAGS/-flto=auto/}
prepare() {
cd "$srcdir/$pkgname-$pkgver.src"
mkdir build
patch -Np1 -i ${srcdir}/compiler-rt-size_t.patch
}
build() {

View File

@ -4,8 +4,8 @@
# Contributor: Jakub Schmidtke <sjakub@gmail.com>
pkgname=firefox
pkgver=88.0.1
pkgrel=2
pkgver=89.0
pkgrel=1
pkgdesc="Standalone web browser from mozilla.org"
arch=(x86_64 powerpc64le)
license=(MPL GPL LGPL)
@ -29,7 +29,7 @@ source=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-
skia-sucks{1,2,3}.patch
flac-no-ffvpx.patch
"${pkgname}-${pkgver}-pgo.patch::https://src.fedoraproject.org/rpms/firefox/raw/rawhide/f/pgo.patch")
sha256sums=('83df1eae0e28fe99661fd5d39d705cdab2e108b4a24ce12c2db6183c632804cc'
sha256sums=('db43d7d5796455051a5b847f6daa3423393803c9288c8b6d7f1186f5e2e0a90a'
'SKIP'
'a9e5264257041c0b968425b5c97436ba48e8d294e1a0f02c59c35461ea245c33'
'ad83c0c6195ab742848941be1d9c8f32c1d4a8bc019d8887b42256bafaefb541'

View File

@ -44,6 +44,7 @@ prepare() {
# Arch Linux installs x86_64 libraries /lib
sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
sed -i 's@/lib64@/lib@g' gcc/config/rs6000/t-*
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure

View File

@ -2,22 +2,20 @@
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
pkgname=js78
pkgver=78.10.1
pkgver=78.11.0
pkgrel=1
pkgdesc="JavaScript interpreter and libraries - Version 78"
arch=(x86_64 powerpc64le powerpc)
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
license=(MPL)
depends=(gcc-libs readline zlib sh)
makedepends=(zip autoconf2.13 python-setuptools python-psutil rust llvm clang)
makedepends_powerpc64le=(lld)
makedepends_x86_64=(lld)
makedepends=(zip autoconf2.13 python-setuptools python-psutil rust llvm clang lld)
checkdepends=(mercurial git)
_relver=${pkgver}esr
source=(https://archive.mozilla.org/pub/firefox/releases/$_relver/source/firefox-$_relver.source.tar.xz{,.asc}
0001-Fixes-for-LTO-PGO-support.patch
0002-Bug-1667736-Update-packed_simd-to-compile-on-Rust-1..patch)
sha256sums=('c41f45072b0eb84b9c5dcb381298f91d49249db97784c7e173b5f210cd15cf3f'
sha256sums=('38394b5937be3839104b3a097d71987c06392d4d8be0d3004182f1d1fbfc577e'
'SKIP'
'926a573eabe3b6177363b795ed5e5641b4a4ebc6d7cfa093f11e1779ac0f897c'
'5f7c132fe7dab5e412cfd24c0c542531d4bfbcf030c736d46993845ba262cf9c')
@ -53,21 +51,15 @@ build() {
--enable-tests
--with-intl-api
--with-system-zlib
--without-system-icu
--enable-linker=lld
)
case "${CARCH}" in
powerpc)
CXXFLAGS+=" -Wno-class-memaccess"
LDFLAGS+=" -Wl,-z,stack-size=1048576 -latomic"
configure_args+=(
#--disable-jit
--with-system-icu
--enable-linker=bfd
)
;;
*)
configure_args+=(
--enable-linker=lld
--without-system-icu
)
;;

View File

@ -2,13 +2,14 @@
# Maintainer: Laurent Carlier <lordheavym@gmail.com>
pkgname=libclc
pkgver=11.1.0
pkgver=12.0.0
pkgrel=1
pkgdesc="Library requirements of the OpenCL C programming language"
arch=('any')
url="https://libclc.llvm.org/"
license=('MIT')
makedepends=('clang' 'llvm' 'cmake' 'ninja' 'python' 'git')
makedepends=('clang' 'llvm' 'cmake' 'ninja' 'python' 'git'
'spirv-llvm-translator')
source=("git+https://github.com/llvm/llvm-project.git#tag=llvmorg-$pkgver")
md5sums=('SKIP')

View File

@ -3,45 +3,53 @@
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=lld
pkgver=11.1.0
pkgver=12.0.0
pkgrel=1
pkgdesc="Linker from the LLVM project"
arch=(x86_64 powerpc64le powerpc)
url="https://lld.llvm.org/"
license=('custom:Apache 2.0 with LLVM Exception')
depends=('llvm-libs')
makedepends=('llvm' 'cmake' 'ninja' 'python-sphinx')
makedepends=('llvm' 'cmake' 'ninja' 'python-sphinx' 'clang')
_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
source=($_source_base/$pkgname-$pkgver.src.tar.xz{,.sig}
$_source_base/llvm-$pkgver.src.tar.xz{,.sig})
sha256sums=('017a788cbe1ecc4a949abf10755870519086d058a2e99f438829aef24f0c66ce'
$_source_base/llvm-$pkgver.src.tar.xz{,.sig}
$_source_base/libunwind-$pkgver.src.tar.xz{,.sig}
dont-set-versionId-on-undefined-weak-lazy-symbols.patch)
sha256sums=('2cb7d497f3ce33ce8a2c50ad26ec93a8c45f57268d4d96953cd0f25566f753fd'
'SKIP'
'ce8508e318a01a63d4e8b3090ab2ded3c598a50258cc49e2625b9120d4c03ea5'
'SKIP')
'49dc47c8697a1a0abd4ee51629a696d7bfe803662f2a7252a3b16fc75f3a8b50'
'SKIP'
'9ed2a5b28853f7f58be9d04836ff43d6e4132df5a2c058b690dc3e9d75bd1cf5'
'SKIP'
'0a2e30617a5c2a3bead0638d7f77f5915d800b7d11e5962b8ca0e525ca744843')
validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>
export CFLAGS=${CFLAGS/-flto=auto/}
export CXXFLAGS=${CXXFLAGS/-flto=auto/}
export LDFLAGS=${LDFLAGS/-flto=auto/}
prepare() {
# https://bugs.llvm.org/show_bug.cgi?id=49228
mv libunwind{-$pkgver.src,}
cd "$srcdir/$pkgname-$pkgver.src"
mkdir build
# https://bugs.llvm.org/show_bug.cgi?id=49915
patch -Np2 -i ../dont-set-versionId-on-undefined-weak-lazy-symbols.patch
}
build() {
cd "$srcdir/$pkgname-$pkgver.src/build"
CC=clang CXX=clang++ \
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DPYTHON_EXECUTABLE=/usr/bin/python \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_INCLUDE_TESTS=ON \
-DLLVM_BUILD_TESTS=ON \
-DLLVM_BUILD_DOCS=ON \
-DLLVM_ENABLE_SPHINX=ON \
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
-DLLVM_EXTERNAL_LIT=/usr/bin/lit \
-DLLVM_MAIN_SRC_DIR="$srcdir/llvm-$pkgver.src"
ninja

View File

@ -1,86 +0,0 @@
From cf54ca458afff1f7827bfbbc939429a00496c4f7 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Tue, 18 Aug 2020 10:54:49 -0700
Subject: [PATCH] [PowerPC] PPCBoolRetToInt: Skip translation if there is
ConstantExpr
PPCBoolRetToInt collects PHI, Argument, Call and Constant defs related to an `i1` value which later is translated to an `i32`/`i64` value. The `translate` method expects an `i1` value. However, if the `Constant` is a `ConstantExpr`, the type of the `ConstantExpr` might not be `i1`.
Fixes https://bugs.llvm.org/show_bug.cgi?id=46923 which causes ICE
```
llvm-project/llvm/lib/IR/Constants.cpp:1924: static llvm::Constant *llvm::ConstantExpr::getZExt(llvm::Constant *, llvm::Type *, bool): Assertion `C->getType()->getScalarSizeInBits() < Ty->getScalarSizeInBits()&& "SrcTy must be smaller than DestTy for ZExt!"' failed.
```
Differential Revision: https://reviews.llvm.org/D85007
---
llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp | 8 ++++--
llvm/test/CodeGen/PowerPC/pr46923.ll | 31 +++++++++++++++++++++
2 files changed, 37 insertions(+), 2 deletions(-)
create mode 100644 llvm/test/CodeGen/PowerPC/pr46923.ll
diff --git a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
index 2259a29f838..cfe3b3ce2e9 100644
--- a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
+++ b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
@@ -90,6 +90,9 @@ class PPCBoolRetToInt : public FunctionPass {
// Translate a i1 value to an equivalent i32/i64 value:
Value *translate(Value *V) {
+ assert(V->getType() == Type::getInt1Ty(V->getContext()) &&
+ "Expect an i1 value");
+
Type *IntTy = ST->isPPC64() ? Type::getInt64Ty(V->getContext())
: Type::getInt32Ty(V->getContext());
@@ -227,8 +230,9 @@ class PPCBoolRetToInt : public FunctionPass {
// CallInst. Potentially, bitwise operations (AND, OR, XOR, NOT) and sign
// extension could also be handled in the future.
for (Value *V : Defs)
- if (!isa<PHINode>(V) && !isa<Constant>(V) &&
- !isa<Argument>(V) && !isa<CallInst>(V))
+ if ((!isa<PHINode>(V) && !isa<Constant>(V) && !isa<Argument>(V) &&
+ !isa<CallInst>(V)) ||
+ isa<ConstantExpr>(V))
return false;
for (Value *V : Defs)
diff --git a/llvm/test/CodeGen/PowerPC/pr46923.ll b/llvm/test/CodeGen/PowerPC/pr46923.ll
new file mode 100644
index 00000000000..d6f65508848
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/pr46923.ll
@@ -0,0 +1,31 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown \
+; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s
+
+@bar = external constant i64, align 8
+
+define i1 @foo() {
+; CHECK-LABEL: foo:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: crxor 4*cr5+lt, 4*cr5+lt, 4*cr5+lt
+; CHECK-NEXT: li r3, 0
+; CHECK-NEXT: li r4, 1
+; CHECK-NEXT: isel r3, r4, r3, 4*cr5+lt
+; CHECK-NEXT: blr
+entry:
+ br label %next
+
+next:
+ br i1 undef, label %true, label %false
+
+true:
+ br label %end
+
+false:
+ br label %end
+
+end:
+ %a = phi i1 [ icmp ugt (i64 0, i64 ptrtoint (i64* @bar to i64)), %true ],
+ [ icmp ugt (i64 0, i64 2), %false ]
+ ret i1 %a
+}
--
2.18.1

View File

@ -3,10 +3,10 @@
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=('llvm' 'llvm-libs' 'llvm-ocaml')
pkgver=11.1.0
pkgver=12.0.0
pkgrel=1
_ocaml_ver=4.11.1
arch=( x86_64 powerpc64le powerpc )
arch=(x86_64 powerpc64le powerpc)
url="https://llvm.org/"
license=('custom:Apache 2.0 with LLVM Exception')
makedepends=('cmake' 'ninja' 'libffi' 'libedit' 'ncurses' 'libxml2'
@ -16,38 +16,49 @@ makedepends=('cmake' 'ninja' 'libffi' 'libedit' 'ncurses' 'libxml2'
options=('staticlibs')
_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
source=($_source_base/$pkgname-$pkgver.src.tar.xz{,.sig}
amdgpu-avoid-an-illegal-operand-in-si-shrink-instr.patch
force-visibility-of-llvm-Any-to-external.patch
llvm-link-with-Bsymbolic-functions.patch
add-fno-semantic-interposition.patch
llvm-config.h
llvm-004-override-opt.patch
llvm-005-ppc-bigpic.patch)
sha256sums=('ce8508e318a01a63d4e8b3090ab2ded3c598a50258cc49e2625b9120d4c03ea5'
llvm-001-ppc-secureplt.patch
llvm-002-override-opt.patch
llvm-003-ppc-bigpic.patch)
sha256sums=('49dc47c8697a1a0abd4ee51629a696d7bfe803662f2a7252a3b16fc75f3a8b50'
'SKIP'
'85b6977005899bc76fcc548e0b6501cae5f50a8ad03060b9f58d03d775323327'
'98721af5a36af2a8e88c14a81b16d3929b12515d7d2d1ba385eb243dca3c32cb'
'560ce1e206c19f4b86f4c583b743db0ad47a610418999350710aafd60ae50fcd'
'fc8c64267a5d179e9fc24fb2bc6150edef2598c83f5b2d138d14e05ce9f4e345'
'597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48'
'876dd496500c43010b2ab0c678cc843ee46df7294a4eb176d3e696a9e625ddb4'
'e55508953b61ac8c391ca1babd821eb2144c017b2a86c79f1f008ec95964608b')
'3a0eca893749223088645fee0cc1b238bd0b90d2474ed5202d181c7fd9101af3'
'93a9f83235762742da0324b3084955ca47d50978606f92db5c6deedbe12f6404'
'5a7f75f4a8488fd2e71c618b4a56a46653250369547564881972474d7d7ad290')
validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>
export CFLAGS=${CFLAGS/-flto=auto/}
export CXXFLAGS=${CXXFLAGS/-flto=auto/}
export LDFLAGS=${LDFLAGS/-flto=auto/}
prepare() {
cd "$srcdir/llvm-$pkgver.src"
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/4107
# https://bugs.llvm.org/show_bug.cgi?id=48921#c2
patch -Np2 -i ../amdgpu-avoid-an-illegal-operand-in-si-shrink-instr.patch
mkdir build
patch -Np1 -i ${srcdir}/llvm-004-override-opt.patch
patch -Np1 -i ${srcdir}/llvm-005-ppc-bigpic.patch
# https://bugs.llvm.org/show_bug.cgi?id=48992
patch -Np2 -i ../force-visibility-of-llvm-Any-to-external.patch
mkdir -p build
# https://bugs.archlinux.org/task/70697
patch -Np2 -i ../llvm-link-with-Bsymbolic-functions.patch
# https://reviews.llvm.org/D102453
patch -Np2 -i ../add-fno-semantic-interposition.patch
patch -Np1 -i ${srcdir}/llvm-001-ppc-secureplt.patch
patch -Np1 -i ${srcdir}/llvm-002-override-opt.patch
patch -Np1 -i ${srcdir}/llvm-003-ppc-bigpic.patch
}
build() {
cd "$srcdir/llvm-$pkgver.src/build"
case "${CARCH}" in
powerpc) EXTRA_CMAKE_FLAGS="-DVOID_CXX_OPT_FLAGS=-Os" ;;
esac
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
@ -62,7 +73,7 @@ build() {
-DLLVM_ENABLE_SPHINX=ON \
-DLLVM_ENABLE_DOXYGEN=OFF \
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
-DLLVM_BINUTILS_INCDIR=/usr/include
-DLLVM_BINUTILS_INCDIR=/usr/include ${EXTRA_CMAKE_FLAGS}
ninja all ocaml_doc
}

View File

@ -1,85 +0,0 @@
commit b08a140a8fe8d0b0d16a93042b4952d6e34ab913
Author: Piotr Sobczak <Piotr.Sobczak@amd.com>
Date: Wed Jan 27 16:02:49 2021 +0100
[AMDGPU] Avoid an illegal operand in si-shrink-instructions
Before the patch it was possible to trigger a constant bus
violation when folding immediates into a shrunk instruction.
The patch adds a check to enforce the legality of the new operand.
Differential Revision: https://reviews.llvm.org/D95527
diff --git a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
index 9c6833a7dab6..6c1b16eddc84 100644
--- a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+++ b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
@@ -84,21 +84,23 @@ static bool foldImmediates(MachineInstr &MI, const SIInstrInfo *TII,
MachineOperand &MovSrc = Def->getOperand(1);
bool ConstantFolded = false;
- if (MovSrc.isImm() && (isInt<32>(MovSrc.getImm()) ||
- isUInt<32>(MovSrc.getImm()))) {
- // It's possible to have only one component of a super-reg defined by
- // a single mov, so we need to clear any subregister flag.
- Src0.setSubReg(0);
- Src0.ChangeToImmediate(MovSrc.getImm());
- ConstantFolded = true;
- } else if (MovSrc.isFI()) {
- Src0.setSubReg(0);
- Src0.ChangeToFrameIndex(MovSrc.getIndex());
- ConstantFolded = true;
- } else if (MovSrc.isGlobal()) {
- Src0.ChangeToGA(MovSrc.getGlobal(), MovSrc.getOffset(),
- MovSrc.getTargetFlags());
- ConstantFolded = true;
+ if (TII->isOperandLegal(MI, Src0Idx, &MovSrc)) {
+ if (MovSrc.isImm() &&
+ (isInt<32>(MovSrc.getImm()) || isUInt<32>(MovSrc.getImm()))) {
+ // It's possible to have only one component of a super-reg defined
+ // by a single mov, so we need to clear any subregister flag.
+ Src0.setSubReg(0);
+ Src0.ChangeToImmediate(MovSrc.getImm());
+ ConstantFolded = true;
+ } else if (MovSrc.isFI()) {
+ Src0.setSubReg(0);
+ Src0.ChangeToFrameIndex(MovSrc.getIndex());
+ ConstantFolded = true;
+ } else if (MovSrc.isGlobal()) {
+ Src0.ChangeToGA(MovSrc.getGlobal(), MovSrc.getOffset(),
+ MovSrc.getTargetFlags());
+ ConstantFolded = true;
+ }
}
if (ConstantFolded) {
diff --git a/llvm/test/CodeGen/AMDGPU/shrink-instructions-illegal-fold.mir b/llvm/test/CodeGen/AMDGPU/shrink-instructions-illegal-fold.mir
new file mode 100644
index 000000000000..7889f437facf
--- /dev/null
+++ b/llvm/test/CodeGen/AMDGPU/shrink-instructions-illegal-fold.mir
@@ -0,0 +1,23 @@
+# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=si-shrink-instructions --verify-machineinstrs %s -o - | FileCheck %s
+
+# Make sure immediate folding into V_CNDMASK respects constant bus restrictions.
+---
+
+name: shrink_cndmask_illegal_imm_folding
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $vgpr0, $vgpr1
+ ; CHECK-LABEL: name: shrink_cndmask_illegal_imm_folding
+ ; CHECK: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
+ ; CHECK: [[MOV:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 32768, implicit $exec
+ ; CHECK: V_CMP_EQ_U32_e32 0, [[COPY]], implicit-def $vcc, implicit $exec
+ ; CHECK: V_CNDMASK_B32_e32 [[MOV]], killed [[COPY]], implicit $vcc, implicit $exec
+
+ %0:vgpr_32 = COPY $vgpr0
+ %1:vgpr_32 = V_MOV_B32_e32 32768, implicit $exec
+ V_CMP_EQ_U32_e32 0, %0:vgpr_32, implicit-def $vcc, implicit $exec
+ %2:vgpr_32 = V_CNDMASK_B32_e64 0, %1:vgpr_32, 0, killed %0:vgpr_32, $vcc, implicit $exec
+ S_NOP 0
+
+...

View File

@ -1,18 +0,0 @@
This allows us to override the optimization level as not all platforms can
deal with -O3.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -893,6 +893,12 @@ if( MINGW AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2")
endif()
+set(VOID_CXX_OPT_FLAGS "" CACHE STRING "Optimization level to use")
+
+if(NOT VOID_CXX_OPT_FLAGS STREQUAL "")
+ llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "${VOID_CXX_OPT_FLAGS}")
+endif()
+
# Put this before tblgen. Else we have a circular dependence.
add_subdirectory(lib/Demangle)
add_subdirectory(lib/Support)

View File

@ -1,38 +0,0 @@
From f3dbdd49c06bfafc1d6138094cf42889c14d38b6 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 3 Nov 2019 10:57:27 -0600
Subject: [PATCH] [LLVM][PowerPC] Assume BigPIC if no PIC level is specified
---
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 2 +-
llvm/lib/Target/PowerPC/PPCMCInstLower.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 269b84b4e8d..03246a5242c 100644
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -488,7 +488,7 @@ void PPCAsmPrinter::EmitTlsCall(const MachineInstr *MI,
// Add 32768 offset to the symbol so we follow up the latest GOT/PLT ABI.
if (Kind == MCSymbolRefExpr::VK_PLT && Subtarget->isSecurePlt() &&
- M->getPICLevel() == PICLevel::BigPIC)
+ M->getPICLevel() != PICLevel::SmallPIC)
TlsRef = MCBinaryExpr::createAdd(
TlsRef, MCConstantExpr::create(32768, OutContext), OutContext);
const MachineOperand &MO = MI->getOperand(2);
diff --git a/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp b/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
index 027e6bd1ba0..ae461f4eea9 100644
--- llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
+++ llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
@@ -116,7 +116,7 @@ static MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol,
const MCExpr *Expr = MCSymbolRefExpr::create(Symbol, RefKind, Ctx);
// If -msecure-plt -fPIC, add 32768 to symbol.
if (Subtarget->isSecurePlt() && TM.isPositionIndependent() &&
- M->getPICLevel() == PICLevel::BigPIC &&
+ M->getPICLevel() != PICLevel::SmallPIC &&
MO.getTargetFlags() == PPCII::MO_PLT)
Expr =
MCBinaryExpr::createAdd(Expr, MCConstantExpr::create(32768, Ctx), Ctx);
--
2.23.0

View File

@ -2,25 +2,21 @@
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
pkgname=openmp
pkgver=11.1.0
pkgver=12.0.0
pkgrel=1
pkgdesc="LLVM OpenMP Runtime Library"
arch=(x86_64 powerpc64le powerpc)
arch=(x86_64 powerpc64le)
url="https://openmp.llvm.org/"
license=('custom:Apache 2.0 with LLVM Exception')
depends=('glibc' 'libelf' 'libffi')
makedepends=('cmake' 'ninja')
_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
source=($_source_base/$pkgname-$pkgver.src.tar.xz{,.sig})
sha256sums=('d187483b75b39acb3ff8ea1b7d98524d95322e3cb148842957e9b0fbb866052e'
sha256sums=('eb1b7022a247332114985ed155a8fb632c28ce7c35a476e2c0caf865150f167d'
'SKIP')
validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>
export CFLAGS=${CFLAGS/-flto=auto/}
export CXXFLAGS=${CXXFLAGS/-flto=auto/}
export LDFLAGS=${LDFLAGS/-flto=auto/}
prepare() {
cd "$pkgname-$pkgver.src"
mkdir build

View File

@ -0,0 +1,667 @@
From 5bf048b8425cc0a342e4647932de19e25ffd6ad7 Mon Sep 17 00:00:00 2001
From: Abseil Team <absl-team@google.com>
Date: Mon, 26 Oct 2020 09:50:44 -0700
Subject: [PATCH] Export of internal Abseil changes
--
730bb88bee556aa11fa19aa33e1434cb6fa78985 by Evan Brown <ezb@google.com>:
Support missing allocator-related constructors in b-tree. See [reference](https://en.cppreference.com/w/cpp/container/set/set).
Also use allocator_traits::select_on_container_copy_construction() to get allocator for copy construction.
PiperOrigin-RevId: 339058322
--
b6cc121689ae3e452d1db2d66122cb198d25142b by Derek Mauro <dmauro@google.com>:
Fix more sign-compare warnings
PiperOrigin-RevId: 339057920
--
0e2c62da1dcaf6529abab952bdcc96c6de2d9506 by Abseil Team <absl-team@google.com>:
Add missing <limits> include
PiperOrigin-RevId: 339054753
--
d5a9ec2d1e40fe6359e720942e4955009ee415ec by Derek Mauro <dmauro@google.com>:
Stop disabling sign-compare warnings for non-test targets.
Our users complain about these.
This does not catch issues in header-only libraries (like btree.h)
but we may work on those in the future
PiperOrigin-RevId: 338967089
--
0c062c542a4c61ea0f65d25811827c0858e3adde by Abseil Team <absl-team@google.com>:
Improve cache-locality for ThreadIdentity and PerThreadSynch.
This is a change based on an observation in RPC benchmarks that shows
significant cycles being spent in waking up a thread, 99.8% of which
was on cache misses. Investigating this a bit more, it turns out to
be due to sharing the cache line with the waiter state.
To fix this issue, the following changes are introduced:
- Reorder fields in PerThreadSync so that it fits in a single cache line
The size of this structure was 80 bytes before this change.
Note: Manually inspected all booleans to make sure they are not modified by
multiple threads concurrently.
PiperOrigin-RevId: 338852058
--
a90d6f2b2346385017e32dd8ae1b5ca691a5863f by Derek Mauro <dmauro@google.com>:
Delete GCC 4.9 test script. It is no longer supported
PiperOrigin-RevId: 338779452
--
7274008d4757e88869110be9db39d03d911ae2b5 by Abseil Team <absl-team@google.com>:
Fix the usage example in which SetFlag should take a pointer.
PiperOrigin-RevId: 338744529
GitOrigin-RevId: 730bb88bee556aa11fa19aa33e1434cb6fa78985
Change-Id: Iff99594c4022e60e482a392d334b376c7ae8883e
---
absl/base/internal/thread_identity.h | 79 ++++++++-------
absl/container/btree_test.cc | 95 +++++++++++++++++++
absl/container/internal/btree.h | 42 ++++----
absl/container/internal/btree_container.h | 40 ++++++--
absl/copts/GENERATED_AbseilCopts.cmake | 3 -
absl/copts/GENERATED_copts.bzl | 3 -
absl/copts/copts.py | 7 --
absl/debugging/symbolize_elf.inc | 4 +-
absl/flags/reflection.h | 2 +-
absl/strings/internal/str_format/bind.cc | 2 +-
.../internal/str_format/float_conversion.cc | 2 +-
absl/synchronization/internal/graphcycles.cc | 1 +
15 files changed, 203 insertions(+), 179 deletions(-)
delete mode 100755 ci/linux_gcc-4.9_libstdcxx_bazel.sh
diff --git a/absl/base/internal/thread_identity.h b/absl/base/internal/thread_identity.h
index ceb109b41..c61d1febd 100644
--- a/absl/base/internal/thread_identity.h
+++ b/absl/base/internal/thread_identity.h
@@ -32,6 +32,7 @@
#include "absl/base/config.h"
#include "absl/base/internal/per_thread_tls.h"
+#include "absl/base/optimization.h"
namespace absl {
ABSL_NAMESPACE_BEGIN
@@ -69,30 +70,28 @@ struct PerThreadSynch {
// is using this PerThreadSynch as a terminator. Its
// skip field must not be filled in because the loop
// might then skip over the terminator.
-
- // The wait parameters of the current wait. waitp is null if the
- // thread is not waiting. Transitions from null to non-null must
- // occur before the enqueue commit point (state = kQueued in
- // Enqueue() and CondVarEnqueue()). Transitions from non-null to
- // null must occur after the wait is finished (state = kAvailable in
- // Mutex::Block() and CondVar::WaitCommon()). This field may be
- // changed only by the thread that describes this PerThreadSynch. A
- // special case is Fer(), which calls Enqueue() on another thread,
- // but with an identical SynchWaitParams pointer, thus leaving the
- // pointer unchanged.
- SynchWaitParams *waitp;
-
- bool suppress_fatal_errors; // If true, try to proceed even in the face of
- // broken invariants. This is used within fatal
- // signal handlers to improve the chances of
- // debug logging information being output
- // successfully.
-
- intptr_t readers; // Number of readers in mutex.
- int priority; // Priority of thread (updated every so often).
-
- // When priority will next be read (cycles).
- int64_t next_priority_read_cycles;
+ bool wake; // This thread is to be woken from a Mutex.
+ // If "x" is on a waiter list for a mutex, "x->cond_waiter" is true iff the
+ // waiter is waiting on the mutex as part of a CV Wait or Mutex Await.
+ //
+ // The value of "x->cond_waiter" is meaningless if "x" is not on a
+ // Mutex waiter list.
+ bool cond_waiter;
+ bool maybe_unlocking; // Valid at head of Mutex waiter queue;
+ // true if UnlockSlow could be searching
+ // for a waiter to wake. Used for an optimization
+ // in Enqueue(). true is always a valid value.
+ // Can be reset to false when the unlocker or any
+ // writer releases the lock, or a reader fully
+ // releases the lock. It may not be set to false
+ // by a reader that decrements the count to
+ // non-zero. protected by mutex spinlock
+ bool suppress_fatal_errors; // If true, try to proceed even in the face
+ // of broken invariants. This is used within
+ // fatal signal handlers to improve the
+ // chances of debug logging information being
+ // output successfully.
+ int priority; // Priority of thread (updated every so often).
// State values:
// kAvailable: This PerThreadSynch is available.
@@ -111,30 +110,30 @@ struct PerThreadSynch {
};
std::atomic<State> state;
- bool maybe_unlocking; // Valid at head of Mutex waiter queue;
- // true if UnlockSlow could be searching
- // for a waiter to wake. Used for an optimization
- // in Enqueue(). true is always a valid value.
- // Can be reset to false when the unlocker or any
- // writer releases the lock, or a reader fully releases
- // the lock. It may not be set to false by a reader
- // that decrements the count to non-zero.
- // protected by mutex spinlock
+ // The wait parameters of the current wait. waitp is null if the
+ // thread is not waiting. Transitions from null to non-null must
+ // occur before the enqueue commit point (state = kQueued in
+ // Enqueue() and CondVarEnqueue()). Transitions from non-null to
+ // null must occur after the wait is finished (state = kAvailable in
+ // Mutex::Block() and CondVar::WaitCommon()). This field may be
+ // changed only by the thread that describes this PerThreadSynch. A
+ // special case is Fer(), which calls Enqueue() on another thread,
+ // but with an identical SynchWaitParams pointer, thus leaving the
+ // pointer unchanged.
+ SynchWaitParams* waitp;
- bool wake; // This thread is to be woken from a Mutex.
+ intptr_t readers; // Number of readers in mutex.
- // If "x" is on a waiter list for a mutex, "x->cond_waiter" is true iff the
- // waiter is waiting on the mutex as part of a CV Wait or Mutex Await.
- //
- // The value of "x->cond_waiter" is meaningless if "x" is not on a
- // Mutex waiter list.
- bool cond_waiter;
+ // When priority will next be read (cycles).
+ int64_t next_priority_read_cycles;
// Locks held; used during deadlock detection.
// Allocated in Synch_GetAllLocks() and freed in ReclaimThreadIdentity().
SynchLocksHeld *all_locks;
};
+// The instances of this class are allocated in NewThreadIdentity() with an
+// alignment of PerThreadSynch::kAlignment.
struct ThreadIdentity {
// Must be the first member. The Mutex implementation requires that
// the PerThreadSynch object associated with each thread is
diff --git a/absl/container/btree_test.cc b/absl/container/btree_test.cc
index 7fa5d4f33..4a495067f 100644
--- a/absl/container/btree_test.cc
+++ b/absl/container/btree_test.cc
@@ -2709,6 +2709,101 @@ TEST(Btree, MultiKeyEqualRange) {
}
}
+TEST(Btree, AllocConstructor) {
+ using Alloc = CountingAllocator<int>;
+ using Set = absl::btree_set<int, std::less<int>, Alloc>;
+ int64_t bytes_used = 0;
+ Alloc alloc(&bytes_used);
+ Set set(alloc);
+
+ set.insert({1, 2, 3});
+
+ EXPECT_THAT(set, ElementsAre(1, 2, 3));
+ EXPECT_GT(bytes_used, set.size() * sizeof(int));
+}
+
+TEST(Btree, AllocInitializerListConstructor) {
+ using Alloc = CountingAllocator<int>;
+ using Set = absl::btree_set<int, std::less<int>, Alloc>;
+ int64_t bytes_used = 0;
+ Alloc alloc(&bytes_used);
+ Set set({1, 2, 3}, alloc);
+
+ EXPECT_THAT(set, ElementsAre(1, 2, 3));
+ EXPECT_GT(bytes_used, set.size() * sizeof(int));
+}
+
+TEST(Btree, AllocRangeConstructor) {
+ using Alloc = CountingAllocator<int>;
+ using Set = absl::btree_set<int, std::less<int>, Alloc>;
+ int64_t bytes_used = 0;
+ Alloc alloc(&bytes_used);
+ std::vector<int> v = {1, 2, 3};
+ Set set(v.begin(), v.end(), alloc);
+
+ EXPECT_THAT(set, ElementsAre(1, 2, 3));
+ EXPECT_GT(bytes_used, set.size() * sizeof(int));
+}
+
+TEST(Btree, AllocCopyConstructor) {
+ using Alloc = CountingAllocator<int>;
+ using Set = absl::btree_set<int, std::less<int>, Alloc>;
+ int64_t bytes_used1 = 0;
+ Alloc alloc1(&bytes_used1);
+ Set set1(alloc1);
+
+ set1.insert({1, 2, 3});
+
+ int64_t bytes_used2 = 0;
+ Alloc alloc2(&bytes_used2);
+ Set set2(set1, alloc2);
+
+ EXPECT_THAT(set1, ElementsAre(1, 2, 3));
+ EXPECT_THAT(set2, ElementsAre(1, 2, 3));
+ EXPECT_GT(bytes_used1, set1.size() * sizeof(int));
+ EXPECT_EQ(bytes_used1, bytes_used2);
+}
+
+TEST(Btree, AllocMoveConstructor_SameAlloc) {
+ using Alloc = CountingAllocator<int>;
+ using Set = absl::btree_set<int, std::less<int>, Alloc>;
+ int64_t bytes_used = 0;
+ Alloc alloc(&bytes_used);
+ Set set1(alloc);
+
+ set1.insert({1, 2, 3});
+
+ const int64_t original_bytes_used = bytes_used;
+ EXPECT_GT(original_bytes_used, set1.size() * sizeof(int));
+
+ Set set2(std::move(set1), alloc);
+
+ EXPECT_THAT(set2, ElementsAre(1, 2, 3));
+ EXPECT_EQ(bytes_used, original_bytes_used);
+}
+
+TEST(Btree, AllocMoveConstructor_DifferentAlloc) {
+ using Alloc = CountingAllocator<int>;
+ using Set = absl::btree_set<int, std::less<int>, Alloc>;
+ int64_t bytes_used1 = 0;
+ Alloc alloc1(&bytes_used1);
+ Set set1(alloc1);
+
+ set1.insert({1, 2, 3});
+
+ const int64_t original_bytes_used = bytes_used1;
+ EXPECT_GT(original_bytes_used, set1.size() * sizeof(int));
+
+ int64_t bytes_used2 = 0;
+ Alloc alloc2(&bytes_used2);
+ Set set2(std::move(set1), alloc2);
+
+ EXPECT_THAT(set2, ElementsAre(1, 2, 3));
+ // We didn't free these bytes allocated by `set1` yet.
+ EXPECT_EQ(bytes_used1, original_bytes_used);
+ EXPECT_EQ(bytes_used2, original_bytes_used);
+}
+
} // namespace
} // namespace container_internal
ABSL_NAMESPACE_END
diff --git a/absl/container/internal/btree.h b/absl/container/internal/btree.h
index a82b51772..8547d68e5 100644
--- a/absl/container/internal/btree.h
+++ b/absl/container/internal/btree.h
@@ -1141,21 +1141,35 @@ class btree {
// before this method is called. This method is used in copy construction,
// copy assignment, and move assignment.
template <typename Btree>
- void copy_or_move_values_in_order(Btree *other);
+ void copy_or_move_values_in_order(Btree &other);
// Validates that various assumptions/requirements are true at compile time.
constexpr static bool static_assert_validation();
public:
- btree(const key_compare &comp, const allocator_type &alloc);
+ btree(const key_compare &comp, const allocator_type &alloc)
+ : root_(comp, alloc, EmptyNode()), rightmost_(EmptyNode()), size_(0) {}
- btree(const btree &other);
+ btree(const btree &other) : btree(other, other.allocator()) {}
+ btree(const btree &other, const allocator_type &alloc)
+ : btree(other.key_comp(), alloc) {
+ copy_or_move_values_in_order(other);
+ }
btree(btree &&other) noexcept
: root_(std::move(other.root_)),
rightmost_(absl::exchange(other.rightmost_, EmptyNode())),
size_(absl::exchange(other.size_, 0)) {
other.mutable_root() = EmptyNode();
}
+ btree(btree &&other, const allocator_type &alloc)
+ : btree(other.key_comp(), alloc) {
+ if (alloc == other.allocator()) {
+ swap(other);
+ } else {
+ // Move values from `other` one at a time when allocators are different.
+ copy_or_move_values_in_order(other);
+ }
+ }
~btree() {
// Put static_asserts in destructor to avoid triggering them before the type
@@ -1851,7 +1865,7 @@ void btree_iterator<N, R, P>::decrement_slow() {
// btree methods
template <typename P>
template <typename Btree>
-void btree<P>::copy_or_move_values_in_order(Btree *other) {
+void btree<P>::copy_or_move_values_in_order(Btree &other) {
static_assert(std::is_same<btree, Btree>::value ||
std::is_same<const btree, Btree>::value,
"Btree type must be same or const.");
@@ -1859,11 +1873,11 @@ void btree<P>::copy_or_move_values_in_order(Btree *other) {
// We can avoid key comparisons because we know the order of the
// values is the same order we'll store them in.
- auto iter = other->begin();
- if (iter == other->end()) return;
+ auto iter = other.begin();
+ if (iter == other.end()) return;
insert_multi(maybe_move_from_iterator(iter));
++iter;
- for (; iter != other->end(); ++iter) {
+ for (; iter != other.end(); ++iter) {
// If the btree is not empty, we can just insert the new value at the end
// of the tree.
internal_emplace(end(), maybe_move_from_iterator(iter));
@@ -1901,16 +1915,6 @@ constexpr bool btree<P>::static_assert_validation() {
return true;
}
-template <typename P>
-btree<P>::btree(const key_compare &comp, const allocator_type &alloc)
- : root_(comp, alloc, EmptyNode()), rightmost_(EmptyNode()), size_(0) {}
-
-template <typename P>
-btree<P>::btree(const btree &other)
- : btree(other.key_comp(), other.allocator()) {
- copy_or_move_values_in_order(&other);
-}
-
template <typename P>
template <typename K>
auto btree<P>::equal_range(const K &key) -> std::pair<iterator, iterator> {
@@ -2068,7 +2072,7 @@ auto btree<P>::operator=(const btree &other) -> btree & {
*mutable_allocator() = other.allocator();
}
- copy_or_move_values_in_order(&other);
+ copy_or_move_values_in_order(other);
}
return *this;
}
@@ -2098,7 +2102,7 @@ auto btree<P>::operator=(btree &&other) noexcept -> btree & {
// comparator while moving the values so we can't swap the key
// comparators.
*mutable_key_comp() = other.key_comp();
- copy_or_move_values_in_order(&other);
+ copy_or_move_values_in_order(other);
}
}
}
diff --git a/absl/container/internal/btree_container.h b/absl/container/internal/btree_container.h
index 2322e7c72..3792bc212 100644
--- a/absl/container/internal/btree_container.h
+++ b/absl/container/internal/btree_container.h
@@ -23,6 +23,7 @@
#include "absl/base/internal/throw_delegate.h"
#include "absl/container/internal/btree.h" // IWYU pragma: export
#include "absl/container/internal/common.h"
+#include "absl/memory/memory.h"
#include "absl/meta/type_traits.h"
namespace absl {
@@ -68,8 +69,21 @@ class btree_container {
explicit btree_container(const key_compare &comp,
const allocator_type &alloc = allocator_type())
: tree_(comp, alloc) {}
- btree_container(const btree_container &other) = default;
- btree_container(btree_container &&other) noexcept = default;
+ explicit btree_container(const allocator_type &alloc)
+ : tree_(key_compare(), alloc) {}
+
+ btree_container(const btree_container &other)
+ : btree_container(other, absl::allocator_traits<allocator_type>::
+ select_on_container_copy_construction(
+ other.get_allocator())) {}
+ btree_container(const btree_container &other, const allocator_type &alloc)
+ : tree_(other.tree_, alloc) {}
+
+ btree_container(btree_container &&other) noexcept(
+ std::is_nothrow_move_constructible<Tree>::value) = default;
+ btree_container(btree_container &&other, const allocator_type &alloc)
+ : tree_(std::move(other.tree_), alloc) {}
+
btree_container &operator=(const btree_container &other) = default;
btree_container &operator=(btree_container &&other) noexcept(
std::is_nothrow_move_assignable<Tree>::value) = default;
@@ -234,7 +248,7 @@ class btree_set_container : public btree_container<Tree> {
using super_type::super_type;
btree_set_container() {}
- // Range constructor.
+ // Range constructors.
template <class InputIterator>
btree_set_container(InputIterator b, InputIterator e,
const key_compare &comp = key_compare(),
@@ -242,12 +256,19 @@ class btree_set_container : public btree_container<Tree> {
: super_type(comp, alloc) {
insert(b, e);
}
+ template <class InputIterator>
+ btree_set_container(InputIterator b, InputIterator e,
+ const allocator_type &alloc)
+ : btree_set_container(b, e, key_compare(), alloc) {}
- // Initializer list constructor.
+ // Initializer list constructors.
btree_set_container(std::initializer_list<init_type> init,
const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: btree_set_container(init.begin(), init.end(), comp, alloc) {}
+ btree_set_container(std::initializer_list<init_type> init,
+ const allocator_type &alloc)
+ : btree_set_container(init.begin(), init.end(), alloc) {}
// Lookup routines.
template <typename K = key_type>
@@ -535,7 +556,7 @@ class btree_multiset_container : public btree_container<Tree> {
using super_type::super_type;
btree_multiset_container() {}
- // Range constructor.
+ // Range constructors.
template <class InputIterator>
btree_multiset_container(InputIterator b, InputIterator e,
const key_compare &comp = key_compare(),
@@ -543,12 +564,19 @@ class btree_multiset_container : public btree_container<Tree> {
: super_type(comp, alloc) {
insert(b, e);
}
+ template <class InputIterator>
+ btree_multiset_container(InputIterator b, InputIterator e,
+ const allocator_type &alloc)
+ : btree_multiset_container(b, e, key_compare(), alloc) {}
- // Initializer list constructor.
+ // Initializer list constructors.
btree_multiset_container(std::initializer_list<init_type> init,
const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: btree_multiset_container(init.begin(), init.end(), comp, alloc) {}
+ btree_multiset_container(std::initializer_list<init_type> init,
+ const allocator_type &alloc)
+ : btree_multiset_container(init.begin(), init.end(), alloc) {}
// Lookup routines.
template <typename K = key_type>
diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
index 97bd283eb..beb3799ec 100644
--- a/absl/copts/GENERATED_AbseilCopts.cmake
+++ b/absl/copts/GENERATED_AbseilCopts.cmake
@@ -16,7 +16,6 @@ list(APPEND ABSL_CLANG_CL_FLAGS
"-Wno-extra-semi-stmt"
"-Wno-packed"
"-Wno-padded"
- "-Wno-sign-compare"
"-Wno-float-conversion"
"-Wno-float-equal"
"-Wno-format-nonliteral"
@@ -88,7 +87,6 @@ list(APPEND ABSL_GCC_FLAGS
"-Wvla"
"-Wwrite-strings"
"-Wno-missing-field-initializers"
- "-Wno-sign-compare"
"-DNOMINMAX"
)
@@ -117,7 +115,6 @@ list(APPEND ABSL_LLVM_FLAGS
"-Wno-extra-semi-stmt"
"-Wno-packed"
"-Wno-padded"
- "-Wno-sign-compare"
"-Wno-float-conversion"
"-Wno-float-equal"
"-Wno-format-nonliteral"
diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl
index bcdd61ef8..ff729d74d 100644
--- a/absl/copts/GENERATED_copts.bzl
+++ b/absl/copts/GENERATED_copts.bzl
@@ -17,7 +17,6 @@ ABSL_CLANG_CL_FLAGS = [
"-Wno-extra-semi-stmt",
"-Wno-packed",
"-Wno-padded",
- "-Wno-sign-compare",
"-Wno-float-conversion",
"-Wno-float-equal",
"-Wno-format-nonliteral",
@@ -89,7 +88,6 @@ ABSL_GCC_FLAGS = [
"-Wvla",
"-Wwrite-strings",
"-Wno-missing-field-initializers",
- "-Wno-sign-compare",
"-DNOMINMAX",
]
@@ -118,7 +116,6 @@ ABSL_LLVM_FLAGS = [
"-Wno-extra-semi-stmt",
"-Wno-packed",
"-Wno-padded",
- "-Wno-sign-compare",
"-Wno-float-conversion",
"-Wno-float-equal",
"-Wno-format-nonliteral",
diff --git a/absl/copts/copts.py b/absl/copts/copts.py
index a3437c1b0..55b5fb107 100644
--- a/absl/copts/copts.py
+++ b/absl/copts/copts.py
@@ -41,10 +41,6 @@
"-Wno-packed",
"-Wno-padded",
###
- # Google style does not use unsigned integers, though STL containers
- # have unsigned types.
- "-Wno-sign-compare",
- ###
"-Wno-float-conversion",
"-Wno-float-equal",
"-Wno-format-nonliteral",
@@ -138,9 +134,6 @@
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36750
# Remove when gcc-4.x is no longer supported.
"-Wno-missing-field-initializers",
- # Google style does not use unsigned integers, though STL containers
- # have unsigned types.
- "-Wno-sign-compare",
# Don't define min and max macros (Build on Windows using gcc)
"-DNOMINMAX",
],
diff --git a/absl/debugging/symbolize_elf.inc b/absl/debugging/symbolize_elf.inc
index 7c36fd136..f4d5727bd 100644
--- a/absl/debugging/symbolize_elf.inc
+++ b/absl/debugging/symbolize_elf.inc
@@ -1281,7 +1281,7 @@ static bool MaybeInitializeObjFile(ObjFile *obj) {
const int phnum = obj->elf_header.e_phnum;
const int phentsize = obj->elf_header.e_phentsize;
size_t phoff = obj->elf_header.e_phoff;
- int num_executable_load_segments = 0;
+ size_t num_executable_load_segments = 0;
for (int j = 0; j < phnum; j++) {
ElfW(Phdr) phdr;
if (!ReadFromOffsetExact(obj->fd, &phdr, sizeof(phdr), phoff)) {
@@ -1342,7 +1342,7 @@ const char *Symbolizer::GetSymbol(const void *const pc) {
// Note: some binaries have multiple "rx" LOAD segments. We must
// find the right one.
ElfW(Phdr) *phdr = nullptr;
- for (int j = 0; j < obj->phdr.size(); j++) {
+ for (size_t j = 0; j < obj->phdr.size(); j++) {
ElfW(Phdr) &p = obj->phdr[j];
if (p.p_type != PT_LOAD) {
// We only expect PT_LOADs. This must be PT_NULL that we didn't
diff --git a/absl/flags/reflection.h b/absl/flags/reflection.h
index 4ce0ab6c7..e6baf5de4 100644
--- a/absl/flags/reflection.h
+++ b/absl/flags/reflection.h
@@ -64,7 +64,7 @@ absl::flat_hash_map<absl::string_view, absl::CommandLineFlag*> GetAllFlags();
// void MyFunc() {
// absl::FlagSaver fs;
// ...
-// absl::SetFlag(FLAGS_myFlag, otherValue);
+// absl::SetFlag(&FLAGS_myFlag, otherValue);
// ...
// } // scope of FlagSaver left, flags return to previous state
//
diff --git a/absl/strings/internal/str_format/bind.cc b/absl/strings/internal/str_format/bind.cc
index 194e21aff..4e68b90b5 100644
--- a/absl/strings/internal/str_format/bind.cc
+++ b/absl/strings/internal/str_format/bind.cc
@@ -235,7 +235,7 @@ int FprintF(std::FILE* output, const UntypedFormatSpecImpl format,
errno = sink.error();
return -1;
}
- if (sink.count() > std::numeric_limits<int>::max()) {
+ if (sink.count() > static_cast<size_t>(std::numeric_limits<int>::max())) {
errno = EFBIG;
return -1;
}
diff --git a/absl/strings/internal/str_format/float_conversion.cc b/absl/strings/internal/str_format/float_conversion.cc
index d3c5f0a7a..0ded0a66a 100644
--- a/absl/strings/internal/str_format/float_conversion.cc
+++ b/absl/strings/internal/str_format/float_conversion.cc
@@ -134,7 +134,7 @@ class BinaryToDecimal {
assert(exp > 0);
assert(exp <= std::numeric_limits<long double>::max_exponent);
static_assert(
- StackArray::kMaxCapacity >=
+ static_cast<int>(StackArray::kMaxCapacity) >=
ChunksNeeded(std::numeric_limits<long double>::max_exponent),
"");
diff --git a/absl/synchronization/internal/graphcycles.cc b/absl/synchronization/internal/graphcycles.cc
index 19f9aab5b..27fec2168 100644
--- a/absl/synchronization/internal/graphcycles.cc
+++ b/absl/synchronization/internal/graphcycles.cc
@@ -37,6 +37,7 @@
#include <algorithm>
#include <array>
+#include <limits>
#include "absl/base/internal/hide_ptr.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/internal/spinlock.h"
@@ -448,7 +448,7 @@
x->in.clear();
x->out.clear();
x->masked_ptr = base_internal::HidePtr<void>(nullptr);
- if (x->version == std::numeric_limits<uint32_t>::max()) {
+ if (x->version == static_cast<size_t>(std::numeric_limits<int>::max())) {
// Cannot use x any more
} else {
x->version++; // Invalidates all copies of node.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,256 @@
Submodule 'src/3rdparty' (/mnt/caches/sources/qtwebengine-chromium.git) registered for path 'src/3rdparty'
Synchronizing submodule url for 'src/3rdparty'
Cloning into '/build/src/qtwebengine/src/3rdparty'...
done.
Submodule path 'src/3rdparty': checked out '3f594ea1afb8b18c864715a796ef21099d432a13'
Auto-merging tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
Auto-merging src/core/content_browser_client_qt.cpp
patching file src/core/web_contents_adapter.cpp
patching file src/core/web_contents_adapter_client.h
patching file src/core/web_contents_delegate_qt.cpp
patching file src/core/web_contents_delegate_qt.h
patching file src/webengine/api/qquickwebengineview.cpp
patching file src/webengine/api/qquickwebengineview_p_p.h
patching file src/webenginewidgets/api/qwebenginepage.cpp
patching file src/webenginewidgets/api/qwebenginepage_p.h
patching file src/objects/js-list-format.cc
patching file src/3rdparty/chromium//sandbox/linux/system_headers/arm64_linux_syscalls.h
Hunk #1 succeeded at 1119 with fuzz 1 (offset 56 lines).
patching file src/3rdparty/chromium//sandbox/linux/system_headers/arm_linux_syscalls.h
Hunk #1 succeeded at 1441 with fuzz 1 (offset 56 lines).
patching file src/3rdparty/chromium//sandbox/linux/system_headers/x86_32_linux_syscalls.h
Hunk #1 succeeded at 1710 with fuzz 1 (offset 288 lines).
patching file src/3rdparty/chromium//sandbox/linux/system_headers/x86_64_linux_syscalls.h
Hunk #1 succeeded at 1350 with fuzz 1 (offset 60 lines).
patching file src/3rdparty/chromium//sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
Hunk #1 succeeded at 387 (offset 17 lines).
patching file src/3rdparty/chromium/net/socket/udp_socket_posix.cc
Hunk #1 succeeded at 1152 (offset -39 lines).
patching file configure.pri
patching file mkspecs/features/functions.prf
patching file src/3rdparty/chromium/chrome/installer/linux/BUILD.gn
Hunk #1 succeeded at 92 (offset 27 lines).
Hunk #2 succeeded at 327 (offset -2 lines).
patching file src/3rdparty/chromium/sandbox/features.gni
Hunk #1 succeeded at 11 with fuzz 1.
patching file src/3rdparty/chromium/sandbox/linux/BUILD.gn
Hunk #1 succeeded at 427 (offset 20 lines).
patching file src/3rdparty/chromium/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
patching file src/3rdparty/chromium/sandbox/linux/bpf_dsl/seccomp_macros.h
patching file src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
Hunk #2 succeeded at 220 (offset 9 lines).
Hunk #3 succeeded at 238 (offset 9 lines).
Hunk #4 succeeded at 278 (offset 9 lines).
patching file src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
Hunk #1 succeeded at 304 (offset 13 lines).
patching file src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
Hunk #1 succeeded at 37 (offset 1 line).
Hunk #2 succeeded at 47 (offset 1 line).
Hunk #3 succeeded at 101 (offset -12 lines).
Hunk #4 succeeded at 251 (offset -23 lines).
Hunk #5 succeeded at 267 (offset -23 lines).
Hunk #6 succeeded at 432 (offset -23 lines).
patching file src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
patching file src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
Hunk #15 succeeded at 402 with fuzz 1.
Hunk #16 succeeded at 419 with fuzz 2 (offset -5 lines).
Hunk #17 succeeded at 468 (offset -5 lines).
Hunk #18 succeeded at 478 (offset -5 lines).
Hunk #19 succeeded at 493 (offset -5 lines).
Hunk #20 succeeded at 508 (offset -5 lines).
Hunk #21 succeeded at 534 (offset -8 lines).
Hunk #22 succeeded at 564 (offset -10 lines).
Hunk #23 succeeded at 577 (offset -10 lines).
Hunk #24 succeeded at 655 (offset -10 lines).
Hunk #25 succeeded at 668 (offset -10 lines).
Hunk #26 succeeded at 685 (offset -10 lines).
Hunk #27 succeeded at 719 (offset -10 lines).
Hunk #28 succeeded at 736 (offset -10 lines).
Hunk #29 succeeded at 765 (offset -10 lines).
Hunk #30 succeeded at 807 (offset -10 lines).
Hunk #31 succeeded at 902 (offset -10 lines).
Hunk #32 succeeded at 923 (offset -10 lines).
Hunk #33 succeeded at 977 (offset -10 lines).
Hunk #34 succeeded at 1037 (offset -10 lines).
Hunk #35 succeeded at 1060 (offset -10 lines).
patching file src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
patching file src/3rdparty/chromium/sandbox/linux/seccomp-bpf/syscall.cc
Hunk #1 succeeded at 18 (offset 2 lines).
Hunk #2 succeeded at 310 (offset 2 lines).
Hunk #3 succeeded at 473 (offset 2 lines).
Hunk #4 succeeded at 491 (offset 2 lines).
patching file src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc
Hunk #1 succeeded at 232 (offset -5 lines).
patching file src/3rdparty/chromium/sandbox/linux/services/credentials.cc
patching file src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc
patching file src/3rdparty/chromium/sandbox/linux/syscall_broker/broker_process.cc
Hunk #1 succeeded at 169 with fuzz 2 (offset 12 lines).
patching file src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h
Hunk #1 succeeded at 41 (offset 12 lines).
Hunk #2 succeeded at 76 (offset 19 lines).
patching file src/3rdparty/chromium/sandbox/linux/system_headers/linux_signal.h
patching file src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h
patching file src/3rdparty/chromium/sandbox/linux/system_headers/linux_ucontext.h
patching file src/3rdparty/chromium/sandbox/linux/system_headers/ppc64_linux_syscalls.h
patching file src/3rdparty/chromium/sandbox/linux/system_headers/ppc64_linux_ucontext.h
patching file src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
Hunk #1 succeeded at 15 with fuzz 2.
patching file src/3rdparty/chromium/third_party/angle/src/compiler/translator/InfoSink.h
patching file src/3rdparty/chromium/third_party/angle/src/libANGLE/Constants.h
patching file src/3rdparty/chromium/third_party/boringssl/BUILD.gn
patching file src/3rdparty/chromium/third_party/breakpad/BUILD.gn
Hunk #1 succeeded at 611 (offset 13 lines).
Hunk #2 succeeded at 648 (offset 13 lines).
Hunk #3 succeeded at 707 (offset 13 lines).
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
Hunk #1 succeeded at 55 with fuzz 2 (offset 1 line).
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
Hunk #1 succeeded at 279 (offset 1 line).
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
Hunk #1 succeeded at 112 (offset -5 lines).
Hunk #2 succeeded at 200 (offset -5 lines).
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
Hunk #1 succeeded at 149 (offset -5 lines).
Hunk #2 succeeded at 306 (offset -5 lines).
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
Hunk #1 succeeded at 48 with fuzz 2 (offset 1 line).
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
Hunk #1 succeeded at 715 (offset 1 line).
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/processor/exploitability_linux.cc
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/processor/exploitability_unittest.cc
patching file src/3rdparty/chromium/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
Hunk #1 succeeded at 77 (offset 1 line).
Hunk #2 succeeded at 89 (offset 1 line).
Hunk #3 succeeded at 325 (offset 1 line).
Hunk #4 succeeded at 542 (offset 1 line).
Hunk #5 succeeded at 662 (offset 1 line).
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/CONTRIBUTORS
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/user.h
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context.h
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
Hunk #1 succeeded at 135 (offset 9 lines).
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/capture_memory.cc
Hunk #1 succeeded at 112 (offset 1 line).
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_context.cc
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_context.h
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
Hunk #1 succeeded at 171 (offset 12 lines).
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux_test.cc
Hunk #1 succeeded at 622 (offset 10 lines).
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
Hunk #1 succeeded at 204 (offset 1 line).
Hunk #2 succeeded at 221 (offset 1 line).
Hunk #3 succeeded at 244 (offset 1 line).
Hunk #4 succeeded at 380 (offset 1 line).
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptrace_broker.cc
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptracer.cc
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/capture_context.h
Hunk #1 succeeded at 69 (offset -1 lines).
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
Hunk #1 succeeded at 35 (offset -1 lines).
Hunk #2 succeeded at 51 (offset -1 lines).
Hunk #3 succeeded at 67 (offset -1 lines).
patching file src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/signals_test.cc
Hunk #1 succeeded at 46 with fuzz 1.
patching file src/3rdparty/chromium/third_party/dav1d/BUILD.gn
Hunk #1 succeeded at 183 (offset 1 line).
Hunk #2 succeeded at 213 (offset 1 line).
Hunk #3 succeeded at 266 with fuzz 2 (offset 6 lines).
Hunk #4 succeeded at 310 (offset 6 lines).
patching file src/3rdparty/chromium/third_party/dav1d/config/linux/ppc64/config.h
patching file src/3rdparty/chromium/third_party/dav1d/dav1d_generated.gni
Hunk #1 succeeded at 76 (offset 6 lines).
patching file src/3rdparty/chromium/third_party/dav1d/generate_source.py
patching file src/3rdparty/chromium/third_party/dav1d/libdav1d/src/ppc/types.h
patching file src/3rdparty/chromium/third_party/libdrm/src/xf86drm.c
patching file src/3rdparty/chromium/third_party/lss/linux_syscall_support.h
Hunk #1 succeeded at 3947 (offset 16 lines).
Hunk #2 succeeded at 4058 (offset 16 lines).
patching file src/3rdparty/chromium/third_party/pffft/src/pffft.c
patching file src/3rdparty/chromium/third_party/skia/src/sksl/SkSLString.cpp
Hunk #1 succeeded at 226 (offset -14 lines).
patching file src/3rdparty/chromium/third_party/sqlite/src/amalgamation/sqlite3.c
Hunk #1 succeeded at 14474 (offset 74 lines).
Hunk #2 succeeded at 188857 (offset 1738 lines).
patching file src/3rdparty/chromium/third_party/sqlite/src/amalgamation_dev/sqlite3.c
Hunk #1 succeeded at 14487 (offset 173 lines).
Hunk #2 succeeded at 189370 (offset 2855 lines).
patching file src/3rdparty/chromium/third_party/sqlite/src/ext/rtree/rtree.c
Hunk #1 succeeded at 450 (offset 18 lines).
patching file src/3rdparty/chromium/third_party/sqlite/src/src/sqliteInt.h
Hunk #1 succeeded at 877 (offset 24 lines).
patching file src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc
patching file src/3rdparty/chromium/third_party/webrtc/rtc_base/system/arch.h
patching file src/3rdparty/chromium/v8/BUILD.gn
Hunk #1 succeeded at 802 (offset 124 lines).
patching file third_party/libvpx/BUILD.gn
Hunk #1 succeeded at 344 (offset 8 lines).
patching file third_party/libvpx/generate_gni.sh
patching file absl/base/internal/thread_identity.h
patching file absl/container/btree_test.cc
Hunk #1 succeeded at 2614 (offset -95 lines).
patching file absl/container/internal/btree.h
Hunk #1 succeeded at 1105 (offset -36 lines).
Hunk #2 succeeded at 1846 (offset -19 lines).
Hunk #3 succeeded at 1854 (offset -19 lines).
Hunk #4 succeeded at 1896 (offset -19 lines).
Hunk #5 succeeded at 2053 (offset -19 lines).
Hunk #6 succeeded at 2083 (offset -19 lines).
patching file absl/container/internal/btree_container.h
Hunk #3 succeeded at 249 (offset 1 line).
Hunk #4 succeeded at 257 (offset 1 line).
patching file absl/copts/GENERATED_AbseilCopts.cmake
patching file absl/copts/GENERATED_copts.bzl
patching file absl/copts/copts.py
patching file absl/debugging/symbolize_elf.inc
patching file absl/flags/reflection.h
patching file absl/strings/internal/str_format/bind.cc
Hunk #1 succeeded at 221 (offset -14 lines).
patching file absl/strings/internal/str_format/float_conversion.cc
Hunk #1 succeeded at 120 (offset -14 lines).
patching file absl/synchronization/internal/graphcycles.cc
patching file src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp
patching file src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc
patching file src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc
patching file src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc
patching file src/3rdparty/chromium/components/bookmarks/browser/bookmark_expanded_state_tracker.cc
patching file src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc
patching file src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h
patching file src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
Hunk #1 succeeded at 258 (offset 1 line).
patching file src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
patching file src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h
patching file src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc
patching file src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h

View File

@ -0,0 +1,85 @@
diff --git a/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp b/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp
index 013f1dfb2..3ce63c192 100644
--- a/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp
+++ b/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp
@@ -9,6 +9,7 @@
#include "libANGLE/HandleAllocator.h"
+#include <limits>
#include <algorithm>
#include <functional>
diff --git a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc
index be91def6b..73f202356 100644
--- a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc
+++ b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc
@@ -245,7 +245,7 @@ static void AXPlatformAtkHyperlinkInit(AXPlatformAtkHyperlink* self, gpointer) {
}
GType ax_platform_atk_hyperlink_get_type() {
- static volatile gsize type_volatile = 0;
+ static gsize type_volatile = 0;
AXPlatformNodeAuraLinux::EnsureGTypeInit();
diff --git a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc
index 04125c6fd..6c64e5d8e 100644
--- a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc
+++ b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc
@@ -2274,7 +2274,7 @@ void ClassInit(gpointer class_pointer, gpointer /* class_data */) {
GType GetType() {
AXPlatformNodeAuraLinux::EnsureGTypeInit();
- static volatile gsize type_volatile = 0;
+ static gsize type_volatile = 0;
if (g_once_init_enter(&type_volatile)) {
static const GTypeInfo type_info = {
sizeof(AXPlatformNodeAuraLinuxClass), // class_size
diff --git a/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc b/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc
index c663a2074..38a342484 100644
--- a/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc
+++ b/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc
@@ -141,7 +141,7 @@ void GtkKeyBindingsHandler::HandlerClassInit(HandlerClass* klass) {
}
GType GtkKeyBindingsHandler::HandlerGetType() {
- static volatile gsize type_id_volatile = 0;
+ static gsize type_id_volatile = 0;
if (g_once_init_enter(&type_id_volatile)) {
GType type_id = g_type_register_static_simple(
GTK_TYPE_TEXT_VIEW, g_intern_static_string("GtkKeyBindingsHandler"),
--- a/src/3rdparty/chromium/components/bookmarks/browser/bookmark_expanded_state_tracker.cc
+++ b/src/3rdparty/chromium/components/bookmarks/browser/bookmark_expanded_state_tracker.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <cstddef>
#include "components/bookmarks/browser/bookmark_expanded_state_tracker.h"
#include <stdint.h>
diff --git a/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc b/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc
index 657a3c96b..ad641a082 100644
--- a/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc
+++ b/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <cstddef>
+
#include "components/bookmarks/browser/base_bookmark_model_observer.h"
namespace bookmarks {
--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h.orig 2021-05-27 15:40:23.915639944 +0200
+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h 2021-05-27 15:41:41.191599216 +0200
@@ -253,7 +253,7 @@
const uint8_t* str_ptr = protozero::proto_utils::ParseVarInt(
ptr, ptr + kMaxMetadataSize, &value);
PERFETTO_DCHECK(str_ptr != ptr);
- PERFETTO_DCHECK(value < std::numeric_limits<uint32_t>::max());
+ PERFETTO_DCHECK(value < static_cast<size_t>(std::numeric_limits<uint32_t>::max()));
*size = static_cast<uint32_t>(value);
return str_ptr;
}

View File

@ -0,0 +1,72 @@
Uses generic target for now. To use ppc64le, change --target to ppc64le-gnu
and add --enable-vsx, and change generic to ppc for the rtcd header.
From 18e6c5c55cfae0cfb458d8210d7bc709360a0e90 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Wed, 9 Sep 2020 19:08:25 +0200
Subject: [PATCH] enable generation of ppc64 libvpx bits
this doesn't update the gni file, that's done from
the template by running the appropriate scripts
---
third_party/libvpx/BUILD.gn | 4 ++++
third_party/libvpx/generate_gni.sh | 9 +++++++++
2 files changed, 13 insertions(+)
diff --git third_party/libvpx/BUILD.gn third_party/libvpx/BUILD.gn
index 7198e59..3300485 100644
--- third_party/libvpx/BUILD.gn
+++ third_party/libvpx/BUILD.gn
@@ -336,6 +336,8 @@ static_library("libvpx") {
} else {
sources = libvpx_srcs_arm64
}
+ } else if (current_cpu == "ppc64") {
+ sources = libvpx_srcs_ppc64
}
configs -= [ "//build/config/compiler:chromium_code" ]
diff --git third_party/libvpx/generate_gni.sh third_party/libvpx/generate_gni.sh
index bcf84b0..8a3f4f1 100755
--- third_party/libvpx/generate_gni.sh
+++ third_party/libvpx/generate_gni.sh
@@ -361,6 +361,7 @@ gen_config_files linux/arm-neon-highbd "--target=armv7-linux-gcc ${all_platforms
gen_config_files linux/arm64-highbd "--target=armv8-linux-gcc ${all_platforms} ${HIGHBD}"
gen_config_files linux/mipsel "--target=mips32-linux-gcc ${all_platforms}"
gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}"
+gen_config_files linux/ppc64 "--target=generic-gnu $HIGHBD ${all_platforms}"
gen_config_files linux/generic "--target=generic-gnu $HIGHBD ${all_platforms}"
gen_config_files win/arm64 "--target=arm64-win64-vs15 ${all_platforms} ${HIGHBD}"
gen_config_files win/ia32 "--target=x86-win32-vs14 ${all_platforms} ${x86_platforms}"
@@ -386,6 +387,7 @@ lint_config linux/arm-neon-highbd
lint_config linux/arm64-highbd
lint_config linux/mipsel
lint_config linux/mips64el
+lint_config linux/ppc64
lint_config linux/generic
lint_config win/arm64
lint_config win/ia32
@@ -415,6 +417,7 @@ gen_rtcd_header linux/arm-neon-highbd armv7
gen_rtcd_header linux/arm64-highbd armv8
gen_rtcd_header linux/mipsel mipsel
gen_rtcd_header linux/mips64el mips64el
+gen_rtcd_header linux/ppc64 generic
gen_rtcd_header linux/generic generic
gen_rtcd_header win/arm64 armv8
gen_rtcd_header win/ia32 x86 "${require_sse2}"
@@ -500,6 +503,12 @@ if [ -z $ONLY_CONFIGS ]; then
echo "MIPS64 source list is identical to MIPS source list. No need to generate it."
+ echo "Generate ppc64 source list."
+ config=$(print_config_basic linux/ppc64)
+ make_clean
+ make libvpx_srcs.txt target=libs $config > /dev/null
+ convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_ppc64
+
echo "Generate NaCl source list."
config=$(print_config_basic nacl)
make_clean
--
2.28.0

View File

@ -4,7 +4,7 @@
# Contributor: Andrea Scarpino <andrea@archlinux.org>
pkgname=qt6-quick3d
_qtver=6.0.1
_qtver=6.1.0
pkgver=${_qtver/-/}
pkgrel=1
arch=(x86_64 powerpc64le)
@ -12,11 +12,20 @@ url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom)
pkgdesc='Qt module and API for defining 3D content in Qt Quick'
depends=(qt6-declarative)
makedepends=(cmake vulkan-headers assimp qt6-shadertools)
makedepends=(cmake vulkan-headers qt6-shadertools)
# TODO: use system assimp again when a new version is released
optdepends=('qt6-shadertools: for shadergen')
groups=(qt6)
_pkgfn="${pkgname/6-/}-everywhere-src-${_qtver}"
source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/$_qtver/submodules/$_pkgfn.tar.xz")
sha256sums=('26194ff27247bed5b21f253ade062da60e2dd9395a8ad29de388d41ab8548388')
_pkgfn="${pkgname/6-/}-everywhere-src-$_qtver"
source=(https://download.qt.io/official_releases/qt/${pkgver%.*}/$_qtver/submodules/$_pkgfn.tar.xz
qtquick3d-gcc11.patch)
sha256sums=('ead155359cf7fb8b2c1a69d00847196c4011433a4839938cc5f87f65a9d5d268'
'SKIP')
prepare() {
cd $_pkgfn
#patch -Np1 -i ${srcdir}/qtquick3d-gcc11.patch
}
build() {
cmake -B build -S $_pkgfn

View File

@ -0,0 +1,22 @@
--- qtquick3d-everywhere-src-6.1.0/src/3rdparty/assimp/src/include/assimp/Importer.hpp.orig 2021-05-28 14:27:09.781579466 +0200
+++ qtquick3d-everywhere-src-6.1.0/src/3rdparty/assimp/src/include/assimp/Importer.hpp 2021-05-28 14:27:46.241839965 +0200
@@ -502,7 +502,7 @@
*
* @note The returned value remains valid until one of the
* following methods is called: #ReadFile(), #FreeScene(). */
- const std::exception_ptr& GetException() const;
+ static_cast<size_t>(std::exception_ptr&) GetException() const;
// -------------------------------------------------------------------
/** Returns the scene loaded by the last successful call to ReadFile()
--- qtquick3d-everywhere-src-6.1.0/src/3rdparty/assimp/src/code/Common/Importer.h.orig 2021-05-28 14:20:23.431294103 +0200
+++ qtquick3d-everywhere-src-6.1.0/src/3rdparty/assimp/src/code/Common/Importer.h 2021-05-28 14:25:40.238765622 +0200
@@ -101,7 +101,7 @@
std::string mErrorString;
/** Any exception which occurred */
- std::exception_ptr mException;
+ static_cast<size_t>(td::exception_ptr mException);
/** List of integer properties */
IntPropertyMap mIntProperties;

View File

@ -1,92 +1,99 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Johannes Löthberg <johannes@kyriasis.com>
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Alexander F Rødseth <xyproto@archlinux.org>
# Contributor: Daniel Micay <danielmicay@gmail.com>
# Contributor: userwithuid <userwithuid@gmail.com>
pkgname=('rust' 'rust-docs')
[ "${CARCH}" == 'x86_64' ] && pkgname+=('lib32-rust-libs')
epoch=1
pkgver=1.52.1
pkgver=1.48.0
pkgrel=3
_llvm_ver=12.0.0
pkgdesc='Systems programming language focused on safety, speed and concurrency'
url='https://www.rust-lang.org/'
arch=(x86_64 powerpc64le)
arch=(powerpc)
license=('MIT' 'Apache')
makedepends=('rust' "llvm=$_llvm_ver" 'libffi' 'perl' 'python'
'curl' 'cmake' 'ninja' 'llvm11-libs')
makedepends_x86_64=('lib32-gcc-libs' 'musl')
makedepends=('rust' 'libffi' 'perl' 'python' 'curl' 'cmake' 'llvm11-libs')
checkdepends=('procps-ng' 'gdb')
options=('!emptydirs' '!strip')
source=(
"https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz"{,.asc}
"https://github.com/llvm/llvm-project/releases/download/llvmorg-$_llvm_ver/compiler-rt-$_llvm_ver.src.tar.xz"{,.sig}
0001-bootstrap-Change-libexec-dir.patch
0001-cargo-Change-libexec-dir.patch
0002-compiler-Change-LLVM-targets.patch
)
sha256sums=('3a6f23a26d0e8f87abbfbf32c5cd7daa0c0b71d0986abefc56b9a5fbfbd0bf98'
source=("https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz"{,.asc}
0001-Fix-LLVM-build.patch
0006-test-use-extern-for-plugins-Don-t-assume-multilib.patch
0007-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
0009-Link-stage2-tools-dynamically-to-libstd.patch
0016-do-not-copy-libunwind.patch
force-u32-atomics-cos-we-dont-care-and-tools-does-not-allow-us-to-disable-anything.patch)
sha256sums=('0e763e6db47d5d6f91583284d2f989eacc49b84794d1443355b85c58d67ae43b'
'SKIP'
'85a8cd0a62413eaa0457d8d02f8edac38c4dc0c96c00b09dc550260c23268434'
'SKIP'
'9ce4373ca98a3d340807da7e1d3215796926add15ca3344c2f3970de534a5d6a'
'2c80a6bbd33b5f7291a6f6b0931c298631944edc18d36e3b9986e8ca25ce9ae1'
'12f577cbff80f280c22f116ea682fc961ecb70534e4be454527b091714730a3a')
'08616f9acea0967af8fda6eed66854fb47fb618969dea139a5fc52017da43da0'
'37dd40c028f4f3f79f8ecc7357023f2cf555ad6cfbd9a55c9f1ef61589144acd'
'95ca814677947e87344b0890fd0d323f8dba567fa390219b92debdca71f14ff2'
'0883036789d8f8523de8896f9eed5c50d714c67ccbefddb46de0a80be76f3c39'
'c2394b6ee55374fce587ec03c3ffc5bd684aa67194b1bed4c34a162245b535f4'
'SKIP')
validpgpkeys=('108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE' # Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard <tstellar@redhat.com>
'B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
prepare() {
cd "rustc-$pkgver-src"
# Patch bootstrap and cargo so credential helpers
# are in /usr/lib instead of /usr/libexec
patch -Np1 -i ../0001-bootstrap-Change-libexec-dir.patch
patch -d src/tools/cargo -Np1 < ../0001-cargo-Change-libexec-dir.patch
# Use our *-pc-linux-gnu targets, making LTO with clang simpler
patch -Np1 -i ../0002-compiler-Change-LLVM-targets.patch
patch -Np1 -i ${srcdir}/0001-Fix-LLVM-build.patch
patch -Np1 -i ${srcdir}/0006-test-use-extern-for-plugins-Don-t-assume-multilib.patch
patch -Np1 -i ${srcdir}/0007-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
patch -Np1 -i ${srcdir}/0009-Link-stage2-tools-dynamically-to-libstd.patch
patch -Np1 -i ${srcdir}/0016-do-not-copy-libunwind.patch
[ "${CARCH}" == 'powerpc' ] && \
patch -Np1 -i ${srcdir}/force-u32-atomics-cos-we-dont-care-and-tools-does-not-allow-us-to-disable-anything.patch
cat >config.toml <<END
[llvm]
link-shared = true
[build]
target = ["${CHOST}"]
tools = ["cargo", "rls", "clippy", "miri", "rustfmt", "analysis", "src"]
tools = ["analysis", "cargo", "clippy", "miri", "rls", "rustfmt", "src"]
cargo = "/usr/bin/cargo"
rustc = "/usr/bin/rustc"
python = "/usr/bin/python"
extended = true
sanitizers = true
sanitizers = false
profiler = true
vendor = true
#vendor = true
#full-bootstrap = true
extended = true
[install]
prefix = "/usr"
[rust]
# LLVM crashes when passing an object through ThinLTO twice. This is triggered
# when using rust code in cross-language LTO if libstd was built using ThinLTO.
codegen-units = 1
# LLVM crashes when passing an object through ThinLTO twice. This is triggered when using rust
# code in cross-language LTO if libstd was built using ThinLTO.
# http://blog.llvm.org/2019/09/closing-gap-cross-language-lto-between.html
# https://github.com/rust-lang/rust/issues/54872
codegen-units-std = 1
debuginfo-level-std = 2
debug-assertions = false
debuginfo-level-rustc = 0
debuginfo-level-tests = 0
backtrace = true
parallel-compiler = false
jemalloc = false
llvm-libunwind = false
codegen-tests = false
channel = "stable"
rpath = false
[target.${CHOST}]
llvm-config = "/usr/bin/llvm-config"
#[target.${CHOST}]
#llvm-config = "/usr/bin/llvm-config"
END
}
@ -94,9 +101,9 @@ build() {
cd "rustc-$pkgver-src"
export RUST_BACKTRACE=1
export RUST_COMPILER_RT_ROOT="$srcdir/compiler-rt-$_llvm_ver.src"
#export RUST_COMPILER_RT_ROOT="$srcdir/compiler-rt-$_llvm_ver.src"lsa
python ./x.py dist -j "$(nproc)"
python ./x.py dist ${MAKEFLAGS}
DESTDIR="$PWD"/dest-rust python ./x.py install -j "$(nproc)"
# Remove analysis data for libs that weren't installed
@ -111,11 +118,7 @@ build() {
fi
done < <(find "dest-rust/usr/lib/rustlib" -path '*/analysis/*.json' -print0)
# move docs and cross targets out of the way for splitting
if [ "${CARCH}" == 'x86_64' ]; then
mv dest-rust/usr/lib/rustlib/i686-unknown-linux-gnu dest-i686
mv dest-rust/usr/lib/rustlib/x86_64-unknown-linux-musl dest-musl
fi
# move docs out of the way for splitting
mv dest-rust/usr/share/doc dest-doc
}
@ -140,37 +143,12 @@ package_rust() {
# overwrite them with symlinks to the per-architecture versions
ln -srft "$pkgdir"/usr/lib ${CHOST}/lib/*.so
install -d "$pkgdir"/usr/share/bash-completion/
mv "$pkgdir"/etc/bash_completion.d "$pkgdir"/usr/share/bash-completion/completions
}
package_lib32-rust-libs() {
pkgdesc='32-bit target and libraries for Rust'
depends=('lib32-gcc-libs')
provides=('lib32-rust')
conflicts=('lib32-rust')
replaces=('lib32-rust')
cd "rustc-$pkgver-src"
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE*
install -d "$pkgdir"/usr/lib/rustlib/ "$pkgdir"/usr/lib32/
cp -a dest-i686 "$pkgdir"/usr/lib/rustlib/i686-unknown-linux-gnu
ln -srft "$pkgdir"/usr/lib32 "$pkgdir"/usr/lib/rustlib/i686-unknown-linux-gnu/lib/*.so
}
package_rust-musl() {
pkgdesc='Musl target for Rust'
cd "rustc-$pkgver-src"
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE*
install -d "$pkgdir"/usr/lib/rustlib/
cp -a dest-musl "$pkgdir"/usr/lib/rustlib/x86_64-unknown-linux-musl
#install -d "$pkgdir"/usr/share/bash-completion
#mv "$pkgdir"/etc/bash_completion.d/ "$pkgdir"/usr/share/bash-completion/completions/
}
package_rust-docs() {
pkgdesc='Documentation for the Rust programming language'
description=('Documentation for the Rust programming language')
cd "rustc-$pkgver-src"
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE*

View File

@ -8,7 +8,7 @@
pkgbase=thunderbird
pkgname=(thunderbird)
pkgver=78.10.1
pkgver=78.10.2
pkgrel=1
pkgdesc='Standalone mail and news reader from mozilla.org'
url='https://www.mozilla.org/thunderbird/'
@ -30,26 +30,39 @@ makedepends=(
inetutils xorg-server-xvfb autoconf2.13 rust clang llvm gtk2 cbindgen nodejs-lts-dubnium
gawk perl findutils libotr
)
makedepends_x86_64=(nasm yasm)
makedepends_x86_64=(yasm nasm)
options=(!emptydirs !makeflags)
source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz{,.asc}
thunderbird.desktop
vendor-prefs.js
distribution.ini
mozconfig.cfg
configure-fix-passing-system-bzip2-ldflags.patch
mozconfig.cfg.{powerpc,powerpc64le,x86_64}
https://dev.gentoo.org/~whissi/mozilla/patchsets/firefox-78esr-patches-12.tar.xz)
thunderbird-78.5-rust-1.48.patch
mozconfig.cfg.powerpc64le
mozconfig.cfg.powerpc
fix-fortify-inline.patch
fix-image-format-warning.patch
fix-webrtc-glibcisms.patch
rust-has-i128.patch
rust-configure.patch
skia-sucks1.patch
skia-sucks2.patch
skia-sucks3.patch
sandbox-largefile.patch
sandbox-fork.patch
firefox-78esr-combo.patch)
validpgpkeys=(14F26682D0916CDD81E37B6D61B7B526D98F0353) # Mozilla Software Releases <release@mozilla.com>
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
# Note: These are for Arch Linux POWER use ONLY. For your own distribution, please
# get your own set of keys. Feel free to contact alex.bldck@gmail.com for
# Note: These are for Arch POWER use ONLY. For your own distribution, please
# get your own set of keys. Feel free to contact foutrelis@archlinux.org for
# more information.
_google_api_key=AIzaSyDgkw4O3LM0Jnr2N7Wq2NG7iUVzRU5sBaA
# Mozilla API keys (see https://location.services.mozilla.com/api)
# Note: These are for Arch Linux POWER use ONLY. For your own distribution, please
# get your own set of keys. Feel free to contact alex.bldck@gmail.com for
# Note: These are for Arch POWER use ONLY. For your own distribution, please
# get your own set of keys. Feel free to contact heftig@archlinux.org for
# more information.
_mozilla_api_key=de0473f2-d53f-46da-956c-6aff61bda3ab
@ -67,25 +80,21 @@ prepare() {
patch -Np1 < "../$src"
done
for patch in ${srcdir}/firefox-patches/*.patch; do
patch -Np1 -i ${patch}
for _name in audio_thread_priority num-traits glslopt; do
sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/${_name}/.cargo-checksum.json
done
printf "%s" "$_google_api_key" >google-api-key
printf "%s" "$_mozilla_api_key" >mozilla-api-key
cp ../mozconfig.cfg.${CARCH} .mozconfig
cp ../mozconfig.cfg .mozconfig
case "${CARCH}" in
powerpc64le) cp ../mozconfig.cfg.powerpc64le .mozconfig ;;
powerpc) cp ../mozconfig.cfg.powerpc .mozconfig ;;
esac
sed "s|@PWD@|${PWD@Q}|g" -i .mozconfig
cat >>${srcdir}/.mozconfig <<END
mk_add_options MOZ_MAKE_FLAGS="${MAKEFLAGS}"
END
mkdir -p third_party/rust/libloading/.deps
for component in audio_thread_priority num-traits glslopt; do
sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/${component}/.cargo-checksum.json
done
# remove pre-built binaries
find third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die
}
build() {
@ -93,6 +102,11 @@ build() {
if [[ -n "${SOURCE_DATE_EPOCH}" ]]; then
export MOZ_BUILD_DATE=$(date --date "@${SOURCE_DATE_EPOCH}" "+%Y%m%d%H%M%S")
fi
export MOZ_MAKE_FLAGS="${MAKEFLAGS}"
export MOZ_NOSPAM=1
export LC_ALL=C
./mach configure
./mach build
./mach buildsymbols
@ -138,15 +152,15 @@ _package_i18n() {
"$pkgdir/usr/lib/thunderbird/extensions/langpack-$1@thunderbird.mozilla.org.xpi"
}
# downloads x86_64 binaries... really? SKIP IT!
if [ "${CARCH}" == 'x86_64' ]; then
_languages=(
'af "Afrikaans"'
'ar "Arabic"'
'ast "Asturian"'
'be "Belarusian"'
'bg "Bulgarian"'
'br "Breton"'
'ca "Catalan"'
'cak "Kaqchikel"'
'cs "Czech"'
'cy "Welsh"'
'da "Danish"'
@ -159,6 +173,7 @@ _languages=(
'es-ES "Spanish (Spain)"'
'et "Estonian"'
'eu "Basque"'
'fa "Persian"'
'fi "Finnish"'
'fr "French"'
'fy-NL "Frisian"'
@ -174,11 +189,16 @@ _languages=(
'is "Icelandic"'
'it "Italian"'
'ja "Japanese"'
'ka "Georgian"'
'kab "Kabyle"'
'kk "Kazakh"'
'ko "Korean"'
'lt "Lithuanian"'
'ms "Malay"'
'nb-NO "Norwegian (Bokmål)"'
'nl "Dutch"'
'nn-NO "Norwegian (Nynorsk)"'
'pa-IN "Punjabi (India)"'
'pl "Polish"'
'pt-BR "Portuguese (Brazilian)"'
'pt-PT "Portuguese (Portugal)"'
@ -191,14 +211,18 @@ _languages=(
'sq "Albanian"'
'sr "Serbian"'
'sv-SE "Swedish"'
'th "Thai"'
'tr "Turkish"'
'uk "Ukrainian"'
'uz "Uzbek"'
'vi "Vietnamese"'
'zh-CN "Chinese (Simplified)"'
'zh-TW "Chinese (Traditional)"'
)
_url=https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/linux-x86_64/xpi
[ "${CARCH}" != 'x86_64' ] && _languages=()
for _lang in "${_languages[@]}"; do
_locale=${_lang%% *}
_pkgname=thunderbird-i18n-${_locale,,}
@ -218,89 +242,25 @@ for _src in "${source[@]%%::*}"; do
esac
done
sha512sums=('89c8bc9f76335093f7a43c9980da3f4436c1fa0ed3ffd9c0a2d9648749ad7ab427e2aede2b20ee9143748c828bdd417b5b6cf06e73597dee3a745ef28143ee2d'
sha512sums=('b938580055b8b935a37cd7b7aea9b654f5dc42b0a5d459ccb95d10fbde49405c5fad3ebf450ecd1077289aef008801d1dbbb7d5be56bb238616df14a7658c3f4'
'SKIP'
'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012'
'6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734'
'5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f'
'5d622d208e62b512e1af7ef8fd5de76c02e209d6b569041ad9047132a1bff093162f4ebce1450d92dfa0b0405d3cd24501604629e97cfae00457afbf4b615b72'
'e44fd608fb4975914479b4a1a5aa44e87f125564fb812fb46c0ee07d503dfdcdb444d7335efe90436caecc7be502aae6b558c585013ee924e618e6213988ae99'
'e3ed2708b8354015cb3d2c81048d1ce4932d1effbe2b40efa7cf9b45c1b923b9fd708645e2f8aa0136a485a3f7ce6b396b85721aaf535a4a764fd5005fb7e222'
'bbb8b0e7b9c67372eb22e1d6b6b5758fe504ded84c40a076d4a064374a1bf34ac12d5b514b328ac9ca984d976b9e0fbde81e68a66bec915c997d6be0c0917584'
'821288d7ee96bed704965a9bf13515d6dc0521975b67d31bccf2fba4b0b1cbc9fe67a5cc6f778d8fc7b598971af689d605535bcb7d684d5ac25542522b96f0b5'
'd1e16ff04e348cd86c8cef7e289625d62578bdfa3c2addc957d7e2848aa239112ebdea0fb85efb46313bb1795a43cb91d58cce9e6a99d7e257d77321ba196b9e'
'836c2301d11a0969395c3dc8dfdb42488afc0f49c3cd72fdabc2036c10c68a968dd58d2977112388a5abdff815b698dcd770acdbdb9fa30644fe6cc444df4ed4'
'b659b51f1bb0c7154f3ac9ac19aed22d302c5d1f00ede474ae09c84f8ae233a65400fe30777f6a187407d8b9616398e4264d1da796932f069a7e5e8f8ccd948c'
'65010403c0c9e5ff903473f8cc9ee7ecd3f3835f14a585c8116a36813db008980e686c8a3abcfc495f5c52c40019f2cb03a3c06ca4b7a17cd6c30379a9a43eff'
'3b331a2c0fb7c4f87d73c8e601c31f669c084eb36432958e91c8cbee06a6027a7d7a440b1e6b27cfed57d21cf484e031f15ea3216abab7d958e6a8ec2ed9f116'
'9d92ceb2ffeed545b4372dc8ffce09b4ca9ab91613b7bdc15f45dfd6ab817a53eecde8164cd2b7c98043fb208d29ca8c126a5cb7494c92aeb2d7d19a08264831'
'f3f7e8ae17f607370eadb9e16c68767ead858f427bfa5f560bed44c34c652fcd05056eb186f6b6a963e764d6fa385ea82b663c583cf41ffb85357d6046608cf7'
'c51e1e9d344336f221a132ec23550b76379fd96135555058d0c19c88d7ecb4b401cb54a795aa2a8b612d326b2d286139bdeaeb237f6726da0f87b6d6b7115ffc'
'259d83f86a32b2eb2aa026da28e158ca56ae02c29aaaf907e6fb144a4927ac67ecaf194d428d05c89a9cc471c7d7e45fd261448ff17f5420986622666dc16d36'
'd36d133063e1b3e9c8e2d6fea125301f07d4c1c43d05c655f8f1826ba189909f73c7eead1cb381bf17a408c4edb353846db3d77e6543318d0b8475acf07250da'
'2899af9cee4360b9084496ed099115680fb4a23353ad00ad5f3cf54fb1bbfd9facccf63d7f35ee61f7c8614526cabd549effabc77212c5efb6f1621a78d64466'
'bf0d5ed14b6b7f3f36c668919af0932fd4d526682a7c0874badea67a0720b64da2ed81965834510e0bc27c4d6e25913aa357733b6bae6798a38e7d6ed69025fd'
'2571253fb57d552e2269b14878d72968328e92822d35bdca434463faa27ff4dff635a232e981a2d00f1a1647b584dd660ed030fe5aff168aecf3ef34cad574e1'
'fd9479b513ada61820aa0f9ca321ff04ffe5cf309c7068cd8efd143215f90234137aaf0f7a4eb01898c579feae757994c4c340da0a41eb938d95c07632782804'
'631c9c2fdf7fa8710418c8c1bb872a89fb973cea5a939380fac64b4668e2bee2b84d5aaab97bbf37aed5b5da045d666dbc2a11826791fbccea94a20e80e52fc0'
'708204df6ceab6f52dfd047056d76b4181088bf43636fcb7834a90bb5410b00ed9a3949d8691e15b733fc8724d6d62419986f72a813ddd8bce0e188abba59169'
'250448121f80c6719a1449e00c4e91a7754767853502f11f0aa38ae3014ab90aa6e0d2fb4d4150e29da5a0ca5488e1a7992f83f6820dde18cffc3936d9c2464e'
'85c795b898b4a89e516b9a0055b6edf2802be090be9df5cd0899121cf561acdcbe7af11f2769c2e99eb1149cff02e517edc3b157a8f356fb66bb36221ac6db1e'
'578c9b5c92f392b5349d0114872f33a63f25ddc24e08a1ebdbe0fe384a4d08af6836c5b4566f7d803e1367ed112fc4c6f0d086096f4f331acf673d0860990ef6'
'fc55f90eb4ed1b347dee710b23189714d1333cff57b41770f9b35d485813b7e10d0110085d407f16611c2428225bbe927a3fc865fecb69a15ca65e208fdc1c70'
'ce0bc7103fcbe7e1d6ce14c482350b4e2f7a2776b1458087717bb85ca1e9d9eddaf9d4e7a4524d0d283aeffc35f177306c7a7ba39a9931408d99a86db799d02b'
'8621c5f47271158fc80944cc0162f1103f0d4ddc9cfc222f4bd6f00b85126677dd7f10c45630ada994932b326f734ab3822d204b43e59e4ec5c3f4f178adbf14'
'5d790a9a6171b47fb9a103451e66e7a64fa3b7bdaafcfc9289eea81724fe00f48576476b21ec9f0e77bd4077d868a5e865e69320fac609d91f78904607738630'
'155c7166ac22a1a278f35dba8cd63feb57fb5361df8950d1df6f208eb0bf50215ccde5141308e4989412836733e5c37db224a30e01b2f9d2fab52d286b35b268'
'0455c75a62a08fda3face543f1291844af61e931912c74235f5b14109fae30ff7d67aa6e7d36087304ad0c4f27a9d741c32a94ffcd54a89a28a365896316a218'
'8c1d047be3876f58f877b4da7fc4a0309019b7d1cdc591e2207c08a811569da5928c1b9ad365971b16c51e44e46acb82357f9a5a4e5e14e6dd31c01a37ace1e9'
'6b7b7c184a0def75e4c1f81f1fe6c7ef0637facbdb2f68c5541b4d3b95b548fe4d613cf7e804df268cdc68a9443304ac19fc26867dc59ac9bffdae6f81786dfa'
'f02d9d28185683bf3d1e27f952f661d19b9b65de932d1e77e9cf50203964f859e4de650027d170912d730203dfdbd9658ecd0060a8b776c9bf2feea412f652d5'
'13fa52ff3a3a619ae5e1e44581b25c291610b74196c3e580fb154ad21a5778611d5a78dcda78e04f0de834d4edcdd964b5ef49182723e32a8706ec01ecb62acd'
'fc830e3eb327cabec0ea4ed71bc51db465f073f2c7d7832f3c1176c066b37f6d1ab82fd1a342bc2d884b774c5896812e25e0184951ed3bbf68880136aeee969e'
'b0303def5df18fe698f89b9a1e94c9e6e4265ac957cbcb8bc6ebadfcedd6a871a6516d7095d8b1ddf4e0f1f0b1cd672407a7e6a45aa13a4fce5f99030c1e21bb'
'4718d0e322d3eacb9871c8a5e12bd8a0dfd3183895b205fdf0bde9a4203baa59d1b0715a48b5441966a400df2c7e5020403d4c65d925df403c01689a32d14262'
'28eb102f038d0a4ffe52c9d658282156f9b0bca185cff5d5ac43224f739e4e898f22e2d5ad5ed3288eb6534e0834bc71b03f4a23a30aa21d33599a66f75855c7'
'6a31824bad43c17c2f8b543f59bc095475c8ab8d3999d2324fbb74a4b1300530d79968827cd2a5733fc8f085f9b4cf2d8a3ff6a16ecbaca7c2b654b9aa7940c3'
'5c8b553c4b10f0626e5e7f6be2aa2ed0baf32f1d1f607c5f97db6f86c539786d1b9d9fab7d7d821092f86b1460cea598f4f234a98e0324c56c02311d252f46b2'
'365ce4fb3ca26fc27303a9210da3a5fefa334282b12400d5752ac026c4104c33c39c95edb7c0ffa77c230c625edc183313f9bc8e24b2868c47b66eab97391265'
'3b267a8eb4d651f0f1f04aa79504116fabdeee1be79394830b8f209c88f1e6bb74038b0c91002f616cfea8dae8d5a6ab5390033c50826f81e608e5946d46ff7c'
'4d3485d91cd713f6424149029075168d31fa2f47fe008734a61337e998d2aa956bcf2c459a378a21fee2aede3845de78302c1b47696cdfebc7ab2910e9f28c31'
'1d7f8fcdd45407ab4a577a2bb75c857bc4fcca1d2a58db527f6ab224fcecac9c771100a5c6e9dfb6787bcddca37b8eb56fe4918c0e80eac05cb776a4b0d62447'
'e5b3e88d5d5ef590ddcde3d21fa54ff6c865c4ff9451246552693c8a37f1af94bd6a52a8db218556d9cf41722aa76abe8cb888814aa547c2957ac6d9a35b5cbf'
'263e23d0b98fae98439e73720a21980e4b6c37b3b5819ff8db19a2a601f3ebebd5cdc8633b73a7b1f1599910985f25bf790c1ab4b24122f34fd1b557c9d6dc88'
'6bf626f584ab755a31ed9cb35fb3e57181b0f0c3f2fae710e611dd9444354622e95a10c408331dada36ffa5373b85d6c131fb955332cb2522fc50c514cbd15db'
'53ae14cb551c4d6d238f0a38d3cd6dee8505ec57ea0b3ec847495c69c76052788042ab28c34a2bea9c293df1972277ffb625f4860ada695f381de213dd96405c'
'b1f39bb5c83eb2fc53aea164277cccee19c1077bda40b02a8cd9e9fd57e03e42f0bb534cc386b36101e868b9f55fee50bc900e82db2aecde6436fa5e6b209194'
'967ae35146e6e91c159f902e24d769fa30cc9a8067550e21e263b67f0b041c41683bc45204a92cbb9b32ccd947ab0b42f969354b51e34c4995f819f797faa669'
'41c74a9c6bbb1000f1328292a9fe74c17c07a407fbd2d5a74e4ce5f3213700a7ecc41e64cc0e809e799fd6aa2a169479c06f135415fa3824029787f2e3597f8b'
'275ac5185fced3828d31c8f178bc73ce5c406baff2af5b79b376af30403a33543bc2aa1f741f9fe25a0a6b3f8eaf816b931e544130c0d5a172eae486cbbd9287'
'45bc9d57694ae500474b02853a272a5a880fb831c0f26537698383370eb942be7a9062eea08e832bb5dd54b0dec20461f99c76a6249fb2fbde9c0af1a7b7170b'
'17ddf55f2a1eee7d8ad4e6d755db1922e35250bf0b3b7a2ac6d0f5275ba5b1ca7c65f29a01e5c7360516df40eee1a4ffd58bc312e7d7e59ae98fe1b236f17590'
'ac12e7581ca8819b4638d02993b46a4091e3bad265d7a43f714939546ba1bf1c825fdf2ec792aceb779cd919a850ffb3859b3141ced7610515006b2735dfeb30'
'187f52982c7047e85988f877325b52533cb905d75e5f050e8db4f0bae3532dec032e3b7ac520679ae893b57a83dc56ea557beade2a22ebe6dcacd48d1b217721'
'ace32746050a4f7b1e55cc6c858ec090deedbbd4dfdf8dfa949517057fd88d5eeb3f8498754d7875395006b605adcc4d612d291357caa647ad00f3e4b3052117'
'a3ac82eca9b7586f8940b313712482404e0a9d502a85f124cb46b7c32e86362e6ec2236de857d62da5fc88a9f092311237398e039980665f62966dbd5b87f107'
'd783f5bfe68a3c4ce6471c57b34b3a4fd6bc20f41951195cd07df46f2e1a93b62bdc9faec338e972eadd453409b4d6aecd049f322d18f850e5d4f44576d3b78c'
'ec11ccb87a4f2c2c6fac7352f10a1d1165c0c6128b218c86f78f9f5d2c3bff7493dd7bd4edd372118e062d18e10843922918297879c61d2a3fb4a262c4c5d239'
'c1d4304d85af76618dcc894c3ddd6c0811f22117c6057a84dfa4d5882a2dcd356748bc55e4bd0005ab76fff3e75da328d8f74713d75ee272ed8682722b84f852'
'8e248a0e92d6e274a5535c5f0a10ebb5de2251c95f6de7a6acffb0aa78fcd7f29ecd62db083380dc51057a20de4abc1e41f74867413e32a63f9cfe6b29aee409'
'a53c5ba7f0f11fdd90ba1bc25a823efa02f539981dd3d23e9ac499f94df07771cc66df66e5e86dd41d883d95881062c53f4a33034ce31e003298e2adfd2409c9'
'd302634bb6405b018d128fab87c107336fcf4b90cf2e60e576f3b991e36abac2d9b4d7ebb1cf71d1a7a42c1219309276e00e88ce7ca68b180311259a062a3e21'
'ccc7d1ec0e8d040b7299ea3ffa3f64da838656e7c48c9a39dc7665e2c2cd9c0aced89272a676500a3da2d95779e3753450d992a2083265eead4afd2234a405b2'
'b090dd30644c8c54898f1857c00e3e35f8d9e28705534d60b10039ccb102986353ad38501bd59150f870012194de274f933113b583098acf47389bb16fc99b55'
'a4ada20993753092e39a473cca575d32b1d4fbe87547199930486fc3f8ae8fba7727030f91a7e04970a887280aba3508e5e834cdbf89b7040c3b35b148d89093')
else
sha512sums=('fffae4bcf2411834a86b5d1fd7c3fa8dbc32763061de4afef44ec95d55a8c4ab94576f54bd8b8c9aef22e0c4a09b48a381ba2ddafc31be60ef79b81e6835e4db'
'SKIP'
'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012'
'6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734'
'5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f'
'e3ed2708b8354015cb3d2c81048d1ce4932d1effbe2b40efa7cf9b45c1b923b9fd708645e2f8aa0136a485a3f7ce6b396b85721aaf535a4a764fd5005fb7e222'
'8ae2dd8973b7f6d6e0bb58a19adf8f7350eeea838391147d49549c9f3ca93150e9a311cb965986dc3080e747b9da9b3968a44c314b82c83a7d6fb33248b64299'
'03c5c19f933cc22ce00d454b4fa430b162b1f59aa7d6479cc48570fe5033aec51c1561b89a3023e7b251bcf3035c8aa0a8c97505fce3449439f325d26c135bb3'
'29768cb64863627fc13512f10a7af950affac975e2e2a2843b27a1db809232fcecbf503ef7126ac780b49bd1a868505534b80b781e2fbe1f44df27e993293c02'
'e44fd608fb4975914479b4a1a5aa44e87f125564fb812fb46c0ee07d503dfdcdb444d7335efe90436caecc7be502aae6b558c585013ee924e618e6213988ae99'
'4445c0880fc234c3838394483ce986e4e222260a99427069ba9c55b56fcd49a485ec916ee6aa2629f922390e92bfcd78028e30cc2e62fad9bc080ae45b26ba2e')
fi
'09bc32cf9ee81b9cc6bb58ddbc66e6cc5c344badff8de3435cde5848e5a451e0172153231db85c2385ff05b5d9c20760cb18e4138dfc99060a9e960de2befbd5'
'669763939b00d31a8eb346acf5f9e6dd13d624e731ee4ba195677ac3e535aa02a4c2b3ff1987c9527222e24c02558a1fe35f0f6c6b169106a9f02329ba46b0f1'
'7da8d885ea3d30e5640189383d458dd0dc3c86fa9c2bad7148852adc08227eda91c683dd64e37d0cefdea2bf890752950dae960aa8382982480860a5029e11a9'
'63d9e67006ca847c4f66bc0caab84a332446cf947297a27cbd1357cc629273d06538ab3207f61483f253dc78503aa9078c8bc34d1165071520ea51cc6caa2ebc'
'1961f6a8672ea7c37cfd06e227367969bca330146e8424375628acdb61e09ddf3cf7c187f8a593d3b8b3cb589080630008f61332e7c3fc5c0998ee34707e3805'
'f5a3eb9d94f6e97146e3f6bafce172d37fb78e62da2c1889170fd5c835cf7b9987daf7c3ea16ca924ac195d47f66e29ea4080c1e8b0b1be6e00869b8319bbffa'
'9152bd3e6dc446337e6a2ed602279c620aedecc796ba28e777854c4f41fcf3067f9ebd086a4b63a6b76c2e69ec599ac6435b8eeda4f7488b1c45f69113facba4'
'20cbd73e28b25febfda33d97ba55f918fff97dc26ef0be349bc07a5f34ad8f62b68635e9ebcc834d7ca07f21d88a87648cbe906c7674318b25b06bc512f2e1d6'
'36ce3c2f97e4b53a627d3dba48a34921eb3fe7303524b8fe59033f3d159ea48bc90869fb555b1774b532f31e5b967fbf76d0305743f462cd9036f43cba7da044'
'4911ddb41bef8d9f6d6200159cde465627e940fe1c09099be55769d21a5a52a3f737e1bf803daa96126c035b091aea880fbc5d2e6cf5da96ddd17322461a72d6'
'64b974c6df7cff8f97fe82992bd3ee8f2258ab769dd2caa59e7c9395cdffa7108b78c43ea31ba0bad2dbdde45a9a2b6924945d9a1a7908ded0bbc6f543c4a1d4')
# vim:set sw=2 et:

View File

@ -1,88 +0,0 @@
https://bugzilla.mozilla.org/show_bug.cgi?id=1626236
https://bug1626236.bmoattachments.org/attachment.cgi?id=9137096
# HG changeset patch
# User msirringhaus@suse.de
# Date 1582805876 -3600
# Thu Feb 27 13:17:56 2020 +0100
# Node ID cc3d09abea31068e57f1ab918782f9f86fc6a158
# Parent 9cd90914846f667f18babc491a74c164ae5d6e9f
imported patch decoder_workaround.patch
diff -r 9cd90914846f image/decoders/nsGIFDecoder2.cpp
--- a/image/decoders/nsGIFDecoder2.cpp Thu Feb 27 12:57:14 2020 +0100
+++ b/image/decoders/nsGIFDecoder2.cpp Fri Mar 27 13:06:18 2020 +0100
@@ -422,6 +422,9 @@
MOZ_ASSERT(mSwizzleFn);
uint8_t* data = reinterpret_cast<uint8_t*>(aColormap);
mSwizzleFn(data, data, aColors);
+#if MOZ_BIG_ENDIAN()
+ SwizzleRow(SurfaceFormat::A8R8G8B8, SurfaceFormat::B8G8R8A8)(data, data, aColors);
+#endif
}
LexerResult nsGIFDecoder2::DoDecode(SourceBufferIterator& aIterator,
diff -r 9cd90914846f image/decoders/nsJPEGDecoder.cpp
--- a/image/decoders/nsJPEGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
+++ b/image/decoders/nsJPEGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
@@ -263,6 +263,9 @@
case JCS_YCbCr:
// By default, we will output directly to BGRA. If we need to apply
// special color transforms, this may change.
+#if MOZ_BIG_ENDIAN()
+ mInfo.out_color_space = MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB;
+#else
switch (SurfaceFormat::OS_RGBX) {
case SurfaceFormat::B8G8R8X8:
mInfo.out_color_space = JCS_EXT_BGRX;
@@ -277,6 +280,7 @@
mState = JPEG_ERROR;
return Transition::TerminateFailure();
}
+#endif
break;
case JCS_CMYK:
case JCS_YCCK:
diff -r 9cd90914846f image/decoders/nsPNGDecoder.cpp
--- a/image/decoders/nsPNGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
+++ b/image/decoders/nsPNGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
@@ -361,7 +361,7 @@
IResumable* aOnResume) {
MOZ_ASSERT(!HasError(), "Shouldn't call DoDecode after error!");
- return mLexer.Lex(aIterator, aOnResume,
+ LexerResult res = mLexer.Lex(aIterator, aOnResume,
[=](State aState, const char* aData, size_t aLength) {
switch (aState) {
case State::PNG_DATA:
@@ -371,6 +371,14 @@
}
MOZ_CRASH("Unknown State");
});
+
+#if MOZ_BIG_ENDIAN()
+ if(res.is<TerminalState>() && res.as<TerminalState>() == TerminalState::SUCCESS) {
+ NativeEndian::swapToLittleEndianInPlace<uint32_t>((uint32_t*)(mImageData), mImageDataLength / 4);
+ }
+#endif
+
+ return res;
}
LexerTransition<nsPNGDecoder::State> nsPNGDecoder::ReadPNGData(
diff -r 9cd90914846f image/decoders/nsWebPDecoder.cpp
--- a/image/decoders/nsWebPDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
+++ b/image/decoders/nsWebPDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
@@ -237,7 +237,12 @@
// WebP doesn't guarantee that the alpha generated matches the hint in the
// header, so we always need to claim the input is BGRA. If the output is
// BGRX, swizzling will mask off the alpha channel.
+#if MOZ_BIG_ENDIAN()
+ mBuffer.colorspace = MODE_ARGB;
+ SurfaceFormat inFormat = mFormat;
+#else
SurfaceFormat inFormat = SurfaceFormat::OS_RGBA;
+#endif
SurfacePipeFlags pipeFlags = SurfacePipeFlags();
if (mFormat == SurfaceFormat::OS_RGBA &&

View File

@ -1,8 +1,8 @@
[Global]
id=archlinux
id=archpower
version=1.0
about=Mozilla Thunderbird for Arch Linux
about=Mozilla Thunderbird for Arch POWER
[Preferences]
app.distributor=archlinux
app.distributor=archpower
app.distributor.channel=thunderbird

View File

@ -1,26 +0,0 @@
Enable FLAC on platforms without ffvpx like powerpc*
diff --git dom/media/flac/FlacDecoder.cpp dom/media/flac/FlacDecoder.cpp
index 53fc3c9937f7..b23771ab80fa 100644
--- a/dom/media/flac/FlacDecoder.cpp
+++ b/dom/media/flac/FlacDecoder.cpp
@@ -7,6 +7,7 @@
#include "FlacDecoder.h"
#include "MediaContainerType.h"
#include "mozilla/StaticPrefs_media.h"
+#include "PDMFactory.h"
namespace mozilla {
@@ -14,6 +15,11 @@ namespace mozilla {
bool FlacDecoder::IsEnabled() {
#ifdef MOZ_FFVPX
return StaticPrefs::media_flac_enabled();
+#elif defined(MOZ_FFMPEG)
+ RefPtr<PDMFactory> platform = new PDMFactory();
+ return StaticPrefs::media_flac_enabled() &&
+ platform->SupportsMimeType("audio/flac"_ns,
+ /* DecoderDoctorDiagnostics* */ nullptr);
#else
// Until bug 1295886 is fixed.
return false;

View File

@ -1,48 +0,0 @@
ac_add_options --enable-application=comm/mail
ac_add_options --prefix=/usr
ac_add_options --enable-release
ac_add_options --enable-linker=gold
ac_add_options --enable-hardening
ac_add_options --enable-optimize
ac_add_options --enable-rust-simd
# https://bugzilla.mozilla.org/show_bug.cgi?id=1423822
ac_add_options --disable-elf-hack
# Branding
ac_add_options --enable-official-branding
ac_add_options --enable-update-channel=release
ac_add_options --with-distribution-id=org.archlinux
# Keys
ac_add_options --with-google-location-service-api-keyfile=@PWD@/google-api-key
ac_add_options --with-google-safebrowsing-api-keyfile=@PWD@/google-api-key
ac_add_options --with-mozilla-api-keyfile=@PWD@/mozilla-api-key
# System libraries
ac_add_options --with-system-zlib
ac_add_options --with-system-bz2
ac_add_options --with-system-icu
ac_add_options --with-system-jpeg
# does not have APNG support
# ac_add_options --with-system-png
ac_add_options --with-system-libvpx
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-botan
ac_add_options --with-system-webp
ac_add_options --with-system-libevent
ac_add_options --with-system-ffi
ac_add_options --with-system-pixman
# Features
ac_add_options --enable-alsa
ac_add_options --enable-openpgp
ac_add_options --enable-calendar
ac_add_options --disable-jack
ac_add_options --disable-crashreporter
ac_add_options --disable-updater
# System addons
ac_add_options --with-unsigned-addon-scopes=app,system
ac_add_options --allow-addon-sideload

View File

@ -1,36 +0,0 @@
This is not a complete/correct patch, but it makes firefox build. For now
mostly for tracking, so a real fix can be made, but right now it still
segfaults on start.
Ref: https://hg.mozilla.org/mozilla-central/rev/08339a56f3ae
Ref: https://hg.mozilla.org/mozilla-central/rev/d16fcad6aa60
Ref: https://hg.mozilla.org/mozilla-central/rev/ab87611d012e
Ref: https://hg.mozilla.org/mozilla-central/file/tip/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_linux.cpp
--- a/xpcom/reflect/xptcall/xptcall.h
+++ b/xpcom/reflect/xptcall/xptcall.h
@@ -71,6 +71,11 @@ struct nsXPTCVariant {
ExtendedVal ext;
};
+#if defined(__powerpc__) && !defined(__powerpc64__)
+ // this field is still necessary on ppc32, as an address
+ // to it is taken certain places in xptcall
+ void *ptr;
+#endif
nsXPTType type;
uint8_t flags;
@@ -91,7 +96,12 @@ struct nsXPTCVariant {
};
void ClearFlags() { flags = 0; }
+#if defined(__powerpc__) && !defined(__powerpc64__)
+ void SetIndirect() { ptr = &val; flags |= IS_INDIRECT; }
+ bool IsPtrData() const { return IsIndirect(); }
+#else
void SetIndirect() { flags |= IS_INDIRECT; }
+#endif
bool IsIndirect() const { return 0 != (flags & IS_INDIRECT); }