[Tinycc-devel] make test fails on musl libc

2022-10-30 Thread noneofyourbusiness via Tinycc-devel
additionally, the configure script depends on some unportable (not POSIX) methods that leads to musl not being detected, requiring --config-musl to not fail the build testing on alpine should be close enough to reproduce see attached files ./configure --config-musl make make test > test.log

[Tinycc-devel] tcc segfault when using -g and -fcommon

2022-12-11 Thread noneofyourbusiness via Tinycc-devel
on linux [glibc|musl] tcc segfaults at tccdbg.c:1961 when compiling int foo; void bar(void) {} with -c -fcommon -g: tcc -c -fcommon -g test.c I have no idea why s1->sections[sh_num] is NULL in this case. s1->sections[0] is also NULL, sh_num is 10

[Tinycc-devel] initializer element is not constant for float comparison

2023-05-21 Thread noneofyourbusiness via Tinycc-devel
When initializing static variables with the result of float comparisons, tcc errors out. This works fine on clang without warning, therefore I assume this is a bug. The expression -1.0 < 0 should always evaluate to 1, no? See attached code for an example. #define _XOPEN_SOURCE 700 #include

Re: [Tinycc-devel] libtcc without tcclib1 on Emscripten

2023-08-12 Thread noneofyourbusiness via Tinycc-devel
> From: Marcus Ottosson > Subject: [Tinycc-devel] libtcc without tcclib1 on Emscripten > I've had great success with libtcc as a prototyping/scripting language for > my application, however one of my targets is Emscripten which does not have > the ability to dynamically load libraries nor access

Re: [Tinycc-devel] wchar_t conflict on alpine linux (musl)

2023-08-12 Thread noneofyourbusiness via Tinycc-devel
You can rebuild tcc after changing tccdefs.h with the matching type Attached is a patch, but I'm not sure whether it's correct. on musl aarch64, both wchar_t and wint_t are unsigned int >From 736ce206b8cd4e6c0d5e524c02cc674d05c28242 Mon Sep 17 00:00:00 2001 From: noneofyourbusiness Date: Sat,

[Tinycc-devel] Adding Xtensa (Zane Asher Post)

2023-11-25 Thread noneofyourbusiness via Tinycc-devel
> Date: Fri, 24 Nov 2023 12:39:27 -0600 > From: Zane Asher Post > To: tinycc-devel@nongnu.org > Subject: [Tinycc-devel] Adding Xtensa > > How can I go about adding Xtensa support to TCC? You can take a look at the other backends (*gen.c, *link.c) for how this is done in tcc. As you can see in

[Tinycc-devel] "tcc -run -" closes stdin so that program itself can't read from stdin

2023-11-29 Thread noneofyourbusiness via Tinycc-devel
> But if I try to read foo.c from stdin then foo.c itself is unable to > read, b.c. stdin is already closed: No, it isn't. As demonstrated in the following code snippet, it's not closed, there is simply nothing else to read from it (tcc reads stdin until EOF). #define _XOPEN_SOURCE 700 #include