[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] lib: Use GCC compatible stdarg.h in TINYCC
From: |
Ekaitz Zarraga |
Subject: |
[PATCH] lib: Use GCC compatible stdarg.h in TINYCC |
Date: |
Sun, 08 Oct 2023 22:54:38 +0000 |
>From c288c35657eed1cce7d7f7cd920d99a5e1d19881 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Mon, 9 Oct 2023 00:51:17 +0200
Subject: [PATCH] lib: Use GCC compatible stdarg.h in TINYCC
* include/stdarg.h: Include __TINYC__ in the GCC style argument control
via __builtin* family
---
include/stdarg.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/stdarg.h b/include/stdarg.h
index 5e4f5533..090aebe1 100644
--- a/include/stdarg.h
+++ b/include/stdarg.h
@@ -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)
--
2.41.0
- [PATCH] lib: Use GCC compatible stdarg.h in TINYCC,
Ekaitz Zarraga <=