[Tinycc-devel] [PATCH] Update tcc-doc.texi: bring in line with `tcc -hh' output

2025-02-09 Thread remph via Tinycc-devel
Just checking this with the list, if there are no amendments then I'll push it to mob soon --- tcc-doc.texi | 64 tcc.c| 8 +++ 2 files changed, 62 insertions(+), 10 deletions(-) diff --git a/tcc-doc.texi b/tcc-doc.texi index 8d17

[Tinycc-devel] [PATCH 0/3] Adjust linker-related command line options

2025-02-16 Thread remph via Tinycc-devel
Improves compatibility with other toolchains, and allows a single TCC build/install to support multiple targets, eg. glibc and musl. Currently the convention is to build/install TCC twice (see eg. tcc-musl on the AUR). A hack[1] allows an existing TCC to partially support glibc and musl, with cavea

[Tinycc-devel] [PATCH 1/2] Comma-split arguments following -Wp

2025-03-03 Thread remph via Tinycc-devel
Treat `-Wp,-foo,bar' as `-foo bar' rather than `-foo,bar'. Compatible with typical cc; useful when a user is used to a compiler like cproc, which doesn't accept `-MMD -MF file' but does correctly forward `-Wp,-MMD,-MF,file' to the system cpp. `-Wp,-MMD,-MF file' also works. --- libtcc.c | 44 +

[Tinycc-devel] [PATCH 2/2] Split -Wl arguments on commas completely, for parity with -Wp

2025-03-03 Thread remph via Tinycc-devel
Allows eg. -Wl,-I/lib/ld-musl-aarch64.so.1,-nostdlib Before, only -Wl,-opt,arg was allowed. Looks like most of the code to do this was already there, maybe this was the original aim and was forgotten. --- libtcc.c | 20 +--- tcc-doc.texi | 3 +++ tcc.c| 4 ++-- 3 fil

[Tinycc-devel] [PATCH 0/2] Comma-split arguments to -Wp, and -Wl,

2025-03-03 Thread remph via Tinycc-devel
Traditionally, C compiler drivers would take a comma-separated list of arguments to -W[pl], and pass them to a child process. TCC partly emulates this behaviour in places, like accepting arguments to linker options (but not preprocessor options) in the form -Wl,-opt,arg as a synonym for -Wl,-opt=ar

[Tinycc-devel] [PATCH 1/3] Add -Wl, -I and -Wl, -dynamic-linker options

2025-02-16 Thread remph via Tinycc-devel
Compatible with ld.bfd, gold, lld and mold. Also, document existing behaviour of LD_SO environment variable --- libtcc.c | 7 +++ tcc-doc.texi | 5 + tcc.c| 2 ++ tcc.h| 1 + tccelf.c | 4 +++- 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/libtcc.c

[Tinycc-devel] [PATCH 2/3] Fix -Wl, -nostdlib behaviour for compatibility with other compilers

2025-02-16 Thread remph via Tinycc-devel
TCC treats -nostdlib and -Wl,-nostdlib as equivalent, but on other compilers which call a discrete linker, -nostdlib behaves as on tcc (not adding startfiles/libc/endfiles) by modifying the ld command line, but -Wl,-nostdlib adds -nostdlib to the ld cmdline, which stops the linker searching the def

[Tinycc-devel] [PATCH 3/3] Process linker directives beginning with a colon

2025-02-16 Thread remph via Tinycc-devel
eg. -l :crti.o, with the same meaning as for other linkers (search library paths for an exact match) Also clean up some copy/pasting --- libtcc.c | 41 ++--- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/libtcc.c b/libtcc.c index 45133991..21b