From: Willy Tarreau Date: Tue, 5 Nov 2024 14:41:57 +0000 (+0100) Subject: BUILD: compiler: define __builtin_prefetch() for tcc X-Git-Tag: v3.1-dev12~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b300db55f6452ae947e39c08d57db23934cf02f0;p=thirdparty%2Fhaproxy.git BUILD: compiler: define __builtin_prefetch() for tcc We're using a few occurrences of __builtin_prefetch() but tcc doesn't know about it so let's give it a dummy definition. Now the code builds and works again with tcc without thread support. --- diff --git a/include/haproxy/compiler.h b/include/haproxy/compiler.h index d8e8a7235b..ba4b12ddca 100644 --- a/include/haproxy/compiler.h +++ b/include/haproxy/compiler.h @@ -264,6 +264,11 @@ #endif #endif +/* Define the missing __builtin_prefetch() for tcc. */ +#if defined(__TINYC__) +#define __builtin_prefetch(addr, ...) do { } while (0) +#endif + #ifndef __GNUC_PREREQ__ #if defined(__GNUC__) && !defined(__INTEL_COMPILER) #define __GNUC_PREREQ__(ma, mi) \