>>>>> "ew" == Edi Weitz <[EMAIL PROTECTED]> writes:
ew> Are the -fPIC and -shared flags sufficient to create a DSO (on Linux) ew> or was I just lucky? that's the right procedure. -fPIC tells gcc to generate position-independent code, so that the shared library can be loaded at any base address, and -shared tells the linker to create a shared library. On Solaris, the "-G" option to the system linker generates a shared library (IIRC). ew> I think this should be added to the "Tips and Tricks" section of ew> <http://www.cons.org/cmucl/doc/index.html>. I haven't tested it on other platforms, but if it also works on Solaris and FreeBSD, we can fix CMUCL to do this automatically. We might also provide a way of asking CMUCL to forget all foreign code references, so that you can still dump a "clean" image. ew> My 'main' function SURVEY::CREATE-RESULT-PAGE happened to return an ew> arbitrary string on success but it looks like in batch mode it must ew> return 0 in order to feed UNIX:UNIX-EXIT. Otherwise I get ew> ew> [EMAIL PROTECTED]:~/survey > lisp -core survey.core ew> ew> Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER: ew> "</body></html>" is not of type (SIGNED-BYTE 32) true: in batch mode, the result of the init-function is your program's exit status, so it should be an unsigned-byte. (exit(3) accepts an integer, but LOGANDs it with 255). We should add that to the documentation. ew> (UNIX:UNIX-EXIT 1 "</body></html>")[:EXTERNAL] ew> And why does it look like UNIX:UNIX-EXIT accepts two arguments in the ew> debugger output above? The docstring says it only take one (optional) ew> argument. this is an artifact of the debugger: the [:EXTERNAL] indicates that the corresponding stack frame is for the function's external entry point. In this case the first value is the number of arguments. -- Eric Marsden <URL:http://www.laas.fr/~emarsden/>
