Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Apr 2016 20:40:03 -0700
From:      Waitman Gobble <gobble.wa@gmail.com>
To:        Ben Wiederhake <ben.wiederhake@gmail.com>
Cc:        cpm@fbsd.es, "freebsd-ports@freebsd.org" <ports@freebsd.org>
Subject:   Re: FreeBSD Port: tcc-0.9.26_3
Message-ID:  <CAFuo_fy7gvxDQsn9ueod4T3HSfU8_TRKm4wrpd1n5zT94%2Bypzg@mail.gmail.com>
In-Reply-To: <570EE298.401@gmail.com>
References:  <570EE298.401@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 13, 2016 at 5:21 PM, Ben Wiederhake <ben.wiederhake@gmail.com>
wrote:

> Hello,
>
> "#include <stdint.h>" seems to be impossible with tcc on FreeBSD.
>
> Steps to reproduce:
> Try to compile the following program:
> """
> #include <stdint.h>
> #include <stdio.h>
> int main(void){printf("Hello world\n");}
> """
>
> Excepted results:
> Compilation finishes with no errors.
>
> Actual results:
> """
> In file included from foo.c:1:
> In file included from /usr/include/stdint.h:33:
> In file included from /usr/include/sys/_types.h:33:
> In file included from /usr/include/machine/_types.h:6:
> /usr/include/x86/_types.h:161: error: too many basic types
> """
> And compilation fails.
> In a real life project, it fails at exactly the same spot [2]
>
> Diagnostics from the meatbag (hello!):
> - Using gcc and clang instead works fine.  This must be tcc's fault, not
> system-headers'.
> - On Ubuntu and Debian, tcc 0.9.26 works fine, too.  This must be some
> fault in the compilation, environment, or libraries of tcc, not tcc's code
> itself.
> - The error message stems from line 2510 in tccgen.c [1]. However, I don't
> understand how it got there and where it "counts".
> - This might also be due to a forgotten semicolon [3], which I deem
> inlikely for a system header.
> - Note that tcc is one-pass, so it doesn't even know anything except the
> first line of foo.c.  Thus, tcc is currently unusable for me.
>
> Versions, as far as I can tell:
> - 'tcc -dumpversion' says '0.9.26'.
> - `pkg upgrade` says 'Your packages are up to date.'
> - `uname -a` says 'FreeBSD  10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264:
> Fri Mar 25 02:10:02 UTC 2016'
>
> Regards,
> Ben Wiederhake
>
>
You want to be using the headers provided with tcc?

# tcc -run -I/usr/local/lib/tcc/include test.c
Hello world


-- 
Waitman Gobble
Los Altos California USA
510-830-7975



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFuo_fy7gvxDQsn9ueod4T3HSfU8_TRKm4wrpd1n5zT94%2Bypzg>