[ooc-compiler] static binaries
Brought to you by:
mva
|
From: texts w. <tex...@go...> - 2007-07-02 14:15:39
|
Hello.
I have this problem already long time and I suppose it is not doable.
One of the reasons I (as some other people I know) still use oo2c
first branch is that I cannot succeed in static compilations. It is
easy to get a completely static binary which doesn't require libc with
oo2c first version, but seems hard with second.
I have tried both --cflags and --ldflags usage as well as exporting
CFLAGS, LDFLAGS environment variables.
Look, how it works with oo2c-1.5.9 compiled with libs
delorean:~/test/src# cat test.Mod
MODULE test;
BEGIN
END test.
delorean:~/test/src# /usr/local/ooc/bin/oo2c --cflags "-static"
--ldflags "-static" -M test.Mod
cc1: note: obsolete option -I- used, please use -iquote instead
cc1: note: obsolete option -I- used, please use -iquote instead
delorean:~/test/src# ls -lh
total 556K
-rwxr-xr-x 1 root root 518K 2007-07-02 19:05 test
-rw-r--r-- 1 root root 275 2007-07-02 19:05 _test.c
-rw-r--r-- 1 root root 195 2007-07-02 19:04 test.c
-rw-r--r-- 1 root root 652 2007-07-02 19:04 test.d
-rw-r--r-- 1 root root 126 2007-07-02 19:04 test.h
-rw-r--r-- 1 root root 31 2007-06-26 16:53 test.Mod
-rw-r--r-- 1 root root 976 2007-07-02 19:05 _test.o
-rw-r--r-- 1 root root 1.2K 2007-07-02 19:05 test.o
-rw-r--r-- 1 root root 20 2007-07-02 19:04 test.Sym
delorean:~/test/src# ldd test
not a dynamic executable
delorean:~/test/src#
With oo2c version 2 I always get dynamic compiled binary.
Is it possible to compile completely static executable which won't require libc?
Thanks
Norayr
|