I've  also built the gcc version of ghdl for OS X (10.8/10.9/10.9.1) see

https://sourceforge.net/p/ghdl-updates/wiki/OS%20X%20gcc%20ghdl%20build%20instructions/

Instructions for building GHDL (version 0.31dev) with GCC4.8.2 on OS X 10.9

This could likewise go into a makefile with the exception that wget isn't 
native to OS X. 

I'll be making a binary release after a bit of testing and coming up with a 
README describing how the two versions of the GPL interplay (gcc-4.8.2 is 
released under GPLv3).  No fancy packages seem warranted with Apple's 
Gatekeeper and the lack of an actual App.

I may build a relocatable gcc/ghdl before actually releasing. Turns out ghdl 
doesn't find ghdl1 the way it's built. (any gcc version of ghdl).

Where ghdl1 is found in :

/opt/ghdl/gcc-4.8.2/libexec/gcc/x86_64-apple-darwin13.0.0/gcc.4.8.2/ghd1

for gcc build PREFIX = /opt/ghdl/gcc-4.8.2

move ghdl to somewhere else and it still expects:

david_koontz@Macbook: ghdl -a fault_gen.vhdl
ghdl: installation problem: 
/opt/ghdl/gcc-4.8.2/libexec/gcc/x86_64-apple-darwin13.0.0/4.8.2/ghdl1 not found

It's hard coded in drvdir/default_pathes.ads:

   Compiler_Gcc   : constant String :=
     "/opt/ghdl/gcc-4.8.2/libexec/gcc/x86_64-apple-darwin13.0.0/4.8.2/ghdl1";

Which begs the question as to whether gnat's OS_LIB.Locate_Exec_On_Path 
swallows relative paths (see ghdldrv/ghdldrv.adb).

(dependent on something called Normalize_Pathname, which gets the current 
working directory so presumably does support relative paths).

(part of gnatlib, both in gcc-4.8.2/gcc/ada/s-os_lib.adb)

Also the path to the vhdl libraries is given hardcoded in 
drvdir/default_pathes.ads:

   Prefix : constant String :=
     "/opt/ghdl/gcc-4.8.2/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2/vhdl/lib/";


Which doesn't result in an executable being searched for and can be specified 
with GHDL_PREFIX in your environment.

(see ghdldrv/ghdllocal.adb) as well as a  CLI arg (--PREFIX=path) for -a (and 
presumably -e, -c, ...) (see options.adb)

It'd be nice if Prefix could be relative too.

The rest of gcc is supposed to use relative paths.

 --

There's also directions for building mcode versions for OS X or a 32 bit Linux, 
see

https://sourceforge.net/p/ghdl-updates/wiki/build%20mcode%20ghdl/

(And it's a shell script that can be customized for either OS X or Linux.)



_______________________________________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to