lib: Use GCC compatible stdarg.h for TINYCC.

* include/stdarg.h: Include __TINYC__ in the GCC style argument control
via __builtin* family.
This commit is contained in:
Ekaitz Zarraga 2023-10-09 00:51:17 +02:00 committed by Janneke Nieuwenhuizen
parent f49689d31a
commit 3539ee92a7

View file

@ -27,10 +27,11 @@
#define va_arg8(ap, type) va_arg (ap, type)
#elif __GNUC__ && __riscv
#elif (__GNUC__ || __TINYC__) && __riscv
// GCC on RISC-V always passes arguments in registers. Implementing
// these macros without the use of built-ins would be very involved.
// TINYCC tries to be GCC compatible in this case.
typedef __builtin_va_list va_list;
#define va_start(v, l) __builtin_va_start (v, l)