From 7f463b00715461c597130a6b4084a015597b8e3a Mon Sep 17 00:00:00 2001 From: Herman Semenoff Date: Sat, 2 May 2026 11:21:15 +0300 Subject: [PATCH] htop: fix building htop for TCC compiler 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/ --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 768cd4748..04ff1dad1 100644 --- a/configure.ac +++ b/configure.ac @@ -349,10 +349,10 @@ AC_LINK_IFELSE( ) AC_MSG_CHECKING(for __builtin_ctz) -AC_COMPILE_IFELSE( +AC_LINK_IFELSE( [AC_LANG_PROGRAM( [], - [[__builtin_ctz(1); /* Supported in GCC 3.4 or later */]] + [[volatile int test_ctz = __builtin_ctz(1); (void)test_ctz; /* 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),