I was hoping that somebody might help me with a problem that I've been having implementing foreign sub-programs in Ada. I've stripped it all right back to a simple function which just returns a long_float/real value (just a literal in the code at the moment):
function test (input : long_float) return long_float is
begin
return 325169.5467;
end test;
Now, when GHDL calls this from the VHDL code it produces a list of undefined references (e.g. `__gnat_eh_personality'). If I recompile with "pragma No_Run_Time;" then these all disappear but GHDL returns "exec errror".
As a test I've re-written the function in C:
double test_c (double input) {
return 12476.246;
}
and this works fine, so I'm guessing it's something to do with the way I'm compiling the ada code, the gnat installation or possibly the way GHDL is looking for the ada run time library?
I've tried it all again with the environment variables set thus (as these were previously blank):
ADA_OBJECTS_PATH=/usr/lib/gcc/i486-linux-gnu/4.3/adalib
ADA_INCLUDE_PATH=/usr/lib/gcc/i486-linux-gnu/4.3/adainclude
I've also tried the switch:
--RTS=/usr/lib/gcc/i486-linux-gnu/4.3/
which also made no difference.
I'm running this in Ubuntu 8.10 with GPS version, 4.3~2008.08.09ubuntu1, gnat 4.3.2, GHDL 0.27, GCC 4.3.2 / 4.3.1 (both versions seem to be installed).
Does anybody have any ideas or pointers as to what I'm doing wrong?
Much appreciated
Alex
_______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
