tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Trouble on x86-64, not windows, not gcc


From: David Mertens
Subject: [Tinycc-devel] Trouble on x86-64, not windows, not gcc
Date: Sat, 9 Jul 2016 16:10:51 -0400

Hello everyone,

When run on Mac systems, I get errors about "incompatible redefinition of 'va_list'". Looking at the source files involved, I'm pretty sure this occurs on x86-64 systems that are neither Windows nor built with gcc. Such systems include 64-bit Macs and BSDs using clang. It might also occur on Solaris, though I've not received any reports from that system yet.

TCC's handling of variable argument lists are spelled out in stdarg.h, with implementation in libtcc1.c. I think that for 64-bit machines, we should also check for clang, and then use clang-compatible definitions. I think I could just check if __llvm__ and/or __clang__ are defined, and then insert the appropriate definitions. Does this sound right? I am a bit out of my depth working on such things, so if anybody has any ideas about how to solve this, I'm all ears.

I'd be happy to work on a solution, but I don't have access to a Mac machine or a BSD system. I'm not interested in going through a full-on BSD installation at this time, so if anybody knows where I could find a pre-canned BSD virtualbox image with working git and cc, I'd be much obliged.

Thanks!
David

--
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan

reply via email to

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