Fix some Cygwin DLL handling. (Venkat Iyer)
This commit is contained in:
parent
41384a0e41
commit
cbd501b865
|
|
@ -199,10 +199,7 @@ shared=-shared
|
|||
case "${host}" in
|
||||
|
||||
*-*-cygwin*)
|
||||
shared="-mdll -Wl,--enable-auto-image-base"
|
||||
if test $ac_cv_mingw32 = yes; then
|
||||
shared="-shared -Wl,--enable-auto-image-base"
|
||||
fi
|
||||
shared="-shared -Wl,--enable-auto-image-base"
|
||||
;;
|
||||
|
||||
*-*-hpux*)
|
||||
|
|
|
|||
28
cygwin.txt
28
cygwin.txt
|
|
@ -6,41 +6,17 @@ To build using cygwin:
|
|||
Prerequisites:
|
||||
|
||||
o Latest net release (1.1.4) of cygwin (sources.redhat.com/cygwin)
|
||||
o autoconf version 2.13 (or later) from cygutils (cygutils.netpedia.net)
|
||||
o cvs (1.10.8 or later) also from cygutils
|
||||
|
||||
Procedure:
|
||||
o Get the source code - see the main icarus verilog page for how to
|
||||
do this
|
||||
o cd to the verilog directory
|
||||
o autoconf
|
||||
o autoconf.sh
|
||||
o ./configure
|
||||
o make
|
||||
o make install
|
||||
|
||||
That's all that's needed. But there're two common problems during
|
||||
the make phase. All steps are in the verilog directory.
|
||||
|
||||
1.
|
||||
|
||||
If gcc dies saying virtual memory exhausted while compiling parse.c
|
||||
then recompile with -O1 or without -O flag and do these steps to
|
||||
continue
|
||||
o make CXXFLAGS='' parse.o
|
||||
o make
|
||||
|
||||
2.
|
||||
|
||||
If gcc dies in the vpi directory while compiling vpi_systask.c with the
|
||||
error, conflicting types for `_cygwin_dll_entry', then fix the line in
|
||||
/usr/include/cygwin/cygwin_dll.h. Change the line:
|
||||
|
||||
int WINAPI _cygwin_dll_entry (HANDLE h, DWORD reason, void *ptr); \
|
||||
to
|
||||
int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr); \
|
||||
|
||||
Note the change from HANDLE to HINSTANCE. Then do
|
||||
o make
|
||||
That's all that's needed.
|
||||
|
||||
To build your own extensions - just include vpi_user.h and link with
|
||||
a command like this:
|
||||
|
|
|
|||
13
ivl_target.h
13
ivl_target.h
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: ivl_target.h,v 1.82 2001/09/16 22:19:42 steve Exp $"
|
||||
#ident "$Id: ivl_target.h,v 1.83 2001/09/30 16:45:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
@ -938,6 +938,14 @@ extern ivl_expr_t ivl_stmt_rval(ivl_statement_t net);
|
|||
extern ivl_statement_t ivl_stmt_sub_stmt(ivl_statement_t net);
|
||||
|
||||
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
# define DLLEXPORT __declspec(dllexport)
|
||||
#else
|
||||
# define DLLEXPORT
|
||||
#endif
|
||||
|
||||
extern DLLEXPORT int target_design(ivl_design_t des);
|
||||
|
||||
|
||||
/* target_design
|
||||
|
||||
|
|
@ -955,6 +963,9 @@ _END_DECL
|
|||
|
||||
/*
|
||||
* $Log: ivl_target.h,v $
|
||||
* Revision 1.83 2001/09/30 16:45:10 steve
|
||||
* Fix some Cygwin DLL handling. (Venkat Iyer)
|
||||
*
|
||||
* Revision 1.82 2001/09/16 22:19:42 steve
|
||||
* Support attributes to logic gates.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -37,10 +37,7 @@ shared=-shared
|
|||
case "${host}" in
|
||||
|
||||
*-*-cygwin*)
|
||||
shared="-mdll -Wl,--enable-auto-image-base"
|
||||
if test $ac_cv_mingw32 = yes; then
|
||||
shared="-shared -Wl,--enable-auto-image-base"
|
||||
fi
|
||||
shared="-shared -Wl,--enable-auto-image-base"
|
||||
;;
|
||||
|
||||
*-*-hpux*)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: null.c,v 1.5 2001/07/25 03:10:50 steve Exp $"
|
||||
#ident "$Id: null.c,v 1.6 2001/09/30 16:45:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -34,13 +34,11 @@ int target_design(ivl_design_t des)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined (__CYGWIN32__)
|
||||
#include <cygwin/cygwin_dll.h>
|
||||
DECLARE_CYGWIN_DLL(DllMain);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* $Log: null.c,v $
|
||||
* Revision 1.6 2001/09/30 16:45:10 steve
|
||||
* Fix some Cygwin DLL handling. (Venkat Iyer)
|
||||
*
|
||||
* Revision 1.5 2001/07/25 03:10:50 steve
|
||||
* Create a config.h.in file to hold all the config
|
||||
* junk, and support gcc 3.0. (Stephan Boettcher)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: imain.c,v 1.9 2001/09/15 18:27:04 steve Exp $"
|
||||
#ident "$Id: imain.c,v 1.10 2001/09/30 16:45:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -147,13 +147,11 @@ int target_design(ivl_design_t des)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
#include <cygwin/cygwin_dll.h>
|
||||
DECLARE_CYGWIN_DLL(DllMain);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* $Log: imain.c,v $
|
||||
* Revision 1.10 2001/09/30 16:45:10 steve
|
||||
* Fix some Cygwin DLL handling. (Venkat Iyer)
|
||||
*
|
||||
* Revision 1.9 2001/09/15 18:27:04 steve
|
||||
* Make configure detect malloc.h
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: stub.c,v 1.49 2001/07/25 03:10:50 steve Exp $"
|
||||
#ident "$Id: stub.c,v 1.50 2001/09/30 16:45:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -603,13 +603,12 @@ int target_design(ivl_design_t des)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined (__CYGWIN32__)
|
||||
#include <cygwin/cygwin_dll.h>
|
||||
DECLARE_CYGWIN_DLL(DllMain);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* $Log: stub.c,v $
|
||||
* Revision 1.50 2001/09/30 16:45:10 steve
|
||||
* Fix some Cygwin DLL handling. (Venkat Iyer)
|
||||
*
|
||||
* Revision 1.49 2001/07/25 03:10:50 steve
|
||||
* Create a config.h.in file to hold all the config
|
||||
* junk, and support gcc 3.0. (Stephan Boettcher)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: verilog.c,v 1.24 2001/07/25 03:10:50 steve Exp $"
|
||||
#ident "$Id: verilog.c,v 1.25 2001/09/30 16:45:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -436,13 +436,12 @@ int target_design(ivl_design_t des)
|
|||
}
|
||||
|
||||
|
||||
#if defined (__CYGWIN32__)
|
||||
#include <cygwin/cygwin_dll.h>
|
||||
DECLARE_CYGWIN_DLL(DllMain);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* $Log: verilog.c,v $
|
||||
* Revision 1.25 2001/09/30 16:45:10 steve
|
||||
* Fix some Cygwin DLL handling. (Venkat Iyer)
|
||||
*
|
||||
* Revision 1.24 2001/07/25 03:10:50 steve
|
||||
* Create a config.h.in file to hold all the config
|
||||
* junk, and support gcc 3.0. (Stephan Boettcher)
|
||||
|
|
|
|||
|
|
@ -37,10 +37,7 @@ shared=-shared
|
|||
case "${host}" in
|
||||
|
||||
*-*-cygwin*)
|
||||
shared="-mdll -Wl,--enable-auto-image-base"
|
||||
if test $ac_cv_mingw32 = yes; then
|
||||
shared="-shared -Wl,--enable-auto-image-base"
|
||||
fi
|
||||
shared="-shared -Wl,--enable-auto-image-base"
|
||||
;;
|
||||
|
||||
*-*-hpux*)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: vvp.c,v 1.11 2001/07/30 02:44:05 steve Exp $"
|
||||
#ident "$Id: vvp.c,v 1.12 2001/09/30 16:45:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -62,7 +62,9 @@ inline static void draw_module_declarations(ivl_design_t des)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
int target_design(ivl_design_t des)
|
||||
|
||||
{
|
||||
int rc;
|
||||
ivl_scope_t root;
|
||||
|
|
@ -98,11 +100,6 @@ int target_design(ivl_design_t des)
|
|||
return rc;
|
||||
}
|
||||
|
||||
#if defined (__CYGWIN32__)
|
||||
#include <cygwin/cygwin_dll.h>
|
||||
DECLARE_CYGWIN_DLL(DllMain);
|
||||
#endif
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: sys_table.c,v 1.12 2001/07/25 03:10:50 steve Exp $"
|
||||
#ident "$Id: sys_table.c,v 1.13 2001/09/30 16:45:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -42,13 +42,12 @@ void (*vlog_startup_routines[])() = {
|
|||
0
|
||||
};
|
||||
|
||||
#if defined (__CYGWIN32__)
|
||||
#include <cygwin/cygwin_dll.h>
|
||||
DECLARE_CYGWIN_DLL(DllMain);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* $Log: sys_table.c,v $
|
||||
* Revision 1.13 2001/09/30 16:45:10 steve
|
||||
* Fix some Cygwin DLL handling. (Venkat Iyer)
|
||||
*
|
||||
* Revision 1.12 2001/07/25 03:10:50 steve
|
||||
* Create a config.h.in file to hold all the config
|
||||
* junk, and support gcc 3.0. (Stephan Boettcher)
|
||||
|
|
|
|||
|
|
@ -15,10 +15,7 @@ shared=-shared
|
|||
EXTRALIBS=
|
||||
case "${host}" in
|
||||
*-*-cygwin*)
|
||||
shared="-mdll -Wl,--enable-auto-image-base"
|
||||
if test $ac_cv_mingw32 = yes; then
|
||||
shared="-shared -Wl,--enable-auto-image-base"
|
||||
fi
|
||||
shared="-shared -Wl,--enable-auto-image-base"
|
||||
WIN32=yes
|
||||
;;
|
||||
*-*-hpux*)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: vpi_systask.c,v 1.3 2001/05/22 02:14:47 steve Exp $"
|
||||
#ident "$Id: vpi_systask.c,v 1.4 2001/09/30 16:45:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vpi_priv.h"
|
||||
|
|
@ -118,13 +118,11 @@ const struct __vpirt *vpip_get_sysfunc_rt(void)
|
|||
return &vpip_sysfunc_rt;
|
||||
}
|
||||
|
||||
#if defined (__CYGWIN32__)
|
||||
#include <cygwin/cygwin_dll.h>
|
||||
DECLARE_CYGWIN_DLL(DllMain);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* $Log: vpi_systask.c,v $
|
||||
* Revision 1.4 2001/09/30 16:45:10 steve
|
||||
* Fix some Cygwin DLL handling. (Venkat Iyer)
|
||||
*
|
||||
* Revision 1.3 2001/05/22 02:14:47 steve
|
||||
* Update the mingw build to not require cygwin files.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue