Add -D to iverilog-vpi and update documentation.

This patch adds a -D option to iverilog-vpi and updates the manual
page to document this option and some others that were missing.

From c7347239335558b26c873ea5e64d278d1feff38a Mon Sep 17 00:00:00 2001
From: Cary R <cygcary@yahoo.com>
Date: Thu, 29 Nov 2007 10:31:25 -0800
Subject: [PATCH] LD should be based on $CC and not hardcoded to gcc

Fix the default loader so it will be whatever the default C
compiler is ($CC).
---
 iverilog-vpi.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/iverilog-vpi.sh b/iverilog-vpi.sh
index fbccedb..d2512cc 100644
--- a/iverilog-vpi.sh
+++ b/iverilog-vpi.sh
@@ -25,7 +25,7 @@ CXX=@IVCXX@
 CFLAGS="@PIC@ @IVCFLAGS@ -I@INCLUDEDIR@"
 
 # These are used for linking...
-LD=gcc
+LD=$CC
 LDFLAGS32="@SHARED@ -L@LIBDIR@"
 LDFLAGS64="@SHARED@ -L@LIBDIR64@"
 LDFLAGS="$LDFLAGS64"
-- 
1.5.3.4
This commit is contained in:
Cary R 2007-11-29 10:16:07 -08:00 committed by Stephen Williams
parent fde334a5d2
commit 6a5ec481c8
2 changed files with 19 additions and 3 deletions

View File

@ -27,6 +27,15 @@ first source file is named \fIfoo.c\fP, the output becomes
Include the named library in the link of the VPI module. This allows
VPI modules to further reference external libraries.
.TP 8
.B -I\fIdirectory\fP
Add \fIdirectory\fP to the list of directories that will be search for
header files.
.TP 8
.B -D\fIdefine\fP
Define a macro named \fIdefine\fP.
.TP 8
.B --name=\fIname\fP
Normally, the output VPI module will be named after the first source
@ -39,6 +48,10 @@ This flag causes the program to print the install directory for VPI
modules, then exit. It is a convenience for makefiles or automated
plug-in installers.
.TP 8
.B --cflags, --ldflags and -ldlibs
These flags provide compile time information.
.SH "PC-ONLY OPTIONS"
The PC port of \fIiverilog-vpi\fP includes two special flags needed to

View File

@ -46,6 +46,7 @@ OBJ=
LIB=
OUT=
INCOPT=
DEFS=
# --
# parse the command line switches. This collects the source files
@ -90,7 +91,9 @@ do
;;
-I*) INCOPT="$INCOPT $parm"
echo "$parm"
;;
-D*) DEFS="$DEFS $parm"
;;
-m32) LDFLAGS="-m32 $LDFLAGS32"
@ -138,7 +141,7 @@ do
obj=$base".o"
echo "Compiling $src..."
$CC -c -o $obj $CFLAGS $INCOPT $src || compile_errors=`expr $compile_errors + 1`
$CC -c -o $obj $DEFS $CFLAGS $INCOPT $src || compile_errors=`expr $compile_errors + 1`
OBJ="$OBJ $obj"
done
@ -148,7 +151,7 @@ do
obj=$base".o"
echo "Compiling $src..."
$CXX -c -o $obj $CFLAGS $INCOPT $src || compile_errors=`expr $compile_errors + 1`
$CXX -c -o $obj $DEFS $CFLAGS $INCOPT $src || compile_errors=`expr $compile_errors + 1`
OBJ="$OBJ $obj"
done