From 047e2e12b064e8e872b3a1c6aa38236b00d0104a Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 9 May 2025 20:14:09 +0200 Subject: [PATCH] fixes include issue in LLVM vm_base vm_base.h needs to be included before gdb_session.h as termios.h (via boost and gdb_server) has a define which clashes with a variable name in ConstantRange.h (via iss/llvm/vm_base.h) --- gen_input/templates/llvm/CORENAME.cpp.gtl | 8 +++++--- src/vm/llvm/vm_tgc5c.cpp | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gen_input/templates/llvm/CORENAME.cpp.gtl b/gen_input/templates/llvm/CORENAME.cpp.gtl index 2a6b4e5..2c70e42 100644 --- a/gen_input/templates/llvm/CORENAME.cpp.gtl +++ b/gen_input/templates/llvm/CORENAME.cpp.gtl @@ -31,12 +31,14 @@ *******************************************************************************/ // clang-format off #include +// vm_base needs to be included before gdb_session as termios.h (via boost and gdb_server) has a define which clashes with a variable +// name in ConstantRange.h +#include +#include #include #include -#include -#include -#include #include +#include <%def fcsr = registers.find {it.name=='FCSR'} if(fcsr != null) {%> #include <%}%> diff --git a/src/vm/llvm/vm_tgc5c.cpp b/src/vm/llvm/vm_tgc5c.cpp index 3253990..b607f0a 100644 --- a/src/vm/llvm/vm_tgc5c.cpp +++ b/src/vm/llvm/vm_tgc5c.cpp @@ -31,10 +31,12 @@ *******************************************************************************/ // clang-format off #include +// vm_base needs to be included before gdb_session as termios.h (via boost and gdb_server) has a define which clashes with a variable +// name in ConstantRange.h +#include #include #include #include -#include #include #include