[clean-list] foreign export for linux?

John van Groningen johnvg at cs.ru.nl
Wed Aug 15 15:25:38 MEST 2007


David Norris wrote:
>The status of support for foreign export is unclear to me; I find no references in the docs, and only tantalizing (and Windows-centric?) mentions on clean-list.

Foreign export is supported on linux. However Clean 2.2 only supports
passing Int arguments and yielding an Int or tuple of Int's.

Patches are available to add support for Real, {#Char}, {#Int} and {#Real} for Windows. I can make similar patches for linux available if you like.
For 64 bit linux this may take more time, because the code for 64 bit windows
cannot be used for 64 bit linux due to differences in calling conventions.

> Can one compile a Clean function into a DSO accessible to a C program on Linux?

Because the Clean compiler cannot generate position independent code on linux,
generating shared libraries with Clean functions is not currently supported.

Kind regards,

John van Groningen


More information about the clean-list mailing list