import clang-9.0.0-5.module+el8.2.0+4717+5b2334fd
This commit is contained in:
parent
fa61016b40
commit
98ef3914b2
@ -1,2 +1,2 @@
|
|||||||
3cb1e10af3955174a3ca5e560f674f24fac2a02f SOURCES/cfe-8.0.0.src.tar.xz
|
6977cf7a802a053c57fa74138d3648b563e71e88 SOURCES/cfe-9.0.0.src.tar.xz
|
||||||
f341ba17494ba756fd404b2744e6f5991b50389f SOURCES/clang-tools-extra-8.0.0.src.tar.xz
|
ac64403321d8486699d8bea5376b2438663dbb41 SOURCES/clang-tools-extra-9.0.0.src.tar.xz
|
||||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
SOURCES/cfe-8.0.0.src.tar.xz
|
SOURCES/cfe-9.0.0.src.tar.xz
|
||||||
SOURCES/clang-tools-extra-8.0.0.src.tar.xz
|
SOURCES/clang-tools-extra-9.0.0.src.tar.xz
|
||||||
|
@ -1,120 +0,0 @@
|
|||||||
From d84a971ba917569829b51fff6057e5fd0d85e402 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tom Stellard <tstellar@redhat.com>
|
|
||||||
Date: Thu, 18 Jan 2018 02:57:51 +0000
|
|
||||||
Subject: [PATCH] Driver: Prefer vendor supplied gcc toolchain
|
|
||||||
|
|
||||||
Summary:
|
|
||||||
This patch fixes an issue on Fedora where if you had the x86_64 cross
|
|
||||||
compiler installed on your x86_64 system, then clang would use that compiler
|
|
||||||
as the default toolchain. This was happening because the cross compiler
|
|
||||||
is installed to /usr/lib/gcc/x86_64-linux-gnu/ and this directory comes before
|
|
||||||
the default compiler directory (/usr/lib/gcc/x86_64-redhat-linux/) in the search
|
|
||||||
list.
|
|
||||||
|
|
||||||
This patch re-orders the search list so that vendor supplied gcc toolchains
|
|
||||||
are selected before toolchains with a generic target, which should prevent
|
|
||||||
these kind of issues on other OSes too.
|
|
||||||
|
|
||||||
Subscribers: srhines, cfe-commits
|
|
||||||
|
|
||||||
Differential Revision: https://reviews.llvm.org/D42608
|
|
||||||
---
|
|
||||||
lib/Driver/ToolChains/Gnu.cpp | 47 ++++++++++++++++++++++---------------------
|
|
||||||
1 file changed, 24 insertions(+), 23 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
|
|
||||||
--- a/lib/Driver/ToolChains/Gnu.cpp
|
|
||||||
+++ b/lib/Driver/ToolChains/Gnu.cpp
|
|
||||||
@@ -1870,8 +1870,8 @@
|
|
||||||
// lifetime or initialization issues.
|
|
||||||
static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
|
|
||||||
static const char *const AArch64Triples[] = {
|
|
||||||
- "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux",
|
|
||||||
- "aarch64-suse-linux", "aarch64-linux-android"};
|
|
||||||
+ "aarch64-redhat-linux", "aarch64-suse-linux", "aarch64-linux-android",
|
|
||||||
+ "aarch64-none-linux-gnu", "aarch64-linux-gnu"};
|
|
||||||
static const char *const AArch64beLibDirs[] = {"/lib"};
|
|
||||||
static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu",
|
|
||||||
"aarch64_be-linux-gnu"};
|
|
||||||
@@ -1879,31 +1879,34 @@
|
|
||||||
static const char *const ARMLibDirs[] = {"/lib"};
|
|
||||||
static const char *const ARMTriples[] = {"arm-linux-gnueabi",
|
|
||||||
"arm-linux-androideabi"};
|
|
||||||
- static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",
|
|
||||||
- "armv7hl-redhat-linux-gnueabi",
|
|
||||||
+ static const char *const ARMHFTriples[] = {"armv7hl-redhat-linux-gnueabi",
|
|
||||||
"armv6hl-suse-linux-gnueabi",
|
|
||||||
- "armv7hl-suse-linux-gnueabi"};
|
|
||||||
+ "armv7hl-suse-linux-gnueabi",
|
|
||||||
+ "arm-linux-gnueabihf"};
|
|
||||||
static const char *const ARMebLibDirs[] = {"/lib"};
|
|
||||||
static const char *const ARMebTriples[] = {"armeb-linux-gnueabi",
|
|
||||||
"armeb-linux-androideabi"};
|
|
||||||
static const char *const ARMebHFTriples[] = {
|
|
||||||
- "armeb-linux-gnueabihf", "armebv7hl-redhat-linux-gnueabi"};
|
|
||||||
+ "armebv7hl-redhat-linux-gnueabi", "armeb-linux-gnueabihf"};
|
|
||||||
|
|
||||||
static const char *const X86_64LibDirs[] = {"/lib64", "/lib"};
|
|
||||||
static const char *const X86_64Triples[] = {
|
|
||||||
- "x86_64-linux-gnu", "x86_64-unknown-linux-gnu",
|
|
||||||
- "x86_64-pc-linux-gnu", "x86_64-redhat-linux6E",
|
|
||||||
+ "x86_64-redhat-linux6E",
|
|
||||||
"x86_64-redhat-linux", "x86_64-suse-linux",
|
|
||||||
"x86_64-manbo-linux-gnu", "x86_64-linux-gnu",
|
|
||||||
"x86_64-slackware-linux", "x86_64-unknown-linux",
|
|
||||||
- "x86_64-amazon-linux", "x86_64-linux-android"};
|
|
||||||
+ "x86_64-amazon-linux", "x86_64-linux-android",
|
|
||||||
+ "x86_64-linux-gnu", "x86_64-unknown-linux-gnu",
|
|
||||||
+ "x86_64-pc-linux-gnu"
|
|
||||||
+ };
|
|
||||||
static const char *const X32LibDirs[] = {"/libx32"};
|
|
||||||
static const char *const X86LibDirs[] = {"/lib32", "/lib"};
|
|
||||||
static const char *const X86Triples[] = {
|
|
||||||
- "i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu",
|
|
||||||
- "i386-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux",
|
|
||||||
+ "i386-redhat-linux6E", "i686-redhat-linux",
|
|
||||||
"i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux",
|
|
||||||
- "i486-slackware-linux", "i686-montavista-linux", "i586-linux-gnu",
|
|
||||||
+ "i486-slackware-linux", "i686-montavista-linux",
|
|
||||||
+ "i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu",
|
|
||||||
+ "i386-linux-gnu", "i586-linux-gnu",
|
|
||||||
"i686-linux-android", "i386-gnu", "i486-gnu",
|
|
||||||
"i586-gnu", "i686-gnu"};
|
|
||||||
|
|
||||||
@@ -1940,16 +1943,16 @@
|
|
||||||
|
|
||||||
static const char *const PPCLibDirs[] = {"/lib32", "/lib"};
|
|
||||||
static const char *const PPCTriples[] = {
|
|
||||||
- "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe",
|
|
||||||
- "powerpc-suse-linux", "powerpc-montavista-linuxspe"};
|
|
||||||
+ "powerpc-suse-linux", "powerpc-montavista-linuxspe",
|
|
||||||
+ "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe"};
|
|
||||||
static const char *const PPC64LibDirs[] = {"/lib64", "/lib"};
|
|
||||||
static const char *const PPC64Triples[] = {
|
|
||||||
- "powerpc64-linux-gnu", "powerpc64-unknown-linux-gnu",
|
|
||||||
- "powerpc64-suse-linux", "ppc64-redhat-linux"};
|
|
||||||
+ "powerpc64-suse-linux", "ppc64-redhat-linux",
|
|
||||||
+ "powerpc64-linux-gnu", "powerpc64-unknown-linux-gnu"};
|
|
||||||
static const char *const PPC64LELibDirs[] = {"/lib64", "/lib"};
|
|
||||||
static const char *const PPC64LETriples[] = {
|
|
||||||
- "powerpc64le-linux-gnu", "powerpc64le-unknown-linux-gnu",
|
|
||||||
- "powerpc64le-suse-linux", "ppc64le-redhat-linux"};
|
|
||||||
+ "powerpc64le-suse-linux", "ppc64le-redhat-linux",
|
|
||||||
+ "powerpc64le-linux-gnu", "powerpc64le-unknown-linux-gnu"};
|
|
||||||
|
|
||||||
static const char *const RISCV32LibDirs[] = {"/lib", "/lib32"};
|
|
||||||
static const char *const RISCVTriples[] = {"riscv32-unknown-linux-gnu",
|
|
||||||
@@ -1965,8 +1968,8 @@
|
|
||||||
|
|
||||||
static const char *const SystemZLibDirs[] = {"/lib64", "/lib"};
|
|
||||||
static const char *const SystemZTriples[] = {
|
|
||||||
- "s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu",
|
|
||||||
- "s390x-suse-linux", "s390x-redhat-linux"};
|
|
||||||
+ "s390x-ibm-linux-gnu", "s390x-suse-linux", "s390x-redhat-linux",
|
|
||||||
+ "s390x-linux-gnu", "s390x-unknown-linux-gnu"};
|
|
||||||
|
|
||||||
|
|
||||||
using std::begin;
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
From 20ffd5bc4e45980dc804c5fa422e5182cbc975b7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Stellard <tstellar@redhat.com>
|
||||||
|
Date: Tue, 13 Aug 2019 13:38:40 -0700
|
||||||
|
Subject: [PATCH] Fix Driver/modules.cpp test to work when build directory name
|
||||||
|
contains '.s'
|
||||||
|
|
||||||
|
---
|
||||||
|
clang/test/Driver/modules.cpp | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/clang/test/Driver/modules.cpp b/clang/test/Driver/modules.cpp
|
||||||
|
index 7c549c1..9e06151 100644
|
||||||
|
--- a/clang/test/Driver/modules.cpp
|
||||||
|
+++ b/clang/test/Driver/modules.cpp
|
||||||
|
@@ -15,7 +15,8 @@
|
||||||
|
// 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 for extra space to avoid failures when the build directory contains '.s' in its path.
|
||||||
|
+// CHECK-COMPILE-SAME: -o {{.*}}.{{pcm.o|s}}{{ }}
|
||||||
|
// CHECK-COMPILE-SAME: -x pcm
|
||||||
|
// CHECK-COMPILE-SAME: {{.*}}.pcm
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
From 565b9633ee68b311c1a954022869d9e99fee7286 Mon Sep 17 00:00:00 2001
|
From bae24f2020f7dc9db372c7e3f38d77fc5fa320d0 Mon Sep 17 00:00:00 2001
|
||||||
From: serge-sans-paille <sguelton@redhat.com>
|
From: serge-sans-paille <sguelton@redhat.com>
|
||||||
Date: Fri, 1 Feb 2019 06:39:13 +0000
|
Date: Fri, 1 Feb 2019 06:39:13 +0000
|
||||||
Subject: [PATCH] Fix uninitialized value in ABIArgInfo
|
Subject: [PATCH] Fix uninitialized value in ABIArgInfo
|
||||||
@ -6,33 +6,32 @@ Subject: [PATCH] Fix uninitialized value in ABIArgInfo
|
|||||||
GCC-9 takes advantage of this uninitialized values to optimize stuff,
|
GCC-9 takes advantage of this uninitialized values to optimize stuff,
|
||||||
which ends up in failing validation when compiling clang.
|
which ends up in failing validation when compiling clang.
|
||||||
---
|
---
|
||||||
include/clang/CodeGen/CGFunctionInfo.h | 11 +++++------
|
clang/include/clang/CodeGen/CGFunctionInfo.h | 10 +++++-----
|
||||||
1 file changed, 5 insertions(+), 6 deletions(-)
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff --git a/include/clang/CodeGen/CGFunctionInfo.h b/include/clang/CodeGen/CGFunctionInfo.h
|
diff --git a/clang/include/clang/CodeGen/CGFunctionInfo.h b/clang/include/clang/CodeGen/CGFunctionInfo.h
|
||||||
index cf64e9f3ee..131eb38393 100644
|
index 1f81072..caf7105 100644
|
||||||
--- a/include/clang/CodeGen/CGFunctionInfo.h
|
--- a/clang/include/clang/CodeGen/CGFunctionInfo.h
|
||||||
+++ b/include/clang/CodeGen/CGFunctionInfo.h
|
+++ b/clang/include/clang/CodeGen/CGFunctionInfo.h
|
||||||
@@ -112,14 +112,13 @@ private:
|
@@ -110,13 +110,13 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
ABIArgInfo(Kind K)
|
ABIArgInfo(Kind K)
|
||||||
- : TheKind(K), PaddingInReg(false), InReg(false), SuppressSRet(false) {
|
- : TheKind(K), PaddingInReg(false), InReg(false) {
|
||||||
- }
|
- }
|
||||||
+ : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
|
+ : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
|
||||||
+ TheKind(K), PaddingInReg(false), InAllocaSRet(false), IndirectByVal(false),
|
+ TheKind(K), PaddingInReg(false), InAllocaSRet(false), IndirectByVal(false),
|
||||||
+ IndirectRealign(false), SRetAfterThis(false), InReg(false),
|
+ IndirectRealign(false), SRetAfterThis(false), InReg(false),
|
||||||
+ CanBeFlattened(false), SignExt(false), SuppressSRet(false) {}
|
+ CanBeFlattened(false), SignExt(false) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
- ABIArgInfo()
|
- ABIArgInfo()
|
||||||
- : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
|
- : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
|
||||||
- TheKind(Direct), PaddingInReg(false), InReg(false),
|
- TheKind(Direct), PaddingInReg(false), InReg(false) {}
|
||||||
- SuppressSRet(false) {}
|
|
||||||
+ ABIArgInfo() : ABIArgInfo(Direct) {}
|
+ ABIArgInfo() : ABIArgInfo(Direct) {}
|
||||||
|
|
||||||
static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0,
|
static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0,
|
||||||
llvm::Type *Padding = nullptr,
|
llvm::Type *Padding = nullptr,
|
||||||
--
|
--
|
||||||
2.19.2
|
1.8.3.1
|
||||||
|
|
||||||
|
175
SPECS/clang.spec
175
SPECS/clang.spec
@ -1,7 +1,10 @@
|
|||||||
%global maj_ver 8
|
%global compat_build 0
|
||||||
|
|
||||||
|
%global maj_ver 9
|
||||||
%global min_ver 0
|
%global min_ver 0
|
||||||
%global patch_ver 0
|
%global patch_ver 0
|
||||||
#%%global rc_ver 4
|
#%%global rc_ver 3
|
||||||
|
%global baserelease 5
|
||||||
|
|
||||||
#i686 disabled because llvm-test is not built for this target
|
#i686 disabled because llvm-test is not built for this target
|
||||||
# other targets disables because of failing tests
|
# other targets disables because of failing tests
|
||||||
@ -13,6 +16,7 @@
|
|||||||
%{_bindir}/clangd \
|
%{_bindir}/clangd \
|
||||||
%{_bindir}/clang-apply-replacements \
|
%{_bindir}/clang-apply-replacements \
|
||||||
%{_bindir}/clang-change-namespace \
|
%{_bindir}/clang-change-namespace \
|
||||||
|
%{_bindir}/clang-doc \
|
||||||
%{_bindir}/clang-include-fixer \
|
%{_bindir}/clang-include-fixer \
|
||||||
%{_bindir}/clang-query \
|
%{_bindir}/clang-query \
|
||||||
%{_bindir}/clang-refactor \
|
%{_bindir}/clang-refactor \
|
||||||
@ -32,11 +36,26 @@
|
|||||||
%{_bindir}/clang-format \
|
%{_bindir}/clang-format \
|
||||||
%{_bindir}/clang-import-test \
|
%{_bindir}/clang-import-test \
|
||||||
%{_bindir}/clang-offload-bundler \
|
%{_bindir}/clang-offload-bundler \
|
||||||
|
%{_bindir}/clang-scan-deps \
|
||||||
%{_bindir}/diagtool \
|
%{_bindir}/diagtool \
|
||||||
%{_bindir}/hmaptool
|
%{_bindir}/hmaptool
|
||||||
|
|
||||||
|
%if 0%{?compat_build}
|
||||||
|
%global pkg_name clang%{maj_ver}.%{min_ver}
|
||||||
|
# Install clang to same prefix as llvm, so that apps that use llvm-config
|
||||||
|
# will also be able to find clang libs.
|
||||||
|
%global install_prefix %{_libdir}/llvm%{maj_ver}.%{min_ver}
|
||||||
|
%global install_bindir %{install_prefix}/bin
|
||||||
|
%global install_includedir %{install_prefix}/include
|
||||||
|
%global install_libdir %{install_prefix}/lib
|
||||||
|
|
||||||
|
%global pkg_bindir %{install_bindir}
|
||||||
|
%global pkg_includedir %{_includedir}/llvm%{maj_ver}.%{min_ver}
|
||||||
|
%global pkg_libdir %{install_libdir}
|
||||||
|
%else
|
||||||
%global pkg_name clang
|
%global pkg_name clang
|
||||||
%global install_prefix /usr
|
%global install_prefix /usr
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
%bcond_without python3
|
%bcond_without python3
|
||||||
@ -45,6 +64,7 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global build_install_prefix %{buildroot}%{install_prefix}
|
%global build_install_prefix %{buildroot}%{install_prefix}
|
||||||
|
|
||||||
%ifarch ppc64le
|
%ifarch ppc64le
|
||||||
# Too many threads on 32 core ppc64 systems causes OOM errors.
|
# Too many threads on 32 core ppc64 systems causes OOM errors.
|
||||||
%global _smp_mflags -j8
|
%global _smp_mflags -j8
|
||||||
@ -55,7 +75,7 @@
|
|||||||
|
|
||||||
Name: %pkg_name
|
Name: %pkg_name
|
||||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||||
Release: 1%{?rc_ver:.rc%{rc_ver}}%{?dist}
|
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
|
||||||
Summary: A C language family front-end for LLVM
|
Summary: A C language family front-end for LLVM
|
||||||
|
|
||||||
License: NCSA
|
License: NCSA
|
||||||
@ -65,24 +85,29 @@ Source0: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}
|
|||||||
Source1: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz
|
Source1: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Patch3: 0001-Driver-Prefer-vendor-supplied-gcc-toolchain.patch
|
|
||||||
Patch4: 0002-gtest-reorg.patch
|
Patch4: 0002-gtest-reorg.patch
|
||||||
Patch9: 0001-Fix-uninitialized-value-in-ABIArgInfo.patch
|
Patch9: 0001-Fix-uninitialized-value-in-ABIArgInfo.patch
|
||||||
Patch11: 0001-ToolChain-Add-lgcc_s-to-the-linker-flags-when-using-.patch
|
Patch11: 0001-ToolChain-Add-lgcc_s-to-the-linker-flags-when-using-.patch
|
||||||
|
Patch12: 0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: ninja-build
|
BuildRequires: ninja-build
|
||||||
|
%if 0%{?compat_build}
|
||||||
|
BuildRequires: llvm%{maj_ver}.%{min_ver}-devel = %{version}
|
||||||
|
BuildRequires: llvm%{maj_ver}.%{min_ver}-static = %{version}
|
||||||
|
%else
|
||||||
BuildRequires: llvm-devel = %{version}
|
BuildRequires: llvm-devel = %{version}
|
||||||
# llvm-static is required, because clang-tablegen needs libLLVMTableGen, which
|
|
||||||
# is not included in libLLVM.so.
|
|
||||||
BuildRequires: llvm-static = %{version}
|
|
||||||
# Required for make check
|
|
||||||
%if 0%{?enable_test_pkg}
|
%if 0%{?enable_test_pkg}
|
||||||
BuildRequires: llvm-test = %{version}
|
BuildRequires: llvm-test = %{version}
|
||||||
BuildRequires: llvm-googletest = %{version}
|
BuildRequires: llvm-googletest = %{version}
|
||||||
%endif
|
%endif
|
||||||
|
# llvm-static is required, because clang-tablegen needs libLLVMTableGen, which
|
||||||
|
# is not included in libLLVM.so.
|
||||||
|
BuildRequires: llvm-static = %{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel
|
||||||
BuildRequires: perl-generators
|
BuildRequires: perl-generators
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
@ -138,13 +163,17 @@ Runtime library for clang.
|
|||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development header files for clang
|
Summary: Development header files for clang
|
||||||
|
%if !0%{?compat_build}
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
# The clang CMake files reference tools from clang-tools-extra.
|
# The clang CMake files reference tools from clang-tools-extra.
|
||||||
Requires: %{name}-tools-extra%{?_isa} = %{version}-%{release}
|
Requires: %{name}-tools-extra%{?_isa} = %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
Requires: %{name}-libs = %{version}-%{release}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Development header files for clang.
|
Development header files for clang.
|
||||||
|
|
||||||
|
%if !0%{?compat_build}
|
||||||
%package analyzer
|
%package analyzer
|
||||||
Summary: A source code analysis framework
|
Summary: A source code analysis framework
|
||||||
License: NCSA and MIT
|
License: NCSA and MIT
|
||||||
@ -186,55 +215,71 @@ Requires: python3
|
|||||||
%{summary}.
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -T -q -b 1 -n clang-tools-extra-%{version}%{?rc_ver:rc%{rc_ver}}.src
|
%if 0%{?compat_build}
|
||||||
|
%autosetup -n %{clang_srcdir} -p1
|
||||||
|
%else
|
||||||
|
%setup -T -q -b 1 -n %{clang_tools_srcdir}
|
||||||
|
|
||||||
|
|
||||||
pathfix.py -i %{__python3} -pn \
|
pathfix.py -i %{__python3} -pn \
|
||||||
clang-tidy/tool/*.py \
|
clang-tidy/tool/*.py \
|
||||||
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 cfe-%{version}%{?rc_ver:rc%{rc_ver}}.src
|
%setup -q -n %{clang_srcdir}
|
||||||
|
|
||||||
%patch3 -p1 -b .rhel
|
|
||||||
%patch4 -p1 -b .gtest
|
%patch4 -p1 -b .gtest
|
||||||
%patch9 -p1 -b .abi-arginfo
|
%patch9 -p2 -b .abi-arginfo
|
||||||
%patch11 -p1 -b .libcxx-fix
|
%patch11 -p1 -b .libcxx-fix
|
||||||
|
%patch12 -p2 -b .module-test-fix
|
||||||
|
|
||||||
mv ../%{clang_tools_srcdir} tools/extra
|
mv ../%{clang_tools_srcdir} tools/extra
|
||||||
|
|
||||||
|
pathfix.py -i %{__python3} -pn \
|
||||||
|
tools/clang-format/*.py \
|
||||||
|
tools/clang-format/git-clang-format \
|
||||||
|
utils/hmaptool/hmaptool \
|
||||||
|
tools/scan-view/bin/scan-view
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
%if 0%{?__isa_bits} == 64
|
%if 0%{?__isa_bits} == 64
|
||||||
sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@/64/g' test/lit.cfg.py
|
sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@/64/g' test/lit.cfg.py
|
||||||
%else
|
%else
|
||||||
sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py
|
sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
pathfix.py -i %{__python3} -pn \
|
|
||||||
tools/clang-format/*.py \
|
|
||||||
tools/clang-format/git-clang-format \
|
|
||||||
utils/hmaptool/hmaptool \
|
|
||||||
tools/scan-view/bin/scan-view
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
|
||||||
|
|
||||||
mkdir -p _build
|
mkdir -p _build
|
||||||
cd _build
|
cd _build
|
||||||
|
|
||||||
%ifarch s390 s390x %{arm} %ix86
|
%ifarch s390 s390x %{arm} %ix86 ppc64le
|
||||||
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
|
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
|
||||||
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# -DCMAKE_INSTALL_RPATH=";" is a workaround for llvm manually setting the
|
||||||
|
# rpath of libraries and binaries. llvm will skip the manual setting
|
||||||
|
# if CAMKE_INSTALL_RPATH is set to a value, but cmake interprets this value
|
||||||
|
# as nothing, so it sets the rpath to "" when installing.
|
||||||
%cmake .. -G Ninja \
|
%cmake .. -G Ninja \
|
||||||
-DLLVM_PARALLEL_LINK_JOBS=1 \
|
-DLLVM_PARALLEL_LINK_JOBS=1 \
|
||||||
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DPYTHON_EXECUTABLE=%{__python3} \
|
-DPYTHON_EXECUTABLE=%{__python3} \
|
||||||
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
-DCMAKE_INSTALL_RPATH:BOOL=";" \
|
||||||
-DCMAKE_INSTALL_RPATH:BOOL=OFF \
|
%ifarch s390 s390x %{arm} %ix86 ppc64le
|
||||||
|
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||||
|
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||||
|
%endif
|
||||||
|
%if 0%{?compat_build}
|
||||||
|
-DLLVM_CONFIG:FILEPATH=%{_bindir}/llvm-config-%{maj_ver}.%{min_ver}-%{__isa_bits} \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \
|
||||||
|
-DCLANG_INCLUDE_TESTS:BOOL=OFF \
|
||||||
|
%else
|
||||||
-DCLANG_INCLUDE_TESTS:BOOL=ON \
|
-DCLANG_INCLUDE_TESTS:BOOL=ON \
|
||||||
-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
|
-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
|
||||||
-DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \
|
-DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \
|
||||||
@ -242,9 +287,14 @@ cd _build
|
|||||||
-DLLVM_LIBDIR_SUFFIX=64 \
|
-DLLVM_LIBDIR_SUFFIX=64 \
|
||||||
%else
|
%else
|
||||||
-DLLVM_LIBDIR_SUFFIX= \
|
-DLLVM_LIBDIR_SUFFIX= \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
\
|
\
|
||||||
|
%if !0%{compat_build}
|
||||||
-DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen \
|
-DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen \
|
||||||
|
%else
|
||||||
|
-DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen-%{maj_ver}.%{min_ver} \
|
||||||
|
%endif
|
||||||
-DCLANG_ENABLE_ARCMT:BOOL=ON \
|
-DCLANG_ENABLE_ARCMT:BOOL=ON \
|
||||||
-DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
|
-DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
|
||||||
-DCLANG_INCLUDE_DOCS:BOOL=ON \
|
-DCLANG_INCLUDE_DOCS:BOOL=ON \
|
||||||
@ -254,16 +304,30 @@ cd _build
|
|||||||
-DLLVM_ENABLE_RTTI=ON \
|
-DLLVM_ENABLE_RTTI=ON \
|
||||||
-DLLVM_BUILD_DOCS=ON \
|
-DLLVM_BUILD_DOCS=ON \
|
||||||
-DLLVM_ENABLE_SPHINX=ON \
|
-DLLVM_ENABLE_SPHINX=ON \
|
||||||
|
-DCLANG_LINK_CLANG_DYLIB=OFF \
|
||||||
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
|
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
|
||||||
\
|
\
|
||||||
-DCLANG_BUILD_EXAMPLES:BOOL=OFF \
|
-DCLANG_BUILD_EXAMPLES:BOOL=OFF \
|
||||||
-DCLANG_REPOSITORY_STRING="%{?fedora:Fedora}%{?rhel:Red Hat} %{version}-%{release}"
|
-DCLANG_REPOSITORY_STRING="%{?fedora:Fedora}%{?rhel:Red Hat} %{version}-%{release}"
|
||||||
|
|
||||||
ninja -v -j2
|
%ninja_build -l 8
|
||||||
|
|
||||||
%install
|
%install
|
||||||
DESTDIR=%{buildroot} ninja install -C _build
|
%ninja_install -C _build
|
||||||
|
|
||||||
|
%if 0%{?compat_build}
|
||||||
|
|
||||||
|
# Remove binaries/other files
|
||||||
|
rm -Rf %{buildroot}%{install_bindir}
|
||||||
|
rm -Rf %{buildroot}%{install_prefix}/share
|
||||||
|
rm -Rf %{buildroot}%{install_prefix}/libexec
|
||||||
|
|
||||||
|
# Move include files
|
||||||
|
mkdir -p %{buildroot}%{pkg_includedir}
|
||||||
|
mv %{buildroot}/%{install_includedir}/clang %{buildroot}/%{pkg_includedir}/
|
||||||
|
mv %{buildroot}/%{install_includedir}/clang-c %{buildroot}/%{pkg_includedir}/
|
||||||
|
|
||||||
|
%else
|
||||||
|
|
||||||
# install clang python bindings
|
# install clang python bindings
|
||||||
mkdir -p %{buildroot}%{python3_sitelib}/clang/
|
mkdir -p %{buildroot}%{python3_sitelib}/clang/
|
||||||
@ -294,23 +358,33 @@ ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++.1.gz
|
|||||||
ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang-%{maj_ver}.1.gz
|
ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang-%{maj_ver}.1.gz
|
||||||
ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++-%{maj_ver}.1.gz
|
ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++-%{maj_ver}.1.gz
|
||||||
|
|
||||||
# Add clang++-{version} sylink
|
# Add clang++-{version} symlink
|
||||||
ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver}
|
ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver}
|
||||||
|
|
||||||
|
|
||||||
# Fix permission
|
# Fix permission
|
||||||
chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1*
|
chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1*
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if !0%{?compat_build}
|
||||||
# requires lit.py from LLVM utilities
|
# requires lit.py from LLVM utilities
|
||||||
|
# FIXME: Fix failing ARM tests, s390x i686 and ppc64le tests
|
||||||
|
# FIXME: Ignore test failures until rhbz#1715016 is fixed.
|
||||||
%if 0%{?enable_test_pkg}
|
%if 0%{?enable_test_pkg}
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -j2 -C _build
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \
|
||||||
|
%endif
|
||||||
|
%ifarch s390x i686 ppc64le %{arm}
|
||||||
|
:
|
||||||
|
%else
|
||||||
|
:
|
||||||
|
%endif
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%if !0%{?compat_build}
|
||||||
%files
|
%files
|
||||||
%{clang_binaries}
|
%{clang_binaries}
|
||||||
%{_bindir}/c-index-test
|
%{_bindir}/c-index-test
|
||||||
@ -322,18 +396,32 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -j2 -C _build
|
|||||||
%{_emacs_sitestartdir}/clang-format.el
|
%{_emacs_sitestartdir}/clang-format.el
|
||||||
%{_datadir}/clang/clang-format.py*
|
%{_datadir}/clang/clang-format.py*
|
||||||
%{_datadir}/clang/clang-format-diff.py*
|
%{_datadir}/clang/clang-format-diff.py*
|
||||||
|
%endif
|
||||||
|
|
||||||
%files libs
|
%files libs
|
||||||
|
%if !0%{?compat_build}
|
||||||
%{_libdir}/clang/
|
%{_libdir}/clang/
|
||||||
%{_libdir}/*.so.*
|
%{_libdir}/*.so.*
|
||||||
|
%else
|
||||||
|
%{pkg_libdir}/*.so.*
|
||||||
|
%{pkg_libdir}/clang/%{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
|
%if !0%{?compat_build}
|
||||||
%{_libdir}/*.so
|
%{_libdir}/*.so
|
||||||
%{_includedir}/clang/
|
%{_includedir}/clang/
|
||||||
%{_includedir}/clang-c/
|
%{_includedir}/clang-c/
|
||||||
%{_libdir}/cmake/*
|
%{_libdir}/cmake/*
|
||||||
%dir %{_datadir}/clang/
|
%dir %{_datadir}/clang/
|
||||||
|
%else
|
||||||
|
%{pkg_libdir}/*.so
|
||||||
|
%{pkg_includedir}/clang/
|
||||||
|
%{pkg_includedir}/clang-c/
|
||||||
|
%{pkg_libdir}/cmake/
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if !0%{?compat_build}
|
||||||
%files analyzer
|
%files analyzer
|
||||||
%{_bindir}/scan-view
|
%{_bindir}/scan-view
|
||||||
%{_bindir}/scan-build
|
%{_bindir}/scan-build
|
||||||
@ -361,8 +449,29 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -j2 -C _build
|
|||||||
%files -n python3-clang
|
%files -n python3-clang
|
||||||
%{python3_sitelib}/clang/
|
%{python3_sitelib}/clang/
|
||||||
|
|
||||||
|
%endif
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 15 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-5
|
||||||
|
- Fix typo from previous patch: move clang-libs dep to correct sub-package
|
||||||
|
|
||||||
|
* Thu Nov 14 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-4
|
||||||
|
- Add explicit requires for clang-libs to fix rpmdiff errors
|
||||||
|
|
||||||
|
* Wed Oct 02 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-3
|
||||||
|
- Limit build to 8 threads to avoid OOM on x86_64
|
||||||
|
|
||||||
|
* Wed Oct 02 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-2
|
||||||
|
- Disable CLANG_LINK_CLANG_DYLIB
|
||||||
|
|
||||||
|
* Fri Sep 27 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-1
|
||||||
|
- 9.0.0 Release
|
||||||
|
|
||||||
|
* Thu Aug 1 2019 sguelton@redhat.com - 8.0.1-1
|
||||||
|
- 8.0.1 Release
|
||||||
|
|
||||||
|
* Thu Jun 13 2019 sguelton@redhat.com - 8.0.1-0.1.rc2
|
||||||
|
- 8.0.1rc2 Release
|
||||||
|
|
||||||
* Thu Apr 11 2019 sguelton@redhat.com - 8.0.0-1
|
* Thu Apr 11 2019 sguelton@redhat.com - 8.0.0-1
|
||||||
- 8.0.0 Release
|
- 8.0.0 Release
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user