Opened 4 weeks ago

Closed 4 weeks ago

#1850 closed defect (fixed)

Chicken doesn't compile with TCC anymore

Reported by: zilti Owned by:
Priority: minor Milestone: 6.0.0
Component: core libraries Version: 6.0.0
Keywords: Cc:
Estimated difficulty:

Description

Using the latest TinyCC from the mob branch. Here's the compilation error:

tcc -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES  -c -Os -fomit-frame-pointer chicken.c -o chicken-static.o ->
In file included from chicken.c:8:
In file included from chicken.h:135:
In file included from /nix/store/wlavaybjbzgllhq11lib6qgr7rm8imgp-glibc-2.39-52-dev/include/complex.h:110:
/nix/store/wlavaybjbzgllhq11lib6qgr7rm8imgp-glibc-2.39-52-dev/include/bits/cmathcalls.h:55: error: _Complex is not yet supported
make[1]: *** [rules.make:156: chicken-static.o] Error 1
make[1]: Leaving directory '/build'
make: *** [rules.make:1041: boot-chicken] Error 2

Change History (1)

comment:1 Changed 4 weeks ago by zilti

Resolution: fixed
Status: newclosed

Fixed with the following patch:

---
 chicken.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/chicken.h b/chicken.h
index 49e38d75..3ad970e9 100644
--- a/chicken.h
+++ b/chicken.h
@@ -94,6 +94,10 @@
 # define C_GNU_ENV
 #endif
 
+#if defined (__TINYC__)
+# define __STDC_NO_COMPLEX__
+#endif
+
 #if defined(__MINGW32__)
 /*
  * XXX This should probably be renamed or changed because it's misleading.
-- 
Note: See TracTickets for help on using tickets.