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