[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] __builtin_va_* builtins missing
From: |
Steffen Nurpmeso |
Subject: |
Re: [Tinycc-devel] __builtin_va_* builtins missing |
Date: |
Wed, 31 Oct 2018 21:46:32 +0100 |
User-agent: |
s-nail v14.9.11-76-g38917986 |
Daniel Wingerd wrote in <CAAQy0x2a8yXXZenerY+QWKn7f+GHOZkmzqVqCEps2_k_9w\
address@hidden>:
|I'm working on getting musl to build using TCC and the first problem I
|encountered was that TCC is missing __builtin_va_* builtins. I've
|tried adding it on my own and failed miserably since I don't really
|understand TCC's internals. I do recognize the va_* macros are
|defined in include/stdarg.h but all the C compilers I've checked (even
|Watcom and PCC) define these as builtin functions so it only seems
|right that TCC follow suit instead of expecting special exceptions to
|be made for it (in every libc's stdarg.h).
|
|Explicitly, these need to be added into tcctok.h and implemented in
|tccgen.c in the unary() function.
|__builtin_va_start
|__builtin_va_arg
|__builtin_va_copy
|__builtin_va_end
|
|It shouldn't be a much effort for someone who knows the TCC internals
|since their behavior is clearly defined in TCC's include/stdarg.h.
|
|Is anyone willing to take up this task?
No, because i cannot. I, just like you. But i do not agree,
i think it is terrible that all these things are built into these
huge ones etc. etc. I think it is just fine that these are
defined in C headers, and picked up by all interested parties.
For me the problem goes away if tcc explicitly loads its own ABI
files first, i will attach the patches i use. I know AlpineLinux
ships a tcc package which seemed to work without that, but i do
set C_INCLUDE_PATH and LD_LIBRARY_PATH and i think doing so should
not cause any failures. They are tcc-specific ABI headers in the
end. I think the really right approach would be some kind of
#include_next on top of that, but that i, just like you.
Ciao.
!@ /tmp/tcc.eml
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
tcc.eml
Description: application/mbox