Enable D front-end and modify libphobos asserts

The patch was suggestion from Iain Buclaw (D maintainer from GCC).

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
This commit is contained in:
David Abdurachmanov 2019-01-23 00:01:17 +01:00
parent 86300223a1
commit f12d80983f
Signed by: davidlt
GPG Key ID: 7108702C938B13C1
2 changed files with 35 additions and 2 deletions

View File

@ -33,7 +33,7 @@
%else
%global build_go 0
%endif
%ifarch %{ix86} x86_64 %{arm} %{mips}
%ifarch %{ix86} x86_64 %{arm} %{mips} riscv64
%global build_d 1
%else
%global build_d 0
@ -101,7 +101,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
Release: %{gcc_release}.0.riscv64%{?dist}
Release: %{gcc_release}.davidlt.0%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@ -266,6 +266,7 @@ Patch17: gcc9-pr88905.patch
Patch18: gcc9-pr88906.patch
Patch30: libphobos-enable-riscv.patch
Patch31: libphobos-asserts.patch
Patch1000: nvptx-tools-no-ptxas.patch
Patch1001: nvptx-tools-build.patch
@ -853,6 +854,7 @@ to NVidia PTX capable devices if available.
%patch18 -p0 -b .pr88906~
%patch30 -p1 -b .libphobos-riscv~
%patch31 -p1 -b .libphobos-asserts~
cd nvptx-tools-%{nvptx_tools_gitrev}
%patch1000 -p1 -b .nvptx-tools-no-ptxas~

31
libphobos-asserts.patch Normal file
View File

@ -0,0 +1,31 @@
diff --git a/libphobos/libdruntime/core/atomic.d b/libphobos/libdruntime/core/atomic.d
index 0b39cddb6..5a6c4b854 100644
--- a/libphobos/libdruntime/core/atomic.d
+++ b/libphobos/libdruntime/core/atomic.d
@@ -1353,7 +1353,7 @@ else version (GNU)
private bool casImpl(T,V1,V2)( shared(T)* here, V1 ifThis, V2 writeThis ) pure nothrow @nogc @trusted
{
- static assert(GNU_Have_Atomics, "cas() not supported on this architecture");
+ static assert(GNU_Have_Atomics || GNU_Have_LibAtomic, "cas() not supported on this architecture");
bool res = void;
static if (T.sizeof == byte.sizeof)
@@ -1406,7 +1406,7 @@ else version (GNU)
{
static assert(ms != MemoryOrder.rel, "Invalid MemoryOrder for atomicLoad");
static assert(__traits(isPOD, T), "argument to atomicLoad() must be POD");
- static assert(GNU_Have_Atomics, "atomicLoad() not supported on this architecture");
+ static assert(GNU_Have_Atomics || GNU_Have_LibAtomic, "atomicLoad() not supported on this architecture");
static if (T.sizeof == ubyte.sizeof)
{
@@ -1444,7 +1444,7 @@ else version (GNU)
{
static assert(ms != MemoryOrder.acq, "Invalid MemoryOrder for atomicStore");
static assert(__traits(isPOD, T), "argument to atomicLoad() must be POD");
- static assert(GNU_Have_Atomics, "atomicStore() not supported on this architecture");
+ static assert(GNU_Have_Atomics || GNU_Have_LibAtomic, "atomicStore() not supported on this architecture");
static if (T.sizeof == ubyte.sizeof)
{