diff options
Diffstat (limited to 'pkgs/development/compilers/llvm/4/clang/0001-Fix-compilation-w-gcc9.patch')
-rw-r--r-- | pkgs/development/compilers/llvm/4/clang/0001-Fix-compilation-w-gcc9.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/4/clang/0001-Fix-compilation-w-gcc9.patch b/pkgs/development/compilers/llvm/4/clang/0001-Fix-compilation-w-gcc9.patch new file mode 100644 index 00000000000..ea934257408 --- /dev/null +++ b/pkgs/development/compilers/llvm/4/clang/0001-Fix-compilation-w-gcc9.patch @@ -0,0 +1,59 @@ +From a2af0b02eba35d0670e3e442ff7c61b3e2304edd Mon Sep 17 00:00:00 2001 +From: Maximilian Bosch <maximilian@mbosch.me> +Date: Mon, 30 Dec 2019 02:11:35 +0100 +Subject: [PATCH] Fix compilation w/gcc9 + +Build broken with the following errors: + +``` +clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function: +clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6275:24: error: lambda parameter 'CGF' previously declared as a capture +clang> 6275 | CodeGenFunction &CGF, PrePostActionTy &) { +clang> | ~~~~~~~~~~~~~~~~~^~~ +clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function: +clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6321:62: error: lambda parameter 'CGF' previously declared as a capture +clang> 6321 | auto &&EndThenGen = [&CGF, Device, &Info](CodeGenFunction &CGF, +clang> | ~~~~~~~~~~~~~~~~~^~~ +clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function: +clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6400:56: error: lambda parameter 'CGF' previously declared as a capture +clang> 6400 | auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) { +clang> | ~~~~~~~~~~~~~~~~~^~~ +``` +--- + lib/CodeGen/CGOpenMPRuntime.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/CodeGen/CGOpenMPRuntime.cpp b/lib/CodeGen/CGOpenMPRuntime.cpp +index 4025217..40a73ef 100644 +--- a/lib/CodeGen/CGOpenMPRuntime.cpp ++++ b/lib/CodeGen/CGOpenMPRuntime.cpp +@@ -6271,7 +6271,7 @@ void CGOpenMPRuntime::emitTargetDataCalls( + // Generate the code for the opening of the data environment. Capture all the + // arguments of the runtime call by reference because they are used in the + // closing of the region. +- auto &&BeginThenGen = [&D, &CGF, Device, &Info, &CodeGen, &NoPrivAction]( ++ auto &&BeginThenGen = [&D, Device, &Info, &CodeGen, &NoPrivAction]( + CodeGenFunction &CGF, PrePostActionTy &) { + // Fill up the arrays with all the mapped variables. + MappableExprsHandler::MapBaseValuesArrayTy BasePointers; +@@ -6318,7 +6318,7 @@ void CGOpenMPRuntime::emitTargetDataCalls( + }; + + // Generate code for the closing of the data region. +- auto &&EndThenGen = [&CGF, Device, &Info](CodeGenFunction &CGF, ++ auto &&EndThenGen = [Device, &Info](CodeGenFunction &CGF, + PrePostActionTy &) { + assert(Info.isValid() && "Invalid data environment closing arguments."); + +@@ -6397,7 +6397,7 @@ void CGOpenMPRuntime::emitTargetDataStandAloneCall( + "Expecting either target enter, exit data, or update directives."); + + // Generate the code for the opening of the data environment. +- auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) { ++ auto &&ThenGen = [&D, Device](CodeGenFunction &CGF, PrePostActionTy &) { + // Fill up the arrays with all the mapped variables. + MappableExprsHandler::MapBaseValuesArrayTy BasePointers; + MappableExprsHandler::MapValuesArrayTy Pointers; +-- +2.23.1 + |