]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: compiler: define __builtin_prefetch() for tcc
authorWilly Tarreau <w@1wt.eu>
Tue, 5 Nov 2024 14:41:57 +0000 (15:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 5 Nov 2024 14:43:17 +0000 (15:43 +0100)
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.

include/haproxy/compiler.h

index d8e8a7235b463aeef112a63ad3a3815f8beefd33..ba4b12ddca88f26fdd6e8881072e90836eebc688 100644 (file)
 #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) \