From c820d2b9b485dc0204fc21ec7ea704e8e8c4c4ec Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Sun, 3 Mar 2024 17:40:20 -0800 Subject: [PATCH 1/3] Don't include subproject headers with -I Use -iquote instead. This prevents our include paths from messing up the system headers depended upon by libstdc++. (The specific problem was syscall.h in fesvr/, which was interfering with libstdc++'s dependence on the system's syscall.h for SYS_futex.) Subproject headers can now be included in the following ways: #include "foo.h" // for a header local to this subproject #include " // for a header in another subproject But no longer: #include // for a header in any subproject As a special case, libfdt needs itself to be added to the -I path, because their coding style is to use angle brackets for local headers. --- Makefile.in | 2 +- fdt/fdt.mk.in | 2 ++ riscv/riscv.mk.in | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index dc70893e71..f90159e924 100644 --- a/Makefile.in +++ b/Makefile.in @@ -69,7 +69,7 @@ install_exes_dir := $(INSTALLDIR)/bin sprojs := @subprojects@ sprojs_enabled := @subprojects_enabled@ -sprojs_include := -I. -I$(src_dir) $(addprefix -I$(src_dir)/, $(sprojs_enabled)) +sprojs_include := -iquote . -I$(src_dir) $(addprefix -iquote $(src_dir)/, $(sprojs_enabled)) VPATH := $(addprefix $(src_dir)/, $(sprojs_enabled)) #------------------------------------------------------------------------- diff --git a/fdt/fdt.mk.in b/fdt/fdt.mk.in index 99e7639f45..64d06ac018 100644 --- a/fdt/fdt.mk.in +++ b/fdt/fdt.mk.in @@ -15,3 +15,5 @@ fdt_c_srcs = \ fdt_empty_tree.c \ fdt_addresses.c \ fdt_overlay.c \ + +fdt_CFLAGS = -I$(src_dir)/fdt diff --git a/riscv/riscv.mk.in b/riscv/riscv.mk.in index 04747c99ab..df557f57d8 100644 --- a/riscv/riscv.mk.in +++ b/riscv/riscv.mk.in @@ -7,7 +7,7 @@ riscv_subproject_deps = \ fesvr \ softfloat \ -riscv_CFLAGS = -fPIC +riscv_CFLAGS = -fPIC -I$(src_dir)/fdt riscv_install_shared_lib = yes From 460d3820d0d4e8abbf8613ccf47aaed061665d88 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Sun, 3 Mar 2024 17:39:14 -0800 Subject: [PATCH 2/3] Explicitly capture "this" in lambdas Suppresses a warning on newer compilers for -std=c++20. --- riscv/interactive.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/riscv/interactive.cc b/riscv/interactive.cc index d9fb39b41a..e32c728a21 100644 --- a/riscv/interactive.cc +++ b/riscv/interactive.cc @@ -413,7 +413,7 @@ void sim_t::interactive_run(const std::string& cmd, const std::vector& args) From 5395961fa57129b4929e17a279ad75dfa47faebe Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Sun, 3 Mar 2024 17:47:21 -0800 Subject: [PATCH 3/3] Bump to Ubuntu 22.04 --- .github/workflows/continuous-integration.yml | 2 +- .github/workflows/debug-smoke.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index ecb0a6c43e..88facc8158 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -18,7 +18,7 @@ on: jobs: test: name: Test Spike build (Ubuntu) - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/debug-smoke.yml b/.github/workflows/debug-smoke.yml index 2b907a1158..090e4d97c4 100644 --- a/.github/workflows/debug-smoke.yml +++ b/.github/workflows/debug-smoke.yml @@ -13,7 +13,7 @@ on: jobs: test: name: Test debug (Ubuntu) - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2