[compiler-rt] 41b83ca - [compiler-rt] Fix build errors with gcc
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 00:11:47 PDT 2024
Author: Kazu Hirata
Date: 2024-08-06T00:11:41-07:00
New Revision: 41b83ca559c402d238e303c0ac233180d60dcd57
URL: https://github.com/llvm/llvm-project/commit/41b83ca559c402d238e303c0ac233180d60dcd57
DIFF: https://github.com/llvm/llvm-project/commit/41b83ca559c402d238e303c0ac233180d60dcd57.diff
LOG: [compiler-rt] Fix build errors with gcc
This patch fixes:
compiler-rt/lib/builtins/crtbegin.c:11:18: error: missing binary
operator before token "("
compiler-rt/lib/builtins/crtbegin.c:53:18: error: missing binary
operator before token "("
compiler-rt/lib/builtins/crtbegin.c:124:18: error: missing binary
operator before token "("
Added:
Modified:
compiler-rt/lib/builtins/crtbegin.c
Removed:
################################################################################
diff --git a/compiler-rt/lib/builtins/crtbegin.c b/compiler-rt/lib/builtins/crtbegin.c
index 8082a8fc8eb5f..d5f7756308b09 100644
--- a/compiler-rt/lib/builtins/crtbegin.c
+++ b/compiler-rt/lib/builtins/crtbegin.c
@@ -8,6 +8,10 @@
#include <stddef.h>
+#ifndef __has_feature
+# define __has_feature(x) 0
+#endif
+
#if __has_feature(ptrauth_init_fini)
#include <ptrauth.h>
#endif
More information about the llvm-commits
mailing list