Rebuilt for MSVSphere 9.3

i8e
Arkady L. Shane 12 months ago
parent 3525e63e50
commit fb1ab0fdef
Signed by: tigro
GPG Key ID: 8D1597B4AD3AFAA0

2
.gitignore vendored

@ -1 +1 @@
SOURCES/ldc-1.32.2-src.tar.gz
SOURCES/ldc-1.35.0-src.tar.gz

@ -1 +1 @@
b9f80b7e7c067376c51a5c5ed68f8c602746373c SOURCES/ldc-1.32.2-src.tar.gz
b65cd012c58908cf0ada4b16b189adf9658fb549 SOURCES/ldc-1.35.0-src.tar.gz

@ -1,50 +0,0 @@
From f3e10a9aee4db798b5ac4a8b5cba9c037dff3faa Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
Date: Mon, 19 Dec 2022 13:58:03 +0100
Subject: [PATCH] Revert "Linux: Don't default to ld.gold linker"
Keep on using ld.gold on RHEL 8 and 9 where using ldc with ld.bfd breaks
gtkd and leads to crashing tilix.
https://bugzilla.redhat.com/show_bug.cgi?id=2134875
This reverts commit e125411e988679dfa8cbfc9dcfc05524a37589f7.
---
driver/linker-gcc.cpp | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/driver/linker-gcc.cpp b/driver/linker-gcc.cpp
index a53936a9aa..5ae90ce650 100644
--- a/driver/linker-gcc.cpp
+++ b/driver/linker-gcc.cpp
@@ -599,12 +599,22 @@ void ArgsBuilder::build(llvm::StringRef outputPath,
void ArgsBuilder::addLinker() {
llvm::StringRef linker = opts::linker;
- // Default to ld.bfd for Android (placing .tdata and .tbss sections adjacent
- // to each other as required by druntime's rt.sections_android, contrary to
- // gold and lld as of Android NDK r21d).
- if (global.params.targetTriple->getEnvironment() == llvm::Triple::Android &&
+ // We have a default linker preference for Linux targets. It can be disabled
+ // via `-linker=` (explicitly empty).
+ if (global.params.targetTriple->isOSLinux() &&
opts::linker.getNumOccurrences() == 0) {
- linker = "bfd";
+ // Default to ld.bfd for Android (placing .tdata and .tbss sections adjacent
+ // to each other as required by druntime's rt.sections_android, contrary to
+ // gold and lld as of Android NDK r21d).
+ if (global.params.targetTriple->getEnvironment() == llvm::Triple::Android) {
+ linker = "bfd";
+ }
+ // Otherwise default to ld.gold for Linux due to ld.bfd issues with ThinLTO
+ // (see #2278) and older bfd versions stripping llvm.used symbols (e.g.,
+ // ModuleInfo refs) with --gc-sections (see #2870).
+ else {
+ linker = "gold";
+ }
}
if (!linker.empty())
--
2.39.0

@ -0,0 +1,24 @@
From 87baf4a6f87c6776ba8f5dad276fb77e32e80065 Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
Date: Tue, 17 Oct 2023 10:44:24 +0200
Subject: [PATCH] LDC: Fix PPC support to compile without deprecation warnings
Fixes the following:
std/math/hardware.d(929): Deprecation: `asm` statement cannot be marked `@safe`, use `@system` or `@trusted` instead
---
std/math/hardware.d | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git ldc-1.35.0-src/runtime/phobos/std/math/hardware.d ldc-1.35.0-src/runtime/phobos/std/math/hardware.d
index 3e0c2fd6fbb..24fcbb89a63 100644
--- ldc-1.35.0-src/runtime/phobos/std/math/hardware.d
+++ ldc-1.35.0-src/runtime/phobos/std/math/hardware.d
@@ -926,7 +926,7 @@ private:
}
else version (PPC_Any)
{
- asm pure nothrow @nogc @safe
+ asm pure nothrow @nogc @trusted
{
`mtfsb0 24
mtfsb0 25

@ -1,9 +1,9 @@
%if 0%{?rhel}
#global llvm_version 15
%else
%global llvm_version 15
%global llvm_version 16
%endif
%global soversion 102
%global soversion 105
# bootstrapping is used for updating LDC to a newer version: it relies on an
# older, working LDC compiler in the buildroot, which is then used to build a
@ -16,28 +16,31 @@
Name: ldc
Epoch: 1
Version: 1.32.2%{?pre:~%{pre}}
Release: 2%{?dist}.1
Version: 1.35.0
Release: 1%{?dist}
Summary: LLVM D Compiler
# The DMD frontend in dmd/* GPL version 1 or artistic license
# The files gen/asmstmt.cpp and gen/asm-*.hG PL version 2+ or artistic license
License: BSD
URL: https://github.com/ldc-developers/ldc
Source0: https://github.com/ldc-developers/ldc/releases/download/v%{version}%{?pre:-%{pre}}/%{name}-%{version}%{?pre:-%{pre}}-src.tar.gz
Source0: https://github.com/ldc-developers/ldc/releases/download/v%{version_no_tilde}/%{name}-%{version_no_tilde}-src.tar.gz
Source3: macros.%{name}
# Make sure /usr/include/d is in the include search path
Patch0: ldc-include-path.patch
Patch: ldc-include-path.patch
# Don't add rpath to standard libdir
Patch1: ldc-no-default-rpath.patch
Patch: ldc-no-default-rpath.patch
%if 0%{?rhel} && 0%{?rhel} <= 9
# Keep on using ld.gold on RHEL 8 and 9 where using ldc with ld.bfd breaks gtkd
# and leads to crashing tilix.
# https://bugzilla.redhat.com/show_bug.cgi?id=2134875
Patch2: 0001-Revert-Linux-Don-t-default-to-ld.gold-linker.patch
Patch: 0001-Revert-Linux-Don-t-default-to-ld.gold-linker.patch
%endif
# https://github.com/ldc-developers/phobos/pull/72
Patch: fix-ppc-build.patch
ExclusiveArch: %{ldc_arches} ppc64le
BuildRequires: bash-completion
@ -58,13 +61,6 @@ Requires: %{name}-libs = %{epoch}:%{version}-%{release}
# Require gcc for linking
Requires: gcc
# Removed in F33
Obsoletes: ldc-druntime-devel < 1:1.23.0
Obsoletes: ldc-jit-devel < 1:1.23.0
Obsoletes: ldc-phobos-devel < 1:1.23.0
# Removed in F38
Obsoletes: ldc-phobos-geany-tags < 1:1.32.0
%description
LDC is a portable compiler for the D programming language with modern
optimization and code generation capabilities.
@ -75,11 +71,6 @@ of D, and relies on the LLVM Core libraries for code generation.
%package libs
Summary: LLVM D Compiler libraries
License: Boost
# Removed in F35
Obsoletes: ldc-jit < 1:1.27.1
# Merged into -libs in F35
Obsoletes: ldc-druntime < 1:1.27.1-2
Obsoletes: ldc-phobos < 1:1.27.1-2
%description libs
LDC is a portable compiler for the D programming language with modern
@ -88,7 +79,7 @@ optimization and code generation capabilities.
This package contains the Phobos D standard library and the D runtime library.
%prep
%autosetup -n %{name}-%{version}%{?pre:-%{pre}}-src -p1
%autosetup -n %{name}-%{version_no_tilde}-src -p1
%build
# This package appears to be failing because links to the LLVM plugins
@ -99,11 +90,10 @@ This package contains the Phobos D standard library and the D runtime library.
%global optflags %{optflags} -fno-strict-aliasing
%if %{with bootstrap}
tar xf %{SOURCE0}
mkdir build-bootstrap
pushd build-bootstrap
cmake -DLLVM_CONFIG:PATH=llvm-config%{?llvm_version:-%{llvm_version}} \
../%{name}-%{version}%{?pre:-%{pre}}-src
..
make %{?_smp_mflags}
popd
%endif
@ -132,6 +122,7 @@ install --mode=0644 %{SOURCE3} %{buildroot}%{_rpmconfigdir}/macros.d/macros.ldc
%config(noreplace) %{_sysconfdir}/ldc2.conf
%{_bindir}/ldc2
%{_bindir}/ldmd2
%{_bindir}/ldc-build-plugin
%{_bindir}/ldc-build-runtime
%{_bindir}/ldc-profdata
%{_bindir}/ldc-prune-cache
@ -158,14 +149,22 @@ install --mode=0644 %{SOURCE3} %{buildroot}%{_rpmconfigdir}/macros.d/macros.ldc
%{_libdir}/libphobos2-ldc-shared.so.%{soversion}*
%changelog
* Thu Nov 16 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 1:1.32.2-2.1
- Rebuilt againt ner LLVM
* Fri Nov 17 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 1:1.35.0-1
- Rebuilt for MSVSphere 9.3
* Sun Oct 15 2023 Kalev Lember <klember@redhat.com> - 1:1.35.0-1
- Update to 1.35.0
- Drop old obsoletes
* Sun Aug 27 2023 Kalev Lember <klember@redhat.com> - 1:1.34.0-1
- Update to 1.34.0
- Build with llvm 16
* Tue Jul 25 2023 Arkady L. Shane <ashejn@msvsphere.ru> - 1:1.32.2-2
- Rebuilt for MSVSphere 9.2
* Mon Jul 24 2023 Kalev Lember <klember@redhat.com> - 1:1.33.0-1
- Update to 1.33.0
* Fri May 19 2023 Kalev Lember <klember@redhat.com> - 1:1.32.2-2
- Rebuild for llvm 15 on EPEL 8 and 9
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.32.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sun May 14 2023 Kalev Lember <klember@redhat.com> - 1:1.32.2-1
- Update to 1.32.2

Loading…
Cancel
Save