Hoa Nguyen has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/47659 )

Change subject: scons: Explicitly add librt to scons
......................................................................

scons: Explicitly add librt to scons

Building gem5 requires linking to librt. Prior to this change, the
SConscript files do not include the librt explicitly, and building
gem5 on the preformatted disk of Ubuntu 21.04 for RISC-V results
in the missing reference to `shm_open`, which is part of librt.

This change tells scons to add librt to all combinations of building
gem5.

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

Change-Id: I461400e3cb7474a80a995b264af2e03b19fea29c
Signed-off-by: Hoa Nguyen <hoangu...@ucdavis.edu>
---
M SConstruct
1 file changed, 3 insertions(+), 0 deletions(-)



diff --git a/SConstruct b/SConstruct
index f3af8ff..5593c17 100755
--- a/SConstruct
+++ b/SConstruct
@@ -698,6 +698,9 @@
     env.Append(CCFLAGS='$CCFLAGS_EXTRA')
     env.Append(LINKFLAGS='$LDFLAGS_EXTRA')

+    # Add librt, which is required by gem5
+    env.Append(LIBS=['rt'])
+
     exports=['env']
     if main['USE_PYTHON']:
         exports.append('marshal_env')

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47659
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: I461400e3cb7474a80a995b264af2e03b19fea29c
Gerrit-Change-Number: 47659
Gerrit-PatchSet: 1
Gerrit-Owner: Hoa Nguyen <hoangu...@ucdavis.edu>
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

Reply via email to