1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00

cad/freehdl: fix build with clang

- Fix build with clang

PR:		ports/181830
Obtained from:	NetBSD
This commit is contained in:
William Grzybowski 2013-09-06 15:39:44 +00:00
parent 440556de07
commit a72306e9e6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=326515
6 changed files with 92 additions and 1 deletions

View File

@ -7,7 +7,7 @@ CATEGORIES= cad
MASTER_SITES= http://freehdl.seul.org/~enaroska/ MASTER_SITES= http://freehdl.seul.org/~enaroska/
MAINTAINER= kamikaze@bsdforen.de MAINTAINER= kamikaze@bsdforen.de
COMMENT= A free VHDL simulator COMMENT= Free VHDL simulator
USE_LDCONFIG= yes USE_LDCONFIG= yes
USES= gmake perl5 pkgconfig USES= gmake perl5 pkgconfig

View File

@ -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);
}
};

View File

@ -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,

View File

@ -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);
}
};

View File

@ -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. */

View File

@ -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;
}