dynamic libs for NEXTSTEP, configure
Gregor Hoffleit
flight at mathi.uni-heidelberg.DE
Thu Feb 20 10:05:46 PST 1997
ok, I think I have dynamic loading working with NEXTSTEP, but: I completely
fail to integrate it in the current configure structure.
What I'm doing with NEXTSTEP are not shared libs, but dynamically loadable
object files (there's no documented way to build shared libs on your own).
What I want know is to statically link at least libkaffe_vm, perhaps
libkaffe_{native,net}, but make loadable modules of sawt and biss. Somewhat
like the module section of Python if you know that. I thinks that's a very
reasonable setup for NEXTSTEP.
For a start, I would be glad if configure set things up like this:
...
ar cr libkaffe_vm.a.0.81 code.o ... seq.o
ranlib libkaffe_vm.a.0.81
...
cc -g -O2 -seglinkedit -all_load -I. -I./../kaffevm -I../../config
-I./../../config -I../../include -o kaffe main.o -L../kaffevm -lkaffe_vm
...
ld -r -o libkaffe_native.o.0.81 ClassLoaderStub.o ... Date.o
ld -r -o libkaffe_net.o.0.81 DatagramSocketStub.o ... SocketOutputStream.o
ld -r -o libkaffe_agent.o.0.81 AgentStub.o
ld -r -o libkaffe_sawt...
[The libext .a for the static libs is mandatory, for the later object files,
the choice of libext is free since there's no standard. Maybe .o would fit
better than .a ?]
The current configure seems to be far away from supporting this: You can only
have all static or all shared, but no mixture.
Currently, the only way to compile like above are configure.in entries:
LIBEXT=.o
LIBSHARE=-r
KAFFEFLAGS="-seglinkedit -all_load"
then you have to run ./configure, in config.status, remove "-lm" from LIBS
manually and rerun config.status; go into kaffevm/Makefile and change LIBEXT
from .o to .a, and finally you can do make.
Another problem: configure does define LIBS=-lm, but NEXTSTEP doesn't need
it. When staying static, the resulting duplicate definition do no harm, but
with the strict "cc -seglinkedit -all_load" and "ld -r" used above, it won't
compile.
All in all, what I'd love to see is a structure like in python where you can
choose for each library if it's to be linked statically or just built
dynamically.
If that's too much work for now, I'd like to have at least support for
linking in libkaffe_vm statically while building the libraries `shared'.
Gregor
---
| Gregor Hoffleit Mathematisches Institut, Uni HD |
| flight at mathi.uni-heidelberg.de INF 288, 69120 Heidelberg, Germany |
| (NeXTmail, MIME) (49)6221 54-5771 fax 54-8312 |
| PGP Key fingerprint = 23 8F B3 38 A3 39 A6 01 5B 99 91 D6 F2 AC CD C7 |
More information about the kaffe
mailing list