Richard Cooper has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/57889 )
Change subject: cpu: Fix build for MacOS.
......................................................................
cpu: Fix build for MacOS.
* The value of build environment variable KVM_ISA is serialized into
the generated file `kvm_isa.hh'. This value should be a string, but on
hosts where the KVM headers are not available, the default `None` is
inserted. Changed the default value to the string `""` in this case.
* Added missing include for `std::array`.
Change-Id: I651122cc46fc9c0757f592b05f4b4cab285cb91f
Reviewed-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57889
Reviewed-by: Gabe Black <gabe.bl...@gmail.com>
Maintainer: Gabe Black <gabe.bl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/cpu/kvm/SConsopts
M src/cpu/static_inst.hh
2 files changed, 25 insertions(+), 1 deletion(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/cpu/kvm/SConsopts b/src/cpu/kvm/SConsopts
index 72f2a2e..31f56c5 100644
--- a/src/cpu/kvm/SConsopts
+++ b/src/cpu/kvm/SConsopts
@@ -40,7 +40,9 @@
# we rely on exists since version 2.6.36 of the kernel, but somehow
# the KVM_API_VERSION does not reflect the change. We test for one of
# the types as a fall back.
- conf.env['KVM_ISA'] = None
+ # The default value of KVM_ISA should serialize to a string in the
+ # C++ header and test False in Scons/Python.
+ conf.env['KVM_ISA'] = ''
if not conf.CheckHeader('linux/kvm.h', '<>'):
print("Info: Compatible header file <linux/kvm.h> not found, "
"disabling KVM support.")
diff --git a/src/cpu/static_inst.hh b/src/cpu/static_inst.hh
index 2275598..af5975e 100644
--- a/src/cpu/static_inst.hh
+++ b/src/cpu/static_inst.hh
@@ -42,6 +42,7 @@
#ifndef __CPU_STATIC_INST_HH__
#define __CPU_STATIC_INST_HH__
+#include <array>
#include <bitset>
#include <cstdint>
#include <memory>
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/57889
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I651122cc46fc9c0757f592b05f4b4cab285cb91f
Gerrit-Change-Number: 57889
Gerrit-PatchSet: 4
Gerrit-Owner: Richard Cooper <richard.coo...@arm.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Richard Cooper <richard.coo...@arm.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s