resurrecting-open-source-projects / scrot

SCReenshOT - command line screen capture utility
Other
511 stars 51 forks source link

add the TCC compiler to CI #330

Closed guijan closed 1 year ago

guijan commented 1 year ago

It uses the GNU preprocessor and linker, but it will help us with not depending on GCC too much.

N-R-K commented 1 year ago

TCC isn't being maintained by fabrice anymore, it's "mob maintained" at https://repo.or.cz/tinycc.git/ now (just people committing whatever they like, no tagged releases as far as I see).

And looks like debian is still using some old version from 2020 - which was incapable of parsing some valid C99 macros that I was playing around with.

It's nice that scrot is able to build with an old tcc version, but in the future if we hit problems with old tcc not being able to compile valid C99 code, then we probably need to either drop it or switch the CI to some distro that has more updated versions.

N-R-K commented 1 year ago

Also in terms of smaller C compilers, it might be worthwhile to add cproc to the CI. Although it's a C11 compiler, it should be capable of compiling the subset of C99 we're using (especially the fact that we're not using VLAs).

Which also reminds me, we should add -Wvla into one of our CI runs.

guijan commented 1 year ago

https://repo.or.cz/h/mob.html

The mob account (the name a tribute to the paper Mob Software: The Erotic Life of Code) is.a way to enable anonymous push access for your project

Interesting.

Yes, even though I wouldn't migrate to a newer C standard, we should keep compatibility with them anyway. For one, autoconf no longer has a helper macro for setting the compiler to C99, so we're actually compiling in C11 in many places.