tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Tinycc-devel Digest, Vol 192, Issue 11


From: Daniel Glöckner
Subject: Re: [Tinycc-devel] Tinycc-devel Digest, Vol 192, Issue 11
Date: Sun, 19 May 2019 01:11:26 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Sat, May 18, 2019 at 10:45:32AM -0700, Ben Hutchinson wrote:
> It requires
> MinGW to run in Windows (I'm a Windows user), so that means that using GCC
> by itself is simply not an option, because it won't run without its MinGW
> dependencies.

The whole point of MinGW is that it uses the C library that is shipped
with Windows.

> This makes GCC very bloated (over 100MB in size), and thus
> not a viable alternative to TCC.

Just compare that to the size of your printer driver.
Or the size of your hard disk...

And precompiled GCC binaries usually also contain compiler backends and
libraries for languages like C++, Objective C, Fortran and Ada.

> Also, what is this "ONE_SOURCE=yes"
> command line option you talk about in GCC?

ONE_SOURCE is a macro in the TinyCC source code. It causes all C files
to be compiled as one huge chunk, allowing the compiler optimize a bit
more.

> The simple solution would be for you (or another developer of TCC) to just
> add a command line switch that when used causes TCC to not use the __stkchk
> function, and thus remove the requirement for this function to exist, and
> also prevent TCC from adding any extra code to the program's main code to
> call this function.

Let me repeat: Code running on Windows might crash if this function is
not called where TinyCC emits a call to it.

If you don't need __chkstk, you are not compiling for Windows and should
not use a TinyCC that is targetting Windows. TinyCC targetting Linux does
not emit calls to __chkstk.

On the other hand, you appear to be able to understand C, so it should
be easy for you to delete the eight lines from x86_64-gen.c and recompile
TinyCC.

Best regards,

  Daniel



reply via email to

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