cheriot-baremetal: depend on compiler emitting -D__CHERIOT_BAREMETAL__ The CHERIoT compiler automatically emits a #define for __CHERIOT_BAREMETAL__ when run with -mabi=cheriot-baremetal; adjust accordingly. Change-Id: I9653ca553d8eb937eb563a342643993e1eed4bf3
diff --git a/patches/cheriot-llvm/lib/clang/13.0.0/include/cdefs.h b/patches/cheriot-llvm/lib/clang/13.0.0/include/cdefs.h index cc5ead4..c44f7ed 100644 --- a/patches/cheriot-llvm/lib/clang/13.0.0/include/cdefs.h +++ b/patches/cheriot-llvm/lib/clang/13.0.0/include/cdefs.h
@@ -71,7 +71,7 @@ # define __cheriot_minimum_stack(x) #endif -#ifdef _CHERIOT_BAREMETAL_ +#ifdef __CHERIOT_BAREMETAL__ // NB: --mabi=cheriot-baremetal generates unmangled symbol names for intrinsics #undef __cheri_libcall #define __cheri_libcall
diff --git a/platforms/bancha/sim.mk b/platforms/bancha/sim.mk index 268b435..9279cbc 100644 --- a/platforms/bancha/sim.mk +++ b/platforms/bancha/sim.mk
@@ -44,7 +44,7 @@ cheriot_boot_rom_otp: | $(CHERIOT_OUT_DIR) cd $(MATCHA_SRC_DIR) && \ - bazel build --config=cheriot-baremetal --copt=-D_CHERIOT_BAREMETAL_ \ + bazel build -s --config=cheriot-baremetal \ //sw/device/lib/testing/test_rom:test_rom_no_otp_cheri_fpga_nexus.elf cd $(MATCHA_SRC_DIR) && \ find "bazel-out/" -wholename "*test_rom/test_rom_no_otp_cheri_fpga_nexus.elf" \