gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] Build with minimal libraries?


From: Gaius Mulley
Subject: Re: [Gm2] Build with minimal libraries?
Date: Tue, 23 Jun 2009 12:50:07 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

address@hidden writes:

> I've tried building the recent release of GM2 using gcc-4.1.2,
> in the hope of generating smaller executables.  The patch and
> build works ok, but even with -flib=min and -fno-exceptions
> (? - the other relevant flag, anyway) the binary size for
> hello.mod stays around 220K.  How do I build and run the
> compiler so that it uses only the minimal libraries?
>
> Thanks - Will

Hi Will,

I've just checked in a minor patch for gm2/gm2-libs-min/libc.def
(to add printf).  Can you reproduce this, after building and
installing gm2?

~/GM2$ cat minhello.mod
MODULE minhello ;

FROM libc IMPORT printf ;

BEGIN
   printf("hello world\n")
END minhello.
~/GM2$ gm2 -g -c -flibs=min -fno-exceptions minhello.mod
~/GM2$ gm2 -g -flibs=min -fno-exceptions minhello.mod
~/GM2$ ./a.out
hello world
~/GM2$ size a.out
   text    data     bss     dec     hex filename
   2216     576      32    2824     b08 a.out

regards,
Gaius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]