diff --git a/src/systemc/SConsopts b/src/systemc/SConsopts index 4f2ae5c6d8..891431cf76 100644 --- a/src/systemc/SConsopts +++ b/src/systemc/SConsopts @@ -28,6 +28,14 @@ Import('*') from gem5_scons import warning def use_systemc_check(env, warn=False): + import platform + host_isa = platform.machine() + # Disallow compiling systemc if the host ISA is RISC-V. + # The error is described here: https://gem5.atlassian.net/browse/GEM5-1027 + if host_isa.startswith("riscv"): + if warn: + warning('Warning: Systemc may not work on RISC-V.') + return False if env['PLATFORM'] == 'darwin': if warn: warning('Warning: Systemc may not work on Mac OS.')