diff --git a/ghdl-gcc11.patch b/ghdl-gcc11.patch index c7d765c..01075ae 100644 --- a/ghdl-gcc11.patch +++ b/ghdl-gcc11.patch @@ -1,11 +1,41 @@ -diff -up ghdl/src/synth/synth-insts.adb.orig ghdl/src/synth/synth-insts.adb ---- ghdl/src/synth/synth-insts.adb.orig 2020-12-10 21:10:21.730105052 +0100 -+++ ghdl/src/synth/synth-insts.adb 2020-12-10 21:10:34.538536693 +0100 -@@ -248,7 +248,6 @@ package body Synth.Insts is +commit 42ad61bf1d5c570ed395013bd83e8fb7d54137c2 +Author: Tristan Gingold +Date: Fri Dec 11 04:49:45 2020 +0100 + + synth-insts: comment assert for gcc/gnat-11. Fix #1533 + +diff --git ghdl/src/synth/synth-insts.adb ghdl/src/synth/synth-insts.adb +index a49ee483..5c95dce0 100644 +--- ghdl/src/synth/synth-insts.adb ++++ ghdl/src/synth/synth-insts.adb +@@ -248,7 +248,10 @@ package body Synth.Insts is use Name_Table; Id_Len : constant Natural := Get_Name_Length (Id); Str_Len : constant Natural := Id_Len + 512; - pragma Assert (GNAT.SHA1.Hash_Length = 20); ++ ++ -- True in practice (and used to set the length of STR, but doesn't work ++ -- anymore with gcc/gnat 11. ++ -- pragma Assert (GNAT.SHA1.Hash_Length = 20); Str : String (1 .. Str_Len + 41); Len : Natural; +commit 8356ea3bb4e8d0e5ad8638c3d50914b64fc360ec +Author: Tristan Gingold +Date: Thu Feb 18 07:57:51 2021 +0100 + + grt-signals.adb: fix access. Fix #1652 + +diff --git ghdl/src/grt/grt-signals.adb ghdl/src/grt/grt-signals.adb +index 11efa152..ea714ae2 100644 +--- ghdl/src/grt/grt-signals.adb ++++ ghdl/src/grt/grt-signals.adb +@@ -553,7 +553,7 @@ package body Grt.Signals is + Proc := Get_Current_Process; + for I in 0 .. Sig.S.Nbr_Drivers - 1 loop + if Sig.S.Drivers (I).Proc = Proc then +- return Sig.S.Drivers (I)'Access; ++ return Sig.S.Drivers (I)'Unrestricted_Access; + end if; + end loop; + return null; diff --git a/ghdl-llvm11.patch b/ghdl-llvm11.patch new file mode 100644 index 0000000..11a75aa --- /dev/null +++ b/ghdl-llvm11.patch @@ -0,0 +1,18 @@ +commit a45cd97fa291b442002d70ac7e0968a24b0815f9 +Author: Dan HorĂ¡k +Date: Wed Feb 17 15:09:58 2021 +0100 + + update for LLVM 11.1 (#1651) + +diff --git ghdl/configure ghdl/configure +index 36b75054..f026e218 100755 +--- ghdl/configure ++++ ghdl/configure +@@ -275,6 +275,7 @@ if test $backend = llvm; then + check_version 9.0 $llvm_version || + check_version 10.0 $llvm_version || + check_version 11.0 $llvm_version || ++ check_version 11.1 $llvm_version || + false; then + echo "Debugging is enabled with llvm $llvm_version" + else diff --git a/ghdl.spec b/ghdl.spec index 1714335..037adbb 100644 --- a/ghdl.spec +++ b/ghdl.spec @@ -68,6 +68,7 @@ Patch14: gcc10-pr96690.patch Source100: https://github.com/ghdl/ghdl/archive/%{ghdlcommit}/%{name}-%{ghdlshortcommit}.tar.gz Patch100: ghdl-llvmflags.patch Patch101: ghdl-gcc11.patch +Patch102: ghdl-llvm11.patch # From: Thomas Sailer # To: ghdl-discuss@gna.org # Date: Thu, 02 Apr 2009 15:36:00 +0200 @@ -237,6 +238,7 @@ rm -f gcc/testsuite/go.test/test/chan/goroutines.go mv ghdl-%{ghdlcommit} ghdl %patch100 -p0 -b .llvmflags~ %patch101 -p0 -b .gcc11~ +%patch102 -p0 -b .llvm11~ # fix library and include path pushd ghdl