lib: Use GCC compatible stdarg.h in TINYCC

* include/stdarg.h: Include __TINYC__ in the GCC style argument control
via __builtin* family
This commit is contained in:
Ekaitz 2023-10-09 00:51:17 +02:00
parent 267a132ca9
commit c288c35657
1 changed files with 2 additions and 1 deletions

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)