Simplify patch management through %autopatch
This commit is contained in:
parent
c1e69a30ae
commit
08bee7e51a
@ -1,7 +1,7 @@
|
|||||||
From c6b921c8d833546946b70a8c2640032fd7c62461 Mon Sep 17 00:00:00 2001
|
From c6b921c8d833546946b70a8c2640032fd7c62461 Mon Sep 17 00:00:00 2001
|
||||||
From: serge-sans-paille <sguelton@redhat.com>
|
From: serge-sans-paille <sguelton@redhat.com>
|
||||||
Date: Thu, 25 Feb 2021 14:04:52 +0100
|
Date: Thu, 25 Feb 2021 14:04:52 +0100
|
||||||
Subject: [PATCH 1/7] [PATCH][clang] Reorganize gtest integration
|
Subject: [PATCH 1/6] [PATCH][clang] Reorganize gtest integration
|
||||||
|
|
||||||
---
|
---
|
||||||
clang/CMakeLists.txt | 12 +++++-------
|
clang/CMakeLists.txt | 12 +++++-------
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
From 84e4fe467f290c85b3d7d22c7333d192e1282054 Mon Sep 17 00:00:00 2001
|
||||||
|
From: serge-sans-paille <sguelton@redhat.com>
|
||||||
|
Date: Wed, 17 Mar 2021 08:32:56 +0100
|
||||||
|
Subject: [PATCH] [PATCH][clang-tools-extra] 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.
|
||||||
|
---
|
||||||
|
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 60c6d2a..41bc2ed 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)
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From 8a4eb9e3fa9456de3da47115bdbd47dc552b5263 Mon Sep 17 00:00:00 2001
|
From 07b062e1f7c3359550aa8c0a7b86f6054971439d Mon Sep 17 00:00:00 2001
|
||||||
From: serge-sans-paille <sguelton@redhat.com>
|
From: serge-sans-paille <sguelton@redhat.com>
|
||||||
Date: Thu, 25 Feb 2021 14:09:29 +0100
|
Date: Thu, 25 Feb 2021 14:09:29 +0100
|
||||||
Subject: [PATCH 3/7] [PATCH][clang] Make -funwind-tables the default on all
|
Subject: [PATCH 2/6] [PATCH][clang] Make -funwind-tables the default on all
|
||||||
archs
|
archs
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -10,7 +10,7 @@ Subject: [PATCH 3/7] [PATCH][clang] Make -funwind-tables the default on all
|
|||||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
|
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
|
||||||
index c4c71e1..d237cc6 100644
|
index b2ddef1..715b323 100644
|
||||||
--- a/clang/lib/Driver/ToolChain.cpp
|
--- a/clang/lib/Driver/ToolChain.cpp
|
||||||
+++ b/clang/lib/Driver/ToolChain.cpp
|
+++ b/clang/lib/Driver/ToolChain.cpp
|
||||||
@@ -257,7 +257,7 @@ std::string ToolChain::getInputFilename(const InputInfo &Input) const {
|
@@ -257,7 +257,7 @@ std::string ToolChain::getInputFilename(const InputInfo &Input) const {
|
@ -1,7 +1,7 @@
|
|||||||
From 9e32a3c1481e5bccd951789bb3676cd8c85c0244 Mon Sep 17 00:00:00 2001
|
From 2c6cd40d016f492d53e16f1c7424a0d9878ae7ec Mon Sep 17 00:00:00 2001
|
||||||
From: Tom Stellard <tstellar@redhat.com>
|
From: Tom Stellard <tstellar@redhat.com>
|
||||||
Date: Fri, 31 Jan 2020 11:04:57 -0800
|
Date: Fri, 31 Jan 2020 11:04:57 -0800
|
||||||
Subject: [PATCH 4/7] [PATCH][clang] Don't install static libraries
|
Subject: [PATCH 3/6] [PATCH][clang] Don't install static libraries
|
||||||
|
|
||||||
---
|
---
|
||||||
clang/cmake/modules/AddClang.cmake | 2 +-
|
clang/cmake/modules/AddClang.cmake | 2 +-
|
@ -1,7 +1,7 @@
|
|||||||
From ca5dec7a5ec6ca29ee6c4f2a35aaec03ad2e8238 Mon Sep 17 00:00:00 2001
|
From d8af49687765744efaae7ba0f0c4c0fcd58a0e31 Mon Sep 17 00:00:00 2001
|
||||||
From: serge-sans-paille <sguelton@redhat.com>
|
From: serge-sans-paille <sguelton@redhat.com>
|
||||||
Date: Wed, 23 Sep 2020 12:47:30 +0000
|
Date: Wed, 23 Sep 2020 12:47:30 +0000
|
||||||
Subject: [PATCH 5/7] [PATCH][clang] Prefer gcc toolchains with libgcc_s.so
|
Subject: [PATCH 4/6] [PATCH][clang] Prefer gcc toolchains with libgcc_s.so
|
||||||
when not static linking libgcc
|
when not static linking libgcc
|
||||||
|
|
||||||
Fedora ships cross-compilers on all platforms, so a user could end up
|
Fedora ships cross-compilers on all platforms, so a user could end up
|
@ -1,7 +1,7 @@
|
|||||||
From 88134d9897dce14e34c51406320764356bfde6a4 Mon Sep 17 00:00:00 2001
|
From ea01f898fd74bae23d8be31f1a29b542e886e3a5 Mon Sep 17 00:00:00 2001
|
||||||
From: Tom Stellard <tstellar@redhat.com>
|
From: Tom Stellard <tstellar@redhat.com>
|
||||||
Date: Tue, 9 Feb 2021 13:35:43 -0800
|
Date: Tue, 9 Feb 2021 13:35:43 -0800
|
||||||
Subject: [PATCH 6/7] [PATCH][clang] Partially Revert "scan-view: Remove
|
Subject: [PATCH 5/6] [PATCH][clang] Partially Revert "scan-view: Remove
|
||||||
Reporter.py and associated AppleScript files"
|
Reporter.py and associated AppleScript files"
|
||||||
|
|
||||||
This reverts some of commit dbb01536f6f49fa428f170e34466072ef439b3e9.
|
This reverts some of commit dbb01536f6f49fa428f170e34466072ef439b3e9.
|
@ -1,12 +1,14 @@
|
|||||||
From 7e0b36755d9bcccaddd1c4c1c69b1f12b729cf4e Mon Sep 17 00:00:00 2001
|
From 1ef1e91142ac48ecb826f33e1e7072c7402d9fe7 Mon Sep 17 00:00:00 2001
|
||||||
From: serge-sans-paille <sguelton@redhat.com>
|
From: serge-sans-paille <sguelton@redhat.com>
|
||||||
Date: Mon, 15 Mar 2021 09:28:48 +0100
|
Date: Wed, 3 Mar 2021 09:58:31 +0100
|
||||||
Subject: [PATCH 7/7] [PATCH][clang] Allow __ieee128 as an alias to __float128
|
Subject: [PATCH 6/6] [PATCH][clang] Allow __ieee128 as an alias to __float128
|
||||||
on ppc
|
on ppc
|
||||||
|
|
||||||
This matches gcc behavior.
|
This matches gcc behavior.
|
||||||
|
|
||||||
Backported from https://reviews.llvm.org/D97846
|
Differential Revision: https://reviews.llvm.org/D97846
|
||||||
|
|
||||||
|
(cherry picked from commit 4aa510be78a75a4da82657fe433016f00dad0784)
|
||||||
---
|
---
|
||||||
clang/include/clang/Basic/LangOptions.def | 1 +
|
clang/include/clang/Basic/LangOptions.def | 1 +
|
||||||
clang/lib/Basic/IdentifierTable.cpp | 3 +++
|
clang/lib/Basic/IdentifierTable.cpp | 3 +++
|
34
clang.spec
34
clang.spec
@ -85,16 +85,18 @@ Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{versio
|
|||||||
%endif
|
%endif
|
||||||
Source4: tstellar-gpg-key.asc
|
Source4: tstellar-gpg-key.asc
|
||||||
|
|
||||||
%if !0%{?compat_build}
|
# Patches for clang
|
||||||
Patch21: completion-model-cmake.patch
|
Patch0: 0001-PATCH-clang-Reorganize-gtest-integration.patch
|
||||||
%endif
|
Patch1: 0002-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch
|
||||||
|
Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch
|
||||||
|
Patch3: 0004-PATCH-clang-Prefer-gcc-toolchains-with-libgcc_s.so-w.patch
|
||||||
|
Patch4: 0005-PATCH-clang-Partially-Revert-scan-view-Remove-Report.patch
|
||||||
|
Patch5: 0006-PATCH-clang-Allow-__ieee128-as-an-alias-to-__float12.patch
|
||||||
|
|
||||||
Patch4: 0001-PATCH-clang-Reorganize-gtest-integration.patch
|
# Patches for clang-tools-extra
|
||||||
Patch13: 0003-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch
|
%if !0%{?compat_build}
|
||||||
Patch15: 0004-PATCH-clang-Don-t-install-static-libraries.patch
|
Patch201: 0001-PATCH-clang-tools-extra-Make-clangd-CompletionModel-.patch
|
||||||
Patch17: 0005-PATCH-clang-Prefer-gcc-toolchains-with-libgcc_s.so-w.patch
|
%endif
|
||||||
Patch19: 0006-PATCH-clang-Partially-Revert-scan-view-Remove-Report.patch
|
|
||||||
Patch20: 0007-PATCH-clang-Allow-__ieee128-as-an-alias-to-__float12.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -258,30 +260,22 @@ Requires: python3
|
|||||||
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE3}' --data='%{SOURCE0}'
|
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE3}' --data='%{SOURCE0}'
|
||||||
|
|
||||||
%if 0%{?compat_build}
|
%if 0%{?compat_build}
|
||||||
%autosetup -n %{clang_srcdir} -p1
|
%autosetup -n %{clang_srcdir} -p2
|
||||||
%else
|
%else
|
||||||
|
|
||||||
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE2}' --data='%{SOURCE1}'
|
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE2}' --data='%{SOURCE1}'
|
||||||
%setup -T -q -b 1 -n %{clang_tools_srcdir}
|
%setup -T -q -b 1 -n %{clang_tools_srcdir}
|
||||||
%patch21 -p1 -b .comp-model
|
%autopatch -m200 -p2
|
||||||
|
|
||||||
# failing test case
|
# failing test case
|
||||||
rm test/clang-tidy/checkers/altera-struct-pack-align.cpp
|
rm test/clang-tidy/checkers/altera-struct-pack-align.cpp
|
||||||
|
|
||||||
|
|
||||||
pathfix.py -i %{__python3} -pn \
|
pathfix.py -i %{__python3} -pn \
|
||||||
clang-tidy/tool/*.py \
|
clang-tidy/tool/*.py \
|
||||||
clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
|
clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
|
||||||
|
|
||||||
%setup -q -n %{clang_srcdir}
|
%setup -q -n %{clang_srcdir}
|
||||||
|
%autopatch -M200 -p2
|
||||||
%patch4 -p2 -b .gtest
|
|
||||||
%patch13 -p2 -b .unwind-default
|
|
||||||
%patch15 -p2 -b .no-install-static
|
|
||||||
%patch17 -p2 -b .check-gcc_s
|
|
||||||
%patch19 -p2 -b .scan-view-remove-files-fix
|
|
||||||
%patch20 -p2 -b .ieee128
|
|
||||||
|
|
||||||
|
|
||||||
# failing test case
|
# failing test case
|
||||||
rm test/CodeGen/profile-filter.c
|
rm test/CodeGen/profile-filter.c
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
diff -Naur clang-tools-extra-12.0.0rc1.src.orig/clangd/quality/CompletionModel.cmake clang-tools-extra-12.0.0rc1.src/clangd/quality/CompletionModel.cmake
|
|
||||||
--- clang-tools-extra-12.0.0rc1.src.orig/clangd/quality/CompletionModel.cmake 2021-02-14 17:03:14.000000000 +0100
|
|
||||||
+++ clang-tools-extra-12.0.0rc1.src/clangd/quality/CompletionModel.cmake 2021-02-14 20:57:51.000000000 +0100
|
|
||||||
@@ -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)
|
|
Loading…
Reference in New Issue
Block a user