Fix building htop for TCC compiler and experiments for Gentoo users#1978
Fix building htop for TCC compiler and experiments for Gentoo users#1978BenBE merged 1 commit intohtop-dev:mainfrom
Conversation
|
Can you quickly describe the problem when building with TCC without this patch? |
@BenBE, this commit fix it. full log |
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 3s compilation - Clang 12s compilation - GCC 15s compialtion Wiki: https://en.wikipedia.org/wiki/Tiny_C_Compiler Official site: https://bellard.org/tcc/
|
@GermanAizek @BenBE I know this one is merged, but I have a question: How can TCC optimize out the If there's no prototype for In other words, the AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[],
[[return __builtin_ctz(1U); /* Supported in GCC 3.4 or later */]]
)],
AC_DEFINE([HAVE_BUILTIN_CTZ], 1, [Define to 1 if the compiler supports '__builtin_ctz' function.])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)Yeah, a Would @GermanAizek like to help test out if this change work on checking TCC? (I can file a separate PR for this change.) |
My experiments on 2 CPUs Xeon E5-2699v3 (72 threads):
Wow! I am surprised by the compilation speed on TCC, as well as the resource consumption on monitoring
Building with -DNDEBUG macro by default.
I think Gentoo users will idolize Fabrice Bellard.
Install
tcccompiler easyapt install tccWiki: https://en.wikipedia.org/wiki/Tiny_C_Compiler
Official site: https://bellard.org/tcc/