[gem5-dev] Change in gem5/gem5[develop]: scons: Not compiling with systemc when host is RISCV

2021-07-07 Thread Hoa Nguyen (Gerrit) via gem5-dev
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 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47660
Reviewed-by: Jason Lowe-Power 
Reviewed-by: Gabe Black 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
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 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Hoa Nguyen 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: scons: Not compiling with systemc when host is RISCV

2021-07-06 Thread Hoa Nguyen (Gerrit) via gem5-dev
Hoa Nguyen has uploaded this change for review. (  
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 
---
M src/systemc/SConsopts
1 file changed, 6 insertions(+), 0 deletions(-)



diff --git a/src/systemc/SConsopts b/src/systemc/SConsopts
index 4f2ae5c..65451cf 100644
--- a/src/systemc/SConsopts
+++ b/src/systemc/SConsopts
@@ -28,6 +28,12 @@
 from gem5_scons import warning

 def use_systemc_check(env, warn=False):
+import platform
+host_isa = platform.machine()
+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: 1
Gerrit-Owner: Hoa Nguyen 
Gerrit-MessageType: newchange
___
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