On 2025-09-12 18:32:12 +0200, noneofyourbusiness wrote:
> Vincent Lefevre <[email protected]> wrote:
> > However, unless tcc has been installed in /usr/local/bin (which is
> > not the case with packages provided by typical Linux distributions
> > or if the user has installed tcc under his home directory), this
> > will not work, at least under Linux.
> 
> > This should be fixed.
> This line achieves this while maintaining compatibility with other C 
> compilers:
>       //usr/bin/env tcc -run "$0" ; exit $?

This should probably be the official recommendation, though I would
rather prefer

  // 2> /dev/null ; exec tcc -run "$0"

so that the shell is replaced by tcc (instead of having tcc run as
a child of the shell, which is just waiting for tcc to exit).

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to