Bug 181830 - [maintainer-update] cad/freehdl only compiles with gcc42
Summary: [maintainer-update] cad/freehdl only compiles with gcc42
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: William Grzybowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-05 08:40 UTC by kamikaze
Modified: 2013-09-06 16:40 UTC (History)
0 users

See Also:


Attachments
file.diff (348 bytes, patch)
2013-09-05 08:40 UTC, kamikaze
no flags Details | Diff
patch-ports-cad-freehdl.txt (347 bytes, patch)
2013-09-05 08:53 UTC, kamikaze
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description kamikaze 2013-09-05 08:40:00 UTC
The port neither compiles with clang nor modern versions of gcc.

Fix: Patch attached with submission follows:
Comment 1 kamikaze 2013-09-05 08:53:12 UTC
Sorry, sent the wrong version of the patch first.

-- 
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail? 
Comment 2 William Grzybowski freebsd_committer 2013-09-06 13:12:47 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wg

I'll take it.
Comment 3 William Grzybowski freebsd_committer 2013-09-06 16:39:50 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!
Comment 4 dfilter service freebsd_committer 2013-09-06 16:39:53 UTC
Author: wg
Date: Fri Sep  6 15:39:44 2013
New Revision: 326515
URL: http://svnweb.freebsd.org/changeset/ports/326515

Log:
  cad/freehdl: fix build with clang
  
  - Fix build with clang
  
  PR:		ports/181830
  Obtained from:	NetBSD

Added:
  head/cad/freehdl/files/
  head/cad/freehdl/files/patch-freehdl_kernel-db.hh   (contents, props changed)
  head/cad/freehdl/files/patch-freehdl_kernel-sig-info.hh   (contents, props changed)
  head/cad/freehdl/files/patch-freehdl_kernel-util.hh   (contents, props changed)
  head/cad/freehdl/files/patch-freehdl_std-vhdl-types.hh   (contents, props changed)
  head/cad/freehdl/files/patch-kernel_driver__info.cc   (contents, props changed)
Modified:
  head/cad/freehdl/Makefile

Modified: head/cad/freehdl/Makefile
==============================================================================
--- head/cad/freehdl/Makefile	Fri Sep  6 15:30:07 2013	(r326514)
+++ head/cad/freehdl/Makefile	Fri Sep  6 15:39:44 2013	(r326515)
@@ -7,7 +7,7 @@ CATEGORIES=	cad
 MASTER_SITES=	http://freehdl.seul.org/~enaroska/
 
 MAINTAINER=	kamikaze@bsdforen.de
-COMMENT=	A free VHDL simulator
+COMMENT=	Free VHDL simulator
 
 USE_LDCONFIG=	yes
 USES=		gmake perl5 pkgconfig

Added: head/cad/freehdl/files/patch-freehdl_kernel-db.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/freehdl/files/patch-freehdl_kernel-db.hh	Fri Sep  6 15:39:44 2013	(r326515)
@@ -0,0 +1,15 @@
+--- freehdl/kernel-db.hh.orig	2013-04-30 20:25:10.000000000 +0000
++++ freehdl/kernel-db.hh
+@@ -254,10 +254,10 @@ public:
+ 
+ // A hash function template used tp generate a hash number from
+ // d
+-class db_basic_key_hash : public hash<unsigned long> {
++class db_basic_key_hash : public __gnu_cxx::hash<unsigned long> {
+ public:
+   size_t operator()(const db_basic_key& x) const {
+-    return (*(hash<unsigned long> *)this)(((unsigned long)x.value)>>2);
++    return (*(__gnu_cxx::hash<unsigned long> *)this)(((unsigned long)x.value)>>2);
+   }
+ };
+ 

Added: head/cad/freehdl/files/patch-freehdl_kernel-sig-info.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/freehdl/files/patch-freehdl_kernel-sig-info.hh	Fri Sep  6 15:39:44 2013	(r326515)
@@ -0,0 +1,13 @@
+--- freehdl/kernel-sig-info.hh.orig	2013-02-25 17:49:33.000000000 +0000
++++ freehdl/kernel-sig-info.hh
+@@ -164,10 +164,6 @@ template<class T>class sig_info : public
+ 	   type_info_interface *type, char attr, sig_info_base *base_sig,
+ 	   acl *aclp, vtime delay, void *sr) :
+     sig_info_base(iname, n, sln, type, attr, base_sig, aclp, delay, sr) {};
+-  /* Constructor to instantiate a guard signal */
+-  sig_info(name_stack &iname, const char *n, const char *sln,
+-	   void *reader, void *sr) : 
+-    sig_info_base(iname, n, sln, reader, sr) {};
+   /* Constructor to instantiate an alias signal */
+   sig_info(name_stack &iname, const char *n, const char *sln,
+ 	   type_info_interface *ty, sig_info_base *aliased_sig,

Added: head/cad/freehdl/files/patch-freehdl_kernel-util.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/freehdl/files/patch-freehdl_kernel-util.hh	Fri Sep  6 15:39:44 2013	(r326515)
@@ -0,0 +1,15 @@
+--- freehdl/kernel-util.hh.orig	2013-04-30 20:24:07.000000000 +0000
++++ freehdl/kernel-util.hh
+@@ -24,10 +24,10 @@ using namespace __gnu_cxx;
+ // A hash function template used tp generate a hash number from
+ // pointer values.
+ template<class T>
+-class pointer_hash : public hash<unsigned long> {
++class pointer_hash : public __gnu_cxx::hash<unsigned long> {
+ public:
+   size_t operator()(const T& x) const {
+-    return (*(hash<unsigned long> *)this)(((unsigned long)x)>>2);
++    return (*(__gnu_cxx::hash<unsigned long> *)this)(((unsigned long)x)>>2);
+   }
+ };
+ 

Added: head/cad/freehdl/files/patch-freehdl_std-vhdl-types.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/freehdl/files/patch-freehdl_std-vhdl-types.hh	Fri Sep  6 15:39:44 2013	(r326515)
@@ -0,0 +1,11 @@
+--- freehdl/std-vhdl-types.hh.orig	2013-02-25 17:33:20.000000000 +0000
++++ freehdl/std-vhdl-types.hh
+@@ -1483,7 +1483,7 @@ A concat(array_info *ainfo, const A &a1,
+   new_array.info->add_ref();
+ 
+   /* Allocate memory for the data */
+-  const int mem_size = length * ainfo->element_type->size();
++  const int mem_size = length * ainfo->element_type->size;
+   new_array.data = (char*)internal_dynamic_alloc(mem_size);
+ 
+   /* Note, scalar(...) can be evaluated at compile time. */

Added: head/cad/freehdl/files/patch-kernel_driver__info.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/freehdl/files/patch-kernel_driver__info.cc	Fri Sep  6 15:39:44 2013	(r326515)
@@ -0,0 +1,37 @@
+--- kernel/driver_info.cc.orig	2013-02-25 17:38:05.000000000 +0000
++++ kernel/driver_info.cc
+@@ -268,6 +268,7 @@ do_scalar_inertial_assignment(driver_inf
+  *************************************************************************
+  *************************************************************************/
+ 
++inline int do_record_transport_assignment(driver_info &, const record_base &, int, const vtime &);
+ 
+ // Creates transaction composite signals. Returns number of assigned scalars.
+ inline int
+@@ -311,7 +312,6 @@ do_array_transport_assignment(driver_inf
+ 	assigned_scalars += do_array_transport_assignment(driver, (array_base&)value.data[j], i, tr_time);
+ 	break;
+       case RECORD:
+-	inline int do_record_transport_assignment(driver_info &, const record_base &, int, const vtime &);
+ 	assigned_scalars += do_record_transport_assignment(driver, (record_base&)value.data[j], i, tr_time);
+ 	break;
+       }
+@@ -338,6 +338,9 @@ driver_info::transport_assign(const arra
+ }
+ 
+ 
++inline int do_record_inertial_assignment(driver_info &, const record_base &, int,  
++					  const vtime &, const vtime &); 
++
+ // Creates transaction for composite signals. Returns number of assigned scalars.
+ inline int
+ do_array_inertial_assignment(driver_info &driver,
+@@ -381,8 +384,6 @@ do_array_inertial_assignment(driver_info
+ 	assigned_scalars += do_array_inertial_assignment(driver, (array_base&)value.data[j], i, tr_time, rm_time);
+ 	break;
+       case RECORD:
+-	inline int do_record_inertial_assignment(driver_info &, const record_base &, int,  
+-						  const vtime &, const vtime &); 
+ 	assigned_scalars += do_record_inertial_assignment(driver, (record_base&)value.data[j], i, tr_time, rm_time);
+ 	break;
+       }
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"