On Mon, 17 Oct 2016, Michael Matz wrote:
Now, I do agree that we'd want to add a work around for this in tcc. I
think a better work-around than defining __GNUC__ is to define the above
macros instead. __GNUC__ simply has quite some side-effects. (E.g.
after the patch you can't compile programs on some versions of glibc
anymore because it then uses facilities of GNU C that tcc simply doesn't
For the time being I've committed
which restricts the hack to FreeBSD only. If it's necessary for OpenBSD
or NetBSD as well it could be extended. Better would be to restrict the
hack somewhat to only define the necessary macros.
FWIW: the error mode when having __GNUC__ with glibc is that <limits.h>
won't be found, because glibc include_nexts a limits.h that's supposed to
be coming from the compiler, when __GNUC__. TCC doesn't provide one (and
doesn't need to).
Tinycc-devel mailing list