Would it be possible to get a more detailed description of how you
built ghdl for OS X? I've been having some difficulties, and the ghdl
installation instructions aren't very complete yet. I'm using the
same version of gcc,GNAT,& ghdl as you described.
sure, this is quite easy. I attached the script I am using to build GHDL
below. Please note the following:
* use the v0.7 version (which is currently the latest)
* configure currently does not work properly. You will need to manually
adjust the vhdl/Makefile.in in order to replace the Linux/x86 code by a
pthread-based implementation for MacOSX:
GRT_LINUX_OBJS=i386.o linux.o
GRT_PTHREAD_OBJS=pthread.o
GRT_ADD_OBJS= $(GRT_PTHREAD_OBJS) grt-cbinding.o grt-cvpi.o
* I am building a patched version of GHDL, that includes a VPI interface
to integrate with IVI. To do so, I need dlcompat (from Fink) linked into
the GHDL runtime. I am patching grt.lst to do this. These changes will
not show up in GHDL before version 0.8
I assume that you are mainly interested in testing GHDL a little bit
before putting further effort into this. I have put a binary
distribution on my website:
http://homepage.mac.com/f.bertram
Go to the Files section, browse to the IVIonOSX folder and get the most
recent dmg-image. This includes an installer that installs IVI complete
with GHDL and Icarus into /Simulator (so that you may easily remove the
tools later). The tools may be installed individually, if you need to
save disk space. Please note that you will also need Tcl/Tk for Aqua
found here, when planning to use IVI:
http://www.maths.mq.edu.au/~steffen/tcltk/TclTkAqua/
Please be advised that this binary distribution is not finished yet, as
we are still working on the GHDL/IVI integration. I hope that you are
nontheless able to get a feeling for it. I am planning to have all this
polished in the next few weeks. If you have any further questions,
please do not hesitate to contact me directly.
Best regards
Felix
email: f-dot-bertram-at-mac-dot-com
#!/bin/sh
#------------------------------------------------------------------------
# Project: GHDL - VHDL simulator
# File: build.command
# Description: Script to build GHDL on Mac OS X
#------------------------------------------------------------------------
root=`dirname $0`
cd ${root}
gcc=gcc-3.3
srcdir=${root}/${gcc}
ghdldir=${root}/ghdl-0.7
objdir=${root}/build
pfx=/Simulator/GHDL
fink=/sw
echo "----------------------------------------"
echo "merge GHDL into GCC"
echo "----------------------------------------"
cp -rf ${ghdldir}/vhdl ${srcdir}/gcc
echo "----------------------------------------"
echo "setup"
echo "----------------------------------------"
CC="cc -no-cpp-precomp"
export CC
mkdir ${objdir}
cd ${objdir}
mkdir ${pfx}/include
mkdir ${pfx}/lib
cp ${fink}/include/dlfcn.h ${pfx}/include/dlfcn.h
cp ${fink}/lib/libdl.0.dylib ${pfx}/lib/libdl.dylib
echo "----------------------------------------"
echo "configure"
echo "----------------------------------------"
${srcdir}/configure \
--enable-languages=vhdl \
--prefix=${pfx} || exit 1
echo "----------------------------------------"
echo "make"
echo "----------------------------------------"
make || exit 1
echo "----------------------------------------"
echo "install"
echo "----------------------------------------"
make install || exit 1
# --------------------------------------------
# fix GHDL build problems
# --------------------------------------------
echo "@/libgrt.a" >
${pfx}/lib/gcc-lib/powerpc-apple-darwin6.6/3.3/vhdl/lib/grt.lst
echo "@/system.o" >>
${pfx}/lib/gcc-lib/powerpc-apple-darwin6.6/3.3/vhdl/lib/grt.lst
echo "${pfx}/lib/libdl.dylib" >>
${pfx}/lib/gcc-lib/powerpc-apple-darwin6.6/3.3/vhdl/lib/grt.lst
cp /usr/lib/ada/system.o
${pfx}/lib/gcc-lib/powerpc-apple-darwin6.6/3.3/vhdl/lib
# --------------------------------------------
# copy additional files
# --------------------------------------------
echo `${pfx}/bin/ghdl --version` | \
sed -e 's/GHDL //' | \
sed -e 's/ \[.*//' > ${pfx}/VERSION.txt
cp -f ${srcdir}/COPYING ${pfx}
cp -f ${srcdir}/COPYING.lib ${pfx}
cp -f ${srcdir}/MAINTAINERS ${pfx}
cp -f ${srcdir}/README ${pfx}
cp -f ${srcdir}/FAQ ${pfx}
cp -f ${srcdir}/BUGS ${pfx}
cp -f ${srcdir}/GNATS ${pfx}
#------------------------------------------------------------------------
# end of file