Re: NLFFI in NetBSD
Vesa A Norrman <[email protected]>
| Newsgroups | gmane.comp.lang.sml.smlnj |
|---|---|
| Message-ID | <[email protected]> |
> Ugh, yes. The runtime system (or, more precisely, its makefiles) > have to be modified to support dlopen. So far I have only done > that for Linux and Solaris. I'm sending changes for NetBSD. snip --- src/runtime/objs/mk.x86-netbsd.orig 2004-04-24 11:45:19.000000000 +0000 +++ src/runtime/objs/mk.x86-netbsd 2004-04-24 11:55:38.000000000 +0000 @@ -14,10 +14,10 @@ #CPP = /usr/bin/cpp -P XOBJS = -XLIBS = +XLIBS = ../c-libs/dl/libunix-dynload.a LD_LIBS = BASE_DEFS = -DEFS = $(BASE_DEFS) -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_NETBSD +DEFS = $(XDEFS) $(BASE_DEFS) -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_NETBSD -DDLOPEN TARGET = X86 VERSION = v-x86-netbsd RUNTIME = run.x86-netbsd endsnip With this change NLFFI worked. However NetBSD's include files seem to be too weird for NLFFI to parse. Here is a part that fails: /usr/include/sys/cdefs.h: #if !defined(_STANDALONE) && !defined(_KERNEL) #ifdef __GNUC__ #define __RENAME(x) ___RENAME(x) #else #ifdef __lint__ #define __RENAME(x) __symbolrename(x) #else #error "No function renaming possible" #endif /* __lint__ */ #endif /* __GNUC__ */ #else /* _STANDALONE || _KERNEL */ #define __RENAME(x) no renaming in kernel or standalone environment #endif Does this part need another definition for NLFFI? Vesa ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click