mirror of
https://src.fedoraproject.org/rpms/llvm.git
synced 2024-11-24 09:32:42 +00:00
Remove fedora 38 related workarounds
This chroot is no longer supported on copr.
This commit is contained in:
parent
1115746e65
commit
99dd05a90b
7 changed files with 1 additions and 117 deletions
|
@ -1,92 +0,0 @@
|
|||
From 5c209e4632cb6acdda3be01ae7d83c31ba956979 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Thu, 9 Mar 2023 21:52:41 -0800
|
||||
Subject: [PATCH] Restore -fopenmp-implicit-rpath, disabled by default
|
||||
|
||||
Used by redhat-rpm-config on older Fedora versions.
|
||||
---
|
||||
clang/include/clang/Driver/Options.td | 6 ++++++
|
||||
clang/lib/Driver/ToolChains/CommonArgs.cpp | 19 +++++++++++++++++++
|
||||
clang/lib/Driver/ToolChains/CommonArgs.h | 3 +++
|
||||
clang/test/OpenMP/Inputs/libomp.a | 1 +
|
||||
4 files changed, 29 insertions(+)
|
||||
create mode 100644 clang/test/OpenMP/Inputs/libomp.a
|
||||
|
||||
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
|
||||
index f745e573eb26..6289c1af9ada 100644
|
||||
--- a/clang/include/clang/Driver/Options.td
|
||||
+++ b/clang/include/clang/Driver/Options.td
|
||||
@@ -5484,6 +5484,12 @@ def offload_add_rpath: Flag<["--"], "offload-add-rpath">,
|
||||
def no_offload_add_rpath: Flag<["--"], "no-offload-add-rpath">,
|
||||
Flags<[NoArgumentUnused]>,
|
||||
Alias<frtlib_add_rpath>;
|
||||
+defm openmp_implicit_rpath: BoolFOption<"openmp-implicit-rpath",
|
||||
+ LangOpts<"OpenMP">,
|
||||
+ DefaultFalse,
|
||||
+ PosFlag<SetTrue, [], [ClangOption], "Set rpath on OpenMP executables">,
|
||||
+ NegFlag<SetFalse>,
|
||||
+ BothFlags<[NoArgumentUnused]>>;
|
||||
def r : Flag<["-"], "r">, Flags<[LinkerInput, NoArgumentUnused]>,
|
||||
Group<Link_Group>;
|
||||
def regcall4 : Flag<["-"], "regcall4">, Group<m_Group>,
|
||||
diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
|
||||
index 62a53b85ce09..c51766250983 100644
|
||||
--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
|
||||
@@ -1109,6 +1109,23 @@ static void addOpenMPDeviceLibC(const Compilation &C, const ArgList &Args,
|
||||
}
|
||||
}
|
||||
|
||||
+
|
||||
+void tools::addOpenMPRuntimeSpecificRPath(const ToolChain &TC,
|
||||
+ const ArgList &Args,
|
||||
+ ArgStringList &CmdArgs) {
|
||||
+
|
||||
+ if (Args.hasFlag(options::OPT_fopenmp_implicit_rpath,
|
||||
+ options::OPT_fno_openmp_implicit_rpath, false)) {
|
||||
+ // Default to clang lib / lib64 folder, i.e. the same location as device
|
||||
+ // runtime
|
||||
+ SmallString<256> DefaultLibPath =
|
||||
+ llvm::sys::path::parent_path(TC.getDriver().Dir);
|
||||
+ llvm::sys::path::append(DefaultLibPath, CLANG_INSTALL_LIBDIR_BASENAME);
|
||||
+ CmdArgs.push_back("-rpath");
|
||||
+ CmdArgs.push_back(Args.MakeArgString(DefaultLibPath));
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void tools::addOpenMPRuntimeLibraryPath(const ToolChain &TC,
|
||||
const ArgList &Args,
|
||||
ArgStringList &CmdArgs) {
|
||||
@@ -1185,6 +1202,8 @@ bool tools::addOpenMPRuntime(const Compilation &C, ArgStringList &CmdArgs,
|
||||
addOpenMPDeviceLibC(C, Args, CmdArgs);
|
||||
|
||||
addArchSpecificRPath(TC, Args, CmdArgs);
|
||||
+ if (RTKind == Driver::OMPRT_OMP)
|
||||
+ addOpenMPRuntimeSpecificRPath(TC, Args, CmdArgs);
|
||||
addOpenMPRuntimeLibraryPath(TC, Args, CmdArgs);
|
||||
|
||||
return true;
|
||||
diff --git a/clang/lib/Driver/ToolChains/CommonArgs.h b/clang/lib/Driver/ToolChains/CommonArgs.h
|
||||
index 5581905db311..3360eb0c6a37 100644
|
||||
--- a/clang/lib/Driver/ToolChains/CommonArgs.h
|
||||
+++ b/clang/lib/Driver/ToolChains/CommonArgs.h
|
||||
@@ -105,6 +105,9 @@ void AddAssemblerKPIC(const ToolChain &ToolChain,
|
||||
const llvm::opt::ArgList &Args,
|
||||
llvm::opt::ArgStringList &CmdArgs);
|
||||
|
||||
+void addOpenMPRuntimeSpecificRPath(const ToolChain &TC,
|
||||
+ const llvm::opt::ArgList &Args,
|
||||
+ llvm::opt::ArgStringList &CmdArgs);
|
||||
void addArchSpecificRPath(const ToolChain &TC, const llvm::opt::ArgList &Args,
|
||||
llvm::opt::ArgStringList &CmdArgs);
|
||||
void addOpenMPRuntimeLibraryPath(const ToolChain &TC,
|
||||
diff --git a/clang/test/OpenMP/Inputs/libomp.a b/clang/test/OpenMP/Inputs/libomp.a
|
||||
new file mode 100644
|
||||
index 000000000000..8b277f0dd5dc
|
||||
--- /dev/null
|
||||
+++ b/clang/test/OpenMP/Inputs/libomp.a
|
||||
@@ -0,0 +1 @@
|
||||
+!<arch>
|
||||
--
|
||||
2.42.0
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# Drop the following option after debugedit adds support to DWARF-5:
|
||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=28728
|
||||
-gdwarf-4 -g0
|
|
@ -337,9 +337,6 @@
|
|||
%license clang/LICENSE.TXT
|
||||
%{install_prefix}/lib/clang/%{maj_ver}/include/*
|
||||
%{install_libdir}/*.so.*
|
||||
%if 0%{?fedora} == 38
|
||||
%{_sysconfdir}/%{name}/%{_target_platform}.cfg
|
||||
%endif
|
||||
|
||||
%files -n %{pkg_name_clang}-devel
|
||||
%license clang/LICENSE.TXT
|
||||
|
|
|
@ -184,12 +184,6 @@ chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1*
|
|||
# populated by other packages
|
||||
mkdir -p %{buildroot}%{install_libdir}/clang/%{maj_ver}/{bin,include,lib,share}/
|
||||
|
||||
%if 0%{?fedora} == 38
|
||||
# Install config file
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/
|
||||
mv %{SOURCE2006} %{buildroot}%{_sysconfdir}/%{name}/%{_target_platform}.cfg
|
||||
%endif
|
||||
|
||||
%if %{without compat_build}
|
||||
# Add a symlink in /usr/bin to clang-format-diff
|
||||
ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format-diff
|
||||
|
|
|
@ -16,13 +16,6 @@ Patch3002: 0001-Always-build-shared-libs-for-LLD.patch
|
|||
# # https://sourceware.org/bugzilla/show_bug.cgi?id=28728
|
||||
# Source2006: 0001-Produce-DWARF4-by-default.patch
|
||||
|
||||
%if %{with snapshot_build}
|
||||
# Temporary patch to add back -fno-openmp-implicit-rpath until we no longer
|
||||
# support Fedora 38 or older, which pass -fno-openmp-implicit-rpath in
|
||||
# redhat-rpm-config.
|
||||
Patch9001: 0001-Restore-fopenmp-implicit-rpath-disabled-by-default.patch
|
||||
%endif
|
||||
|
||||
#region RHEL patches
|
||||
Patch9002: 0001-Remove-myst_parser-dependency-for-RHEL.patch
|
||||
#endregion
|
||||
#endregion
|
||||
|
|
|
@ -14,10 +14,6 @@
|
|||
# See https://rpm-software-management.github.io/rpm/manual/autosetup.html
|
||||
%autopatch -M9000 -p1
|
||||
|
||||
%if 0%{?fedora} == 38
|
||||
%patch -p1 -P9001
|
||||
%endif
|
||||
|
||||
%if %{defined rhel}
|
||||
%patch -p1 -P9002
|
||||
%endif
|
||||
|
|
|
@ -9,7 +9,6 @@ Source1006: release-keys.asc
|
|||
%if %{without compat_build}
|
||||
Source2005: macros.%{pkg_name_clang}
|
||||
%endif
|
||||
Source2006: clang.cfg
|
||||
|
||||
# Sources we use to split up the main spec file in sections so that we can more
|
||||
# easily see what specfile sections are touched by a patch.
|
||||
|
|
Loading…
Reference in a new issue