From 7c326bb2a24ada5ab57662a1719669730e4fc9a8 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Fri, 1 Aug 2025 07:13:59 +1000 Subject: [PATCH] Fix TinyC compilation --- readme.md | 3 +-- third_party/bearssl/config.h | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index cecc55d86..e23955ec5 100644 --- a/readme.md +++ b/readme.md @@ -138,8 +138,7 @@ Setting up TCC: Compiling with TCC: 1. Navigate to the directory with ClassiCube's source code -2. In `ExtMath.c`, change `fabsf` to `fabs` and `sqrtf` to `sqrt` -3. Run `tcc.exe -o ClassiCube.exe src/*.c third_party/bearssl/*.c -lwinmm -lgdi32 -luser32 -lcomdlg32 -lshell32`
+2. Run `tcc.exe -o ClassiCube.exe src/*.c third_party/bearssl/*.c -lwinmm -lgdi32 -luser32 -lcomdlg32 -lshell32`
(Note: You may need to specify the full path to `tcc.exe` instead of just `tcc.exe`) ## Compiling - Linux diff --git a/third_party/bearssl/config.h b/third_party/bearssl/config.h index ff6fabc40..3ef9dbf20 100644 --- a/third_party/bearssl/config.h +++ b/third_party/bearssl/config.h @@ -47,6 +47,11 @@ #define BR_USE_URANDOM 0 #define BR_USE_GETENTROPY 0 +/* intrin.h doesn't exist in older TinyC */ +#if defined __TINYC__ +#define BR_INT128 0 +#endif + /* * When BR_64 is enabled, 64-bit integer types are assumed to be * efficient (i.e. the architecture has 64-bit registers and can