tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Use TCC with GSL under Windows


From: Daniel Glöckner
Subject: Re: [Tinycc-devel] Use TCC with GSL under Windows
Date: Wed, 12 Oct 2016 00:49:37 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hi Xianwen,

On Tue, Oct 11, 2016 at 11:43:40PM +0200, Chen, Xianwen wrote:
> I have been very impressed by the size of exe's that TCC produces in
> Windows. For the simple hello_world.c, TCC produces an exe of 2 KB, while
> mingw-w64 produces an exe of 164 KB. Therefore, I would like to continue to
> learn to use TCC.

I'm pretty sure I've used MinGW to generate executables that small,
although that was probably 16 years ago.

Try to pass -s to GCC and don't use -g to get rid of symbol tables and
debugging information. Most of the time TCC generates more code than GCC,
especially when GCC is called with -Os.

The linker of MinGW might enforce different section alignments than TCC.
But that should add less than 10 kB of padding, regardless of the code
size.

Best regards,

  Daniel



reply via email to

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