!44 update to 12.0.1
From: @peilin-guo Reviewed-by: @eastb233 Signed-off-by: @eastb233
This commit is contained in:
commit
7707b0a65b
@ -1,42 +0,0 @@
|
||||
From 428ca4520a79ec5a6df9c6adc8b8069623868cdb Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Fri, 26 Jan 2018 11:38:04 -0800
|
||||
Subject: [PATCH] GCC compatibility: Ignore -fstack-clash-protection
|
||||
|
||||
Reviewers: sylvestre.ledru
|
||||
|
||||
Subscribers: cfe-commits
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D42593
|
||||
---
|
||||
include/clang/Driver/Options.td | 1 +
|
||||
test/Driver/clang_f_opts.c | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td
|
||||
index 41f31cf..e9078a2 100644
|
||||
--- a/include/clang/Driver/Options.td
|
||||
+++ b/include/clang/Driver/Options.td
|
||||
@@ -2705,6 +2705,7 @@ defm single_precision_constant : BooleanFFlag<"single-precision-constant">,
|
||||
Group<clang_ignored_gcc_optimization_f_Group>;
|
||||
defm spec_constr_count : BooleanFFlag<"spec-constr-count">, Group<clang_ignored_f_Group>;
|
||||
defm stack_check : BooleanFFlag<"stack-check">, Group<clang_ignored_f_Group>;
|
||||
+defm stack_clash_protection : BooleanFFlag<"stack-clash-protection">, Group<clang_ignored_f_Group>;
|
||||
defm strength_reduce :
|
||||
BooleanFFlag<"strength-reduce">, Group<clang_ignored_gcc_optimization_f_Group>;
|
||||
defm tls_model : BooleanFFlag<"tls-model">, Group<clang_ignored_f_Group>;
|
||||
diff --git a/test/Driver/clang_f_opts.c b/test/Driver/clang_f_opts.c
|
||||
index 5755c5d..8710ff4 100644
|
||||
--- a/test/Driver/clang_f_opts.c
|
||||
+++ b/test/Driver/clang_f_opts.c
|
||||
@@ -284,6 +284,7 @@
|
||||
// RUN: -ffriend-injection \
|
||||
// RUN: -fno-implement-inlines -fimplement-inlines \
|
||||
// RUN: -fstack-check \
|
||||
+// RUN: -fstack-clash-protection \
|
||||
// RUN: -fforce-addr \
|
||||
// RUN: -malign-functions=100 \
|
||||
// RUN: -malign-loops=100 \
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
From 3b2afecc227d652f84f883d4018d43971de6a311 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Wed, 21 Mar 2018 07:17:00 -0700
|
||||
Subject: [PATCH] gtest reorg
|
||||
|
||||
---
|
||||
CMakeLists.txt | 12 +++++-------
|
||||
1 file changed, 5 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2eee8e6..01d290f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -142,12 +142,6 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
|
||||
set(LLVM_UTILS_PROVIDED ON)
|
||||
set(CLANG_TEST_DEPS FileCheck count not)
|
||||
endif()
|
||||
- set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
|
||||
- if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
|
||||
- AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
- AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
|
||||
- add_subdirectory(${UNITTEST_DIR} utils/unittest)
|
||||
- endif()
|
||||
else()
|
||||
# Seek installed Lit.
|
||||
find_program(LLVM_LIT
|
||||
@@ -477,7 +471,11 @@ endif()
|
||||
|
||||
|
||||
if( CLANG_INCLUDE_TESTS )
|
||||
- if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
|
||||
+ set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
|
||||
+ if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
|
||||
+ AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
+ AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
|
||||
+ add_subdirectory(${UNITTEST_DIR} utils/unittest)
|
||||
add_subdirectory(unittests)
|
||||
list(APPEND CLANG_TEST_DEPS ClangUnitTests)
|
||||
list(APPEND CLANG_TEST_PARAMS
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
From 06cde370a44393d65bae7f61279900b5838b4a2c Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Tue, 23 Jan 2018 18:59:20 -0800
|
||||
Subject: [PATCH] lit.cfg: Add hack so lit can find not and FileCheck
|
||||
|
||||
---
|
||||
test/lit.cfg.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/test/lit.cfg.py b/test/lit.cfg.py
|
||||
index 5323cfe..5b4184e 100644
|
||||
--- a/test/lit.cfg.py
|
||||
+++ b/test/lit.cfg.py
|
||||
@@ -39,7 +39,10 @@ config.test_source_root = os.path.dirname(__file__)
|
||||
# test_exec_root: The root path where tests should be run.
|
||||
config.test_exec_root = os.path.join(config.clang_obj_root, 'test')
|
||||
|
||||
+old_llvm_tools_dir = llvm_config.config.llvm_tools_dir
|
||||
+llvm_config.config.llvm_tools_dir = '/usr/lib64/llvm'
|
||||
llvm_config.use_default_substitutions()
|
||||
+llvm_config.config.llvm_tools_dir = old_llvm_tools_dir
|
||||
|
||||
llvm_config.use_clang()
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
clang-tools-extra-12.0.1.src.tar.xz
Normal file
BIN
clang-tools-extra-12.0.1.src.tar.xz
Normal file
Binary file not shown.
65
clang.spec
65
clang.spec
@ -1,12 +1,12 @@
|
||||
%global maj_ver 10
|
||||
%global maj_ver 12
|
||||
%global min_ver 0
|
||||
%global patch_ver 1
|
||||
%global clang_srcdir clang-%{version}.src
|
||||
%global clang_tools_srcdir clang-tools-extra-%{version}.src
|
||||
|
||||
Name: clang
|
||||
Version: 10.0.1
|
||||
Release: 6
|
||||
Version: 12.0.1
|
||||
Release: 1
|
||||
License: GPL-2.0-only and Apache-2.0 and MIT
|
||||
Summary: An "LLVM native" C/C++/Objective-C compiler
|
||||
URL: http://llvm.org
|
||||
@ -14,24 +14,24 @@ Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{versio
|
||||
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_tools_srcdir}.tar.xz
|
||||
Source2: clang-config.h
|
||||
|
||||
Patch0000: 0001-lit.cfg-Add-hack-so-lit-can-find-not-and-FileCheck.patch
|
||||
Patch0001: 0001-GCC-compatibility-Ignore-fstack-clash-protection.patch
|
||||
Patch0002: 0001-gtest-reorg.patch
|
||||
|
||||
BuildRequires: cmake gcc-c++ python-sphinx
|
||||
BuildRequires: cmake gcc-c++ python-sphinx git
|
||||
BuildRequires: llvm-devel = %{version}
|
||||
BuildRequires: compiler-rt = %{version}
|
||||
BuildRequires: llvm-static = %{version}
|
||||
BuildRequires: llvm-googletest = %{version}
|
||||
BuildRequires: libxml2-devel perl-generators ncurses-devel emacs libatomic
|
||||
BuildRequires: python3-lit python3-sphinx python3-devel chrpath
|
||||
BuildRequires: python3-lit python3-sphinx python3-devel
|
||||
|
||||
|
||||
Requires: libstdc++-devel gcc-c++ emacs-filesystem
|
||||
Requires: %{name}-resource-filesystem = %{version}
|
||||
Provides: clang(major) = %{maj_ver}
|
||||
Provides: %{name}-libs = %{version}-%{release}
|
||||
Obsoletes: %{name}-libs < %{version}-%{release}
|
||||
Recommends: libomp = %{version}
|
||||
Recommends: compiler-rt = %{version}
|
||||
|
||||
Conflicts: compiler-rt < %{version}
|
||||
Conflicts: compiler-rt > %{version}
|
||||
|
||||
%description
|
||||
The Clang project provides a language front-end and tooling infrastructure for\
|
||||
@ -47,6 +47,13 @@ Requires: %{name}-tools-extra = %{version}-%{release}
|
||||
%description devel
|
||||
Development header files for clang.
|
||||
|
||||
%package resource-filesystem
|
||||
Summary: Filesystem package that owns the clang resource directory
|
||||
Provides: %{name}-resource-filesystem(major) = %{maj_ver}
|
||||
|
||||
%description resource-filesystem
|
||||
This package owns the clang resouce directory: $libdir/clang/$version/
|
||||
|
||||
%package help
|
||||
Summary: Help manual for %{name}
|
||||
|
||||
@ -87,7 +94,7 @@ clang-format integration for git.
|
||||
pathfix.py -i %{__python3} -pn \
|
||||
clang-tidy/tool/*.py
|
||||
|
||||
%autosetup -n %{clang_srcdir} -p1
|
||||
%autosetup -n %{clang_srcdir} -p1 -Sgit
|
||||
pathfix.py -i %{__python3} -pn \
|
||||
tools/clang-format/*.py \
|
||||
tools/clang-format/git-clang-format \
|
||||
@ -107,6 +114,7 @@ cd _build
|
||||
%cmake .. \
|
||||
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_RPATH:BOOL=";" \
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||
-DLLVM_CONFIG:FILEPATH=/usr/bin/llvm-config-%{__isa_bits} \
|
||||
@ -154,19 +162,15 @@ rm -Rvf %{buildroot}%{_pkgdocdir}
|
||||
|
||||
rm -vf %{buildroot}%{_datadir}/clang/bash-autocomplete.sh
|
||||
|
||||
# Create sub-directories in the clang resource directory that will be
|
||||
# populated by other packages
|
||||
mkdir -p %{buildroot}%{_libdir}/clang/%{version}/{include,lib,share}/
|
||||
|
||||
# Remove clang-tidy headers.
|
||||
rm -Rvf %{buildroot}%{_includedir}/clang-tidy/
|
||||
|
||||
ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver}
|
||||
|
||||
|
||||
cd $RPM_BUILD_ROOT/usr
|
||||
file `find -type f`| grep -w ELF | awk -F":" '{print $1}' | for i in `xargs`
|
||||
do
|
||||
chrpath -d $i
|
||||
done
|
||||
cd -
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
||||
echo "%{_bindir}/%{name}-%{maj_ver}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
echo "%{_libdir}/%{name}-%{maj_ver}" >> $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
|
||||
%check
|
||||
# Checking is disabled because we don't pack libLLVMTestingSupport.a, which makes
|
||||
# standalone build of clang impossible.
|
||||
@ -200,7 +204,6 @@ echo "%{_libdir}/%{name}-%{maj_ver}" >> $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}
|
||||
%{_bindir}/clang-offload-wrapper
|
||||
%{_bindir}/clang-scan-deps
|
||||
%{_bindir}/pp-trace
|
||||
%{_bindir}/clang-import-test
|
||||
%{_bindir}/clang-offload-bundler
|
||||
%{_bindir}/diagtool
|
||||
%{_bindir}/hmaptool
|
||||
@ -210,7 +213,6 @@ echo "%{_libdir}/%{name}-%{maj_ver}" >> $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}
|
||||
%{_datadir}/clang/clang-format-diff.py*
|
||||
%{_libdir}/clang/
|
||||
%{_libdir}/*.so.*
|
||||
%config(noreplace) /etc/ld.so.conf.d/*
|
||||
|
||||
%files devel
|
||||
%{_libdir}/*.so
|
||||
@ -219,6 +221,12 @@ echo "%{_libdir}/%{name}-%{maj_ver}" >> $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}
|
||||
%{_libdir}/cmake/*
|
||||
%dir %{_datadir}/clang/
|
||||
|
||||
%files resource-filesystem
|
||||
%dir %{_libdir}/clang/%{version}/
|
||||
%dir %{_libdir}/clang/%{version}/include/
|
||||
%dir %{_libdir}/clang/%{version}/lib/
|
||||
%dir %{_libdir}/clang/%{version}/share/
|
||||
|
||||
%files help
|
||||
%{_mandir}/man1/clang.1.gz
|
||||
%{_mandir}/man1/diagtool.1.gz
|
||||
@ -258,11 +266,12 @@ echo "%{_libdir}/%{name}-%{maj_ver}" >> $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}
|
||||
%{_bindir}/git-clang-format
|
||||
|
||||
%changelog
|
||||
* Thu Sep 16 2021 chenchen <chen_aka_jan@163.com> - 10.0.1-6
|
||||
- del rpath from some binaries and bin
|
||||
* Wed Dec 29 2021 panxiaohe <panxiaohe@huawei.com> - 12.0.1-1
|
||||
- update to 12.0.1
|
||||
- add clang-resource-filesystem sub-package
|
||||
|
||||
* Mon Aug 02 2021 chenyanpanHW <chenyanpan@huawei.com> - 10.0.1-5
|
||||
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git
|
||||
* Tue Sep 07 2021 chenchen <chen_aka_jan@163.com> - 10.0.1-5
|
||||
- del rpath from some binaries and bin
|
||||
|
||||
* Fri Apr 30 2021 licihua <licihua@huawei.com> - 10.0.1-4
|
||||
- Reduce build time.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user