Hoa Nguyen has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/47660 )

Change subject: scons: Not compiling with systemc when host is RISCV
......................................................................

scons: Not compiling with systemc when host is RISCV

Compiling gem5 with systemc enabled results in the errors
described in https://gem5.atlassian.net/browse/GEM5-1027.

This change tells scons not to compile gem5 with systemc
when the host ISA is RISC-V.

JIRA: https://gem5.atlassian.net/browse/GEM5-1027

Change-Id: I04e1bc722c9d702472152c9116d89938e8408047
Signed-off-by: Hoa Nguyen <hoangu...@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47660
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Reviewed-by: Gabe Black <gabe.bl...@gmail.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/systemc/SConsopts
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/systemc/SConsopts b/src/systemc/SConsopts
index 4f2ae5c..891431c 100644
--- a/src/systemc/SConsopts
+++ b/src/systemc/SConsopts
@@ -28,6 +28,14 @@
 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.')

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47660
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: I04e1bc722c9d702472152c9116d89938e8408047
Gerrit-Change-Number: 47660
Gerrit-PatchSet: 3
Gerrit-Owner: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.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

Reply via email to