[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] POSIX compliance; spaces not supported with -l for libs

From: John Scott
Subject: [Tinycc-devel] POSIX compliance; spaces not supported with -l for libs
Date: Sat, 04 Jul 2020 18:15:27 -0400


I was checking if tcc conforms to the POSIX standard for a C99 compiler [1], 
particularly to make the case for implementing a generic POSIX C compiler 
backend in Meson [2]. In the meantime, tcc can't be used for building. There 
is concern that small compilers all have their own caveats, and tinycc's seem 

POSIX says a space after -l—and all flags for that matter—is okay, but tcc 
doesn't accept this:
$ tcc hello.c -l c
tcc: error: library '' not found

It also doesn't handle a space after -O. Fortunately -D, -I, -L, and -U all 
tolerate this.

For completeness here's another discrepancy:
* tcc errors with -lxnet or -ltrace, but so do gcc and Clang.

Please let me know if there's anything I can do to help, and thanks for 
working on tinycc!

[1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html
[2] https://github.com/mesonbuild/meson/issues/5406

Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]