Re: [ooc-compiler] static binaries
Brought to you by:
mva
|
From: Michael v. A. <mic...@gm...> - 2007-07-03 05:47:20
|
Static linking with v2 should be possible as well. I vaguely remember some discussions about this topic a while back. The PROBLEMS file has this to say, it may be of help: | (Static Linking with libtool 1.5.6) Building a statically linked | program with `--ldflags "-all-static"' may fail due to unresolved | symbols from the math library, like floor(). The reason for this is | that libtool somehow drops the dependency of liboo2c on libm. As a | workaround, locate the installed libtool file liboo2c.la and add `-lm' | to the beginning of the variable `dependency_libs'. -- mva On 02/07/07, texts writer <tex...@go...> wrote: > > 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 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > ooc-compiler mailing list > ooc...@li... > https://lists.sourceforge.net/lists/listinfo/ooc-compiler > |