Skip to content

Fix building atop for TCC compiler and others C compilers#375

Open
GermanAizek wants to merge 1 commit intoAtoptool:masterfrom
GermanAizek:tcc-compiler
Open

Fix building atop for TCC compiler and others C compilers#375
GermanAizek wants to merge 1 commit intoAtoptool:masterfrom
GermanAizek:tcc-compiler

Conversation

@GermanAizek
Copy link
Copy Markdown
Contributor

@GermanAizek GermanAizek commented May 2, 2026

Clang, GCC, TCC, TDM-GCC successful building. I also used offsetof() standard, which is accepted by all compilers, instead of the STROFFSET() macro.

https://man7.org/linux/man-pages/man3/offsetof.3.html

My experiments on 2 CPUs Xeon E5-2699v3 (72 threads): I am surprised by the compilation speed on TCC, as well as equivalent resource consumption on monitoring

  • TCC 1s compilation
  • Clang 5s compilation
  • GCC 6s compialtion

I think Gentoo users will idolize Fabrice Bellard.

Install tcc compiler easy apt install tcc

Wiki: https://en.wikipedia.org/wiki/Tiny_C_Compiler
Official site: https://bellard.org/tcc/

tcc_htop gcc_htop clang_htop

Clang, GCC, TCC, TDM-GCC successful building.

My experiments on 2 CPUs Xeon E5-2699v3 (72 threads):
I am surprised by the compilation speed on TCC, as well as the resource consumption on monitoring
- TCC 1s compilation
- Clang 5s compilation
- GCC 6s compialtion

Wiki: https://en.wikipedia.org/wiki/Tiny_C_Compiler
Official site: https://bellard.org/tcc/
@Atoptool
Copy link
Copy Markdown
Owner

Atoptool commented May 2, 2026

What is the purpose of adding the regex.h file?

@GermanAizek
Copy link
Copy Markdown
Contributor Author

What is the purpose of adding the regex.h file?

For compability with TCC, TDM-GCC and GCC < 4.3.

@GermanAizek
Copy link
Copy Markdown
Contributor Author

What is the purpose of adding the regex.h file?

I'll show compile error later because of which I didn't intend to #include <regex.h>.
Install tcc compiler easy apt install tcc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants