[Top][All Lists]

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

[Tinycc-devel] introduction, patch, and bug report

From: Damian Gryski
Subject: [Tinycc-devel] introduction, patch, and bug report
Date: Mon, 22 Aug 2011 21:06:58 +0200


I've submitted some bug reports and patches for TCC in the past, and I
figured I'd introduce myself before pushing a fix to the mob branch.

My patch adds support for Ubuntu 11.04 x86_64, and possibly others.
Specifically, it fixes the error:

<address@hidden/cvs/tinycc]> cat hw.c
#include <stdio.h>

int main() {
   printf("hello, world\n");
<address@hidden/cvs/tinycc]> ./tcc hw.c
tcc: error: undefined symbol '__libc_csu_fini'
tcc: error: undefined symbol '__libc_csu_init'
tcc: error: undefined symbol '__libc_start_main'
tcc: error: undefined symbol 'printf'

The problem is that Ubuntu (at least) has libs and some includes in
different directories. I've attached the patch for review.  The 'if'
expression in the Makefile could probably be cleaned up.

I was also trying to build Go (golang.org), and encountered a
construct that tcc seems unable to handle, but gcc and clang both deal
with fine.  I managed to trim the code down into a minimal test case:

struct  Optab
        unsigned char   prefix;
        unsigned char   op[20];

        Pf3             = 0xf3,

struct Optab optab[] =
        { 0, Pf3 },

The error I get is:
./parseerror-optab.c:16: error: ',' expected (got "?")

Line 16 is the struct constructor.  It seems to not like using an enum
as an array initializer.


Attachment: ubuntu-64bit.patch
Description: Binary data

reply via email to

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