From d9afbe107fb49ed75504b40c28714898e1bdc23c Mon Sep 17 00:00:00 2001 From: hgutch Date: Tue, 30 May 2023 19:05:04 +0000 Subject: [PATCH] Fix LLVM build with host gcc 13 Building LLVM with a host gcc 13 fails and suggests including in external/apache2/llvm/dist/llvm/include/llvm/Support/Signals.h . Instead of this, joerg@ suggested not modifying the llvm vendor branch but instead working around this in our LLVM build infrastructure. --- .../apache2/llvm/autoconf/include/llvm/Config/config.h.in | 4 ++++ tools/llvm-lib/libLLVMSupport/Makefile | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/external/apache2/llvm/autoconf/include/llvm/Config/config.h.in b/external/apache2/llvm/autoconf/include/llvm/Config/config.h.in index 238a05a706c4..29b1f77d462e 100644 --- a/external/apache2/llvm/autoconf/include/llvm/Config/config.h.in +++ b/external/apache2/llvm/autoconf/include/llvm/Config/config.h.in @@ -3,6 +3,10 @@ #ifndef CONFIG_H #define CONFIG_H +#ifdef __cplusplus +#include +#endif + /* Exported configuration */ #include "llvm/Config/llvm-config.h" diff --git a/tools/llvm-lib/libLLVMSupport/Makefile b/tools/llvm-lib/libLLVMSupport/Makefile index 2ca42e2c6d74..ef5f43aba3ce 100644 --- a/tools/llvm-lib/libLLVMSupport/Makefile +++ b/tools/llvm-lib/libLLVMSupport/Makefile @@ -1,3 +1,5 @@ -# $NetBSD: Makefile,v 1.1 2011/02/06 01:14:16 joerg Exp $ +# $NetBSD: Makefile,v 1.2 2023/05/30 19:05:05 hgutch Exp $ + +CPPFLAGS.Signals.cpp+= -include llvm/Config/config.h .include