mirror of
https://abf.rosa.ru/djam/llvm13.git
synced 2025-02-23 16:32:45 +00:00
Updated to 9.0.0
This commit is contained in:
parent
dfa7710c87
commit
9f8de3e365
4 changed files with 109 additions and 111 deletions
10
.abf.yml
10
.abf.yml
|
@ -1,6 +1,6 @@
|
|||
sources:
|
||||
cfe-8.0.1.src.tar.xz: e1d7f274c4fd623f19255cc52c6d7b39cf8769ee
|
||||
clang-tools-extra-8.0.1.src.tar.xz: 0174e060781fc01e5f97f2ff9b51a03165d7b37a
|
||||
compiler-rt-8.0.1.src.tar.xz: f6520fb47fae9cc4362a9d50abee22019c27457a
|
||||
llvm-8.0.1.src.tar.xz: 09964f9eabc364f221a3caefbdaea28557273b4a
|
||||
polly-8.0.1.src.tar.xz: 70670752494e016ce0edd1f9fc2d8d2fca4654f7
|
||||
cfe-9.0.0.src.tar.xz: 6977cf7a802a053c57fa74138d3648b563e71e88
|
||||
clang-tools-extra-9.0.0.src.tar.xz: ac64403321d8486699d8bea5376b2438663dbb41
|
||||
compiler-rt-9.0.0.src.tar.xz: 4e00cb231ff87fd4f970f35b2da86185a612e0e2
|
||||
llvm-9.0.0.src.tar.xz: 7ef2527ba3da7603a41ce3592a8cd890f8d27ffa
|
||||
polly-9.0.0.src.tar.xz: 99e5d6c2f1f92bdf0311cec4c36fbecb1ff725da
|
||||
|
|
|
@ -3,7 +3,7 @@ diff -ur cfe-8.0.0rc5.src-patch/lib/Driver/ToolChains/Gnu.cpp cfe-8.0.0rc5.src/l
|
|||
+++ cfe-8.0.0rc5.src/lib/Driver/ToolChains/Gnu.cpp 2019-03-16 23:38:20.995634565 +0300
|
||||
@@ -1905,7 +1905,7 @@
|
||||
"i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux",
|
||||
"i486-slackware-linux", "i686-montavista-linux", "i586-linux-gnu",
|
||||
"i486-slackware-linux", "i586-rosa-linux-gnu", "i686-montavista-linux", "i586-linux-gnu",
|
||||
"i686-linux-android", "i386-gnu", "i486-gnu",
|
||||
- "i586-gnu", "i686-gnu"};
|
||||
+ "i586-gnu", "i686-gnu", "i586-unknown-linux-gnu"};
|
||||
|
|
169
clang-rosa.patch
169
clang-rosa.patch
|
@ -1,95 +1,86 @@
|
|||
diff -Naur cfe-3.9.0.src.orig/lib/Driver/ToolChains.cpp cfe-3.9.0.src/lib/Driver/ToolChains.cpp
|
||||
--- cfe-3.9.0.src.orig/lib/Driver/ToolChains.cpp 2016-08-18 20:56:48.000000000 +0300
|
||||
+++ cfe-3.9.0.src/lib/Driver/ToolChains.cpp 2016-09-11 16:47:44.240732535 +0300
|
||||
@@ -3744,6 +3744,7 @@
|
||||
UbuntuVivid,
|
||||
UbuntuWily,
|
||||
UbuntuXenial,
|
||||
+ ROSA,
|
||||
UnknownDistro
|
||||
};
|
||||
diff -up cfe-3.9.1.src/lib/Driver/ToolChains.cpp.TRIPLETS cfe-3.9.1.src/lib/Driver/ToolChains.cpp
|
||||
--- cfe-3.9.1.src/lib/Driver/ToolChains/Gnu.cpp.TRIPLETS 2016-11-23 22:25:50.000000000 +0100
|
||||
+++ cfe-3.9.1.src/lib/Driver/ToolChains/Gnu.cpp 2017-01-06 22:59:39.416911839 +0100
|
||||
@@ -1870,7 +1870,7 @@ void Generic_GCC::GCCInstallationDetecto
|
||||
// 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-none-linux-gnu", "aarch64-linux-gnu", "aarch64-rosa-linux-gnu", "aarch64-redhat-linux",
|
||||
"aarch64-suse-linux", "aarch64-linux-android"};
|
||||
static const char *const AArch64beLibDirs[] = {"/lib"};
|
||||
static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu",
|
||||
@@ -1881,6 +1881,7 @@ void Generic_GCC::GCCInstallationDetecto
|
||||
"arm-linux-androideabi"};
|
||||
static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",
|
||||
"armv7hl-redhat-linux-gnueabi",
|
||||
+ "armv7hl-rosa-linux-gnueabi",
|
||||
"armv6hl-suse-linux-gnueabi",
|
||||
"armv7hl-suse-linux-gnueabi"};
|
||||
static const char *const ARMebLibDirs[] = {"/lib"};
|
||||
@@ -1894,7 +1895,7 @@ void Generic_GCC::GCCInstallationDetecto
|
||||
"x86_64-linux-gnu", "x86_64-unknown-linux-gnu",
|
||||
"x86_64-pc-linux-gnu", "x86_64-redhat-linux6E",
|
||||
"x86_64-redhat-linux", "x86_64-suse-linux",
|
||||
- "x86_64-manbo-linux-gnu", "x86_64-linux-gnu",
|
||||
+ "x86_64-rosa-linux-gnu", "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"};
|
||||
static const char *const X32LibDirs[] = {"/libx32"};
|
||||
@@ -1903,7 +1904,7 @@ void Generic_GCC::GCCInstallationDetecto
|
||||
"i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu",
|
||||
"i386-linux-gnu", "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", "i586-rosa-linux-gnu", "i686-montavista-linux", "i586-linux-gnu",
|
||||
"i686-linux-android", "i386-gnu", "i486-gnu",
|
||||
"i586-gnu", "i686-gnu"};
|
||||
|
||||
@@ -3761,6 +3762,10 @@
|
||||
return Distro >= UbuntuHardy && Distro <= UbuntuXenial;
|
||||
}
|
||||
diff -up ./lib/Driver/ToolChains/Linux.cpp.tv ./lib/Driver/ToolChains/Linux.cpp
|
||||
--- ./lib/Driver/ToolChains/Linux.cpp.tv 2017-06-03 18:47:06.000000000 +0200
|
||||
+++ ./lib/Driver/ToolChains/Linux.cpp 2017-10-18 20:36:09.266005559 +0200
|
||||
@@ -283,7 +283,7 @@ Linux::Linux(const Driver &D, const llvm
|
||||
// Android loader does not support .gnu.hash until API 23.
|
||||
// Hexagon linker/loader does not support .gnu.hash
|
||||
if (!IsMips && !IsHexagon) {
|
||||
- if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() ||
|
||||
+ if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() || Distro.IsROSA() ||
|
||||
(Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick) ||
|
||||
(IsAndroid && !Triple.isAndroidVersionLT(23)))
|
||||
ExtraOpts.push_back("--hash-style=gnu");
|
||||
diff -up ./include/clang/Driver/Distro.h.tv ./include/clang/Driver/Distro.h
|
||||
--- ./include/clang/Driver/Distro.h.tv 2017-09-21 15:52:02.310905300 +0200
|
||||
+++ ./include/clang/Driver/Distro.h 2017-09-21 15:53:27.909422016 +0200
|
||||
@@ -39,6 +39,7 @@ public:
|
||||
RHEL6,
|
||||
RHEL7,
|
||||
Fedora,
|
||||
+ ROSA,
|
||||
Gentoo,
|
||||
OpenSUSE,
|
||||
UbuntuHardy,
|
||||
@@ -101,6 +102,10 @@ public:
|
||||
return DistroVal == Fedora || (DistroVal >= RHEL5 && DistroVal <= RHEL7);
|
||||
}
|
||||
|
||||
+static bool IsROSA(enum Distro Distro) {
|
||||
+ return Distro == ROSA;
|
||||
+}
|
||||
+ bool IsROSA() {
|
||||
+ return DistroVal == ROSA;
|
||||
+ }
|
||||
+
|
||||
static Distro DetectDistro(const Driver &D, llvm::Triple::ArchType Arch) {
|
||||
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
|
||||
llvm::MemoryBuffer::getFile("/etc/lsb-release");
|
||||
@@ -3769,7 +3774,10 @@
|
||||
SmallVector<StringRef, 16> Lines;
|
||||
Data.split(Lines, "\n");
|
||||
Distro Version = UnknownDistro;
|
||||
- for (StringRef Line : Lines)
|
||||
+ for (StringRef Line : Lines) {
|
||||
+ if (Version == UnknownDistro && Line.startswith("DISTRIB_ID=Rosa")) {
|
||||
+ Version = ROSA;
|
||||
+ }
|
||||
if (Version == UnknownDistro && Line.startswith("DISTRIB_CODENAME="))
|
||||
Version = llvm::StringSwitch<Distro>(Line.substr(17))
|
||||
.Case("hardy", UbuntuHardy)
|
||||
@@ -3790,6 +3798,7 @@
|
||||
.Case("wily", UbuntuWily)
|
||||
.Case("xenial", UbuntuXenial)
|
||||
.Default(UnknownDistro);
|
||||
+ }
|
||||
if (Version != UnknownDistro)
|
||||
bool IsOpenSUSE() const {
|
||||
return DistroVal == OpenSUSE;
|
||||
}
|
||||
diff -up ./lib/Driver/Distro.cpp.tv ./lib/Driver/Distro.cpp
|
||||
--- ./lib/Driver/Distro.cpp.tv 2017-09-21 15:53:58.541964793 +0200
|
||||
+++ ./lib/Driver/Distro.cpp 2017-09-21 16:10:59.342121213 +0200
|
||||
@@ -52,6 +52,10 @@ static Distro::DistroType DetectDistro(v
|
||||
return Version;
|
||||
}
|
||||
@@ -3950,7 +3959,7 @@
|
||||
return TargetTriple.str();
|
||||
}
|
||||
|
||||
-static StringRef getOSLibDir(const llvm::Triple &Triple, const ArgList &Args) {
|
||||
+static StringRef getOSLibDir(const enum Distro &Distro, const llvm::Triple &Triple, const ArgList &Args) {
|
||||
if (isMipsArch(Triple.getArch())) {
|
||||
// lib32 directory has a special meaning on MIPS targets.
|
||||
// It contains N32 ABI binaries. Use this folder if produce
|
||||
@@ -3966,11 +3975,14 @@
|
||||
// with a 'lib32' library search path being considered. So we only enable
|
||||
// them when we know we may need it.
|
||||
//
|
||||
+ // ROSA does not use lib32: 64-bit libs go to lib64, 32- bit libs go to lib).
|
||||
+ //
|
||||
// FIXME: This is a bit of a hack. We should really unify this code for
|
||||
// reasoning about oslibdir spellings with the lib dir spellings in the
|
||||
// GCCInstallationDetector, but that is a more significant refactoring.
|
||||
- if (Triple.getArch() == llvm::Triple::x86 ||
|
||||
- Triple.getArch() == llvm::Triple::ppc)
|
||||
+ if (!IsROSA(Distro) &&
|
||||
+ (Triple.getArch() == llvm::Triple::x86 ||
|
||||
+ Triple.getArch() == llvm::Triple::ppc))
|
||||
return "lib32";
|
||||
|
||||
if (Triple.getArch() == llvm::Triple::x86_64 &&
|
||||
@@ -4012,7 +4024,7 @@
|
||||
|
||||
Distro Distro = DetectDistro(D, Arch);
|
||||
|
||||
- if (IsOpenSUSE(Distro) || IsUbuntu(Distro)) {
|
||||
+ if (IsOpenSUSE(Distro) || IsUbuntu(Distro) || IsROSA(Distro)) {
|
||||
ExtraOpts.push_back("-z");
|
||||
ExtraOpts.push_back("relro");
|
||||
}
|
||||
@@ -4032,7 +4044,7 @@
|
||||
// ABI requires a mapping between the GOT and the symbol table.
|
||||
// Android loader does not support .gnu.hash.
|
||||
if (!IsMips && !IsAndroid) {
|
||||
- if (IsRedhat(Distro) || IsOpenSUSE(Distro) ||
|
||||
+ if (IsRedhat(Distro) || IsOpenSUSE(Distro) || IsROSA(Distro) ||
|
||||
(IsUbuntu(Distro) && Distro >= UbuntuMaverick))
|
||||
ExtraOpts.push_back("--hash-style=gnu");
|
||||
|
||||
@@ -4058,7 +4070,7 @@
|
||||
// to the link paths.
|
||||
path_list &Paths = getFilePaths();
|
||||
|
||||
- const std::string OSLibDir = getOSLibDir(Triple, Args);
|
||||
+ const std::string OSLibDir = getOSLibDir(Distro, Triple, Args);
|
||||
const std::string MultiarchTriple = getMultiarchTriple(D, Triple, SysRoot);
|
||||
|
||||
// Add the multilib suffixed paths where they are available.
|
||||
+ File = VFS.getBufferForFile("/etc/rosa-release");
|
||||
+ if (File)
|
||||
+ return Distro::ROSA;
|
||||
+
|
||||
File = VFS.getBufferForFile("/etc/redhat-release");
|
||||
if (File) {
|
||||
StringRef Data = File.get()->getBuffer();
|
||||
|
|
39
llvm.spec
39
llvm.spec
|
@ -1,5 +1,5 @@
|
|||
#%%define _disable_ld_no_undefined 0
|
||||
#%%define debugcflags %{nil}
|
||||
#%%define debugcflags %%{nil}
|
||||
|
||||
# clang header paths are hard-coded at compile time
|
||||
# and need adjustment whenever there's a new GCC version
|
||||
|
@ -10,9 +10,9 @@
|
|||
|
||||
%bcond_without clang
|
||||
|
||||
%define maj_ver 8
|
||||
%define maj_ver 9
|
||||
%define major_ver %{maj_ver}.0
|
||||
%define minor_ver 1
|
||||
%define minor_ver 0
|
||||
|
||||
%define major %{major_ver}
|
||||
%define lto_major %{maj_ver}
|
||||
|
@ -24,26 +24,36 @@
|
|||
%define libclang %mklibname clang %{clang_major}
|
||||
%define devclang %mklibname clang -d
|
||||
|
||||
%bcond_with git
|
||||
|
||||
Summary: Low Level Virtual Machine (LLVM)
|
||||
Name: llvm
|
||||
Version: %{major_ver}.%{minor_ver}
|
||||
Release: 1
|
||||
License: NCSA
|
||||
Group: Development/Other
|
||||
Url: http://llvm.org/
|
||||
Url: http://llvm.org
|
||||
|
||||
%if %{with git}
|
||||
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/llvm-%{version}.src.tar.xz
|
||||
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/cfe-%{version}.src.tar.xz
|
||||
Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-tools-extra-%{version}.src.tar.xz
|
||||
Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/polly-%{version}.src.tar.xz
|
||||
Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/compiler-rt-%{version}.src.tar.xz
|
||||
%else
|
||||
Source0: http://releases.llvm.org/%{version}/llvm-%{version}.src.tar.xz
|
||||
Source1: http://releases.llvm.org/%{version}/cfe-%{version}.src.tar.xz
|
||||
Source2: http://releases.llvm.org/%{version}/clang-tools-extra-%{version}.src.tar.xz
|
||||
Source3: http://releases.llvm.org/%{version}/polly-%{version}.src.tar.xz
|
||||
Source4: http://releases.llvm.org/%{version}/compiler-rt-%{version}.src.tar.xz
|
||||
%endif
|
||||
Source1000: llvm.rpmlintrc
|
||||
Source1010: clang-gcc-wrapper.macros
|
||||
Source1011: clang-gcc-wrapper.sh
|
||||
|
||||
# Adjust the search paths to match the OS, adjust the default compiler flags
|
||||
# as well.
|
||||
#Patch1: clang-rosa.patch
|
||||
Patch1: clang-rosa.patch
|
||||
#
|
||||
Patch2: cfe-7.0.0-i586-unknown-linux-gnu.patch
|
||||
|
||||
|
@ -108,8 +118,11 @@ LLVM plugins.
|
|||
|
||||
%files -n %{plugins}
|
||||
%{_libdir}/BugpointPasses.so
|
||||
%{_libdir}/CheckerDependencyHandlingAnalyzerPlugin.so
|
||||
%{_libdir}/CheckerOptionHandlingAnalyzerPlugin.so
|
||||
%{_libdir}/LLVMHello.so
|
||||
%{_libdir}/LLVMgold.so
|
||||
%{_libdir}/SampleAnalyzerPlugin.so
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
@ -171,7 +184,7 @@ This package contains the development files for LLVM.
|
|||
%{_libdir}/libLLVM*.a
|
||||
%{_libdir}/libLLVM.so
|
||||
%{_libdir}/libLTO.so
|
||||
%{_libdir}/libOptRemarks.so*
|
||||
%{_libdir}/libRemarks.so*
|
||||
%{_libdir}/libPolly*.a
|
||||
%{_libdir}/libfindAllSymbols.a
|
||||
|
||||
|
@ -258,7 +271,6 @@ as libraries and designed to be loosely-coupled and extensible.
|
|||
%{_datadir}/clang/clang-tidy-diff.py
|
||||
%{_datadir}/clang/run-clang-tidy.py
|
||||
%{_datadir}/clang/run-find-all-symbols.py
|
||||
%{_libdir}/clang/
|
||||
%{_sys_macros_dir}/clang-gcc-wrapper.macros
|
||||
%endif
|
||||
|
||||
|
@ -274,9 +286,8 @@ Shared libraries for the clang compiler. This is needed by
|
|||
programs that are dynamically linked against libclang.
|
||||
|
||||
%files -n %{libclang}
|
||||
%{_libdir}/libclang.so.%{maj_ver}
|
||||
%{_libdir}/libclang-%{clang_major}.so
|
||||
%{_libdir}/libclang-%{clang_major}.%{minor_ver}.so
|
||||
%{_libdir}/clang/
|
||||
%{_libdir}/libclang*.so.%{maj_ver}
|
||||
%endif
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
@ -302,7 +313,7 @@ libclang.
|
|||
%{_libdir}/cmake/clang/ClangTargets-relwithdebinfo.cmake
|
||||
%{_libdir}/cmake/clang/ClangTargets.cmake
|
||||
%{_libdir}/libclang*.a
|
||||
%{_libdir}/libclang.so
|
||||
%{_libdir}/libclang*.so
|
||||
%endif
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
@ -344,7 +355,7 @@ mv polly-%{version}.src tools/polly
|
|||
mv clang-tools-extra-%{version}.src tools/clang/tools/extra
|
||||
mv compiler-rt-%{version}.src projects/compiler-rt
|
||||
cd tools/clang
|
||||
#patch1 -p1 -b .rosa~
|
||||
%patch1 -p1 -b .rosa~
|
||||
%patch2 -p1 -b .gnu~
|
||||
cd -
|
||||
%endif
|
||||
|
@ -431,10 +442,6 @@ chmod 0755 %{buildroot}%{_bindir}/pollycc %{buildroot}%{_bindir}/pollyc++
|
|||
# Remove editor integration files
|
||||
rm -f %{buildroot}%{_datadir}/clang/clang-format*
|
||||
|
||||
# Symlinks for libclang to maintain compatibility with the older releases.
|
||||
ln -s %{_libdir}/libclang.so.%{maj_ver} %{buildroot}%{_libdir}/libclang-%{clang_major}.so
|
||||
ln -s %{_libdir}/libclang.so.%{maj_ver} %{buildroot}%{_libdir}/libclang-%{clang_major}.%{minor_ver}.so
|
||||
|
||||
# install clang-gcc-wrapper
|
||||
install -D -m 0644 %{SOURCE1011} %{buildroot}%{_datadir}/clang/
|
||||
mkdir -p %{buildroot}%{_sys_macros_dir}
|
||||
|
|
Loading…
Add table
Reference in a new issue