rpms/ghdl/devel grt-stats.patch,NONE,1.1 ghdl.spec,1.60,1.61

sailer sailer at fedoraproject.org
Tue Dec 29 23:52:49 UTC 2009


Author: sailer

Update of /cvs/extras/rpms/ghdl/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17610

Modified Files:
	ghdl.spec 
Added Files:
	grt-stats.patch 
Log Message:
tentative patch to fix crashes with ./tb --stats


grt-stats.patch:
 grt-cbinding.c |    6 ++++++
 grt-stats.adb  |    8 +++-----
 2 files changed, 9 insertions(+), 5 deletions(-)

--- NEW FILE grt-stats.patch ---
--- gcc/vhdl/grt/grt-cbinding.c.orig	2009-12-30 00:24:06.000000000 +0100
+++ gcc/vhdl/grt/grt-cbinding.c	2009-12-30 00:27:36.000000000 +0100
@@ -43,6 +43,12 @@
   fprintf (stream, "%g", val);
 }
 
+void
+__ghdl_fprintf_clock (FILE *stream, int a, int b)
+{
+  fprintf (stream, "%3d.%03d", a, b);
+}
+
 #if 1
 void
 __gnat_last_chance_handler (void)
--- gcc/vhdl/grt/grt-stats.adb.orig	2009-12-30 00:24:17.000000000 +0100
+++ gcc/vhdl/grt/grt-stats.adb	2009-12-30 00:29:20.000000000 +0100
@@ -71,10 +71,8 @@
 
    procedure Put (Stream : FILEs; Val : Clock_T)
    is
-      Fmt : constant String := "%3d.%03d" & Character'Val (0);
-
-      procedure fprintf (Stream : FILEs; Fmt : Address; A, B : Clock_T);
-      pragma Import (C, fprintf);
+      procedure Fprintf_Clock (Stream : FILEs; A, B : Integer);
+      pragma Import (C, Fprintf_Clock, "__ghdl_fprintf_clock");
 
       Sec : Clock_T;
       Ms : Clock_T;
@@ -84,7 +82,7 @@
       --  Avoid overflow.
       Ms := ((Val mod One_Second) * 1000) / One_Second;
 
-      fprintf (Stream, Fmt'Address, Sec, Ms);
+      Fprintf_Clock (Stream, Sec, Ms);
    end Put;
 
    procedure Put (Stream : FILEs; T : Time_Stats) is


Index: ghdl.spec
===================================================================
RCS file: /cvs/extras/rpms/ghdl/devel/ghdl.spec,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -p -r1.60 -r1.61
--- ghdl.spec	16 Dec 2009 22:26:47 -0000	1.60
+++ ghdl.spec	29 Dec 2009 23:52:48 -0000	1.61
@@ -5,7 +5,7 @@
 Summary: A VHDL simulator, using the GCC technology
 Name: ghdl
 Version: %{ghdlver}
-Release: 0.%{ghdlsvnver}svn.0%{?dist}
+Release: 0.%{ghdlsvnver}svn.1%{?dist}
 License: GPLv2+
 Group: Development/Languages
 URL: http://ghdl.free.fr/
@@ -27,6 +27,7 @@ Patch105: ghdl-grtadac.patch
 Patch106: ghdl-ppc64abort.patch
 # https://gna.org/bugs/index.php?13389
 Patch107: ieee-mathreal.patch
+Patch108: grt-stats.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires(post): /sbin/install-info
 Requires(preun): /sbin/install-info
@@ -132,6 +133,7 @@ popd
 %patch104 -p0 -b .libgnat44
 %patch105 -p1 -b .grtadac
 %patch106 -p0 -b .ppc64abort
+%patch108 -p0 -b .grtstats
 
 %build
 %{__rm} -fr obj-%{gcc_target_platform}
@@ -329,6 +331,9 @@ P64=%{buildroot}/%{_libdir}/gcc/%{gcc_ta
 
 
 %changelog
+* Wed Dec 30 2009 Thomas Sailer <t.sailer at alumni.ethz.ch> - 0.28-0.133svn.1
+- fix crash when running ./tb --stats
+
 * Wed Dec 16 2009 Thomas Sailer <t.sailer at alumni.ethz.ch> - 0.28-0.133svn.0
 - update to svn133, drop upstreamed patches
 




More information about the fedora-extras-commits mailing list