Summary

Chicken doesn't compile with TCC anymore

Metadata

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

Changes and comments

[2025-02-03 13:49:11 UTC] zilti changed status from new to closed

[2025-02-03 13:49:11 UTC] zilti set resolution to fixed

[2025-02-03 13:49:11 UTC] zilti wrote:

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.
 --