Andreas Sandberg has submitted this change and it was merged. ( https://gem5-review.googlesource.com/6641 )

Change subject: scons, tests: Fix occasional linking error
......................................................................

scons, tests: Fix occasional linking error

There are some cases where scons incorrectly adds the same object
multiple times to the linker command line. This seems to be caused by
the test's source list being updated in place when determining test
framework dependencies. Fix this by explicitly copying the source list
and manipulate the copy.

Without this change, the following command fails:
scons ./build/ARM/unittests.opt/base/pixeltest.xml

Whereas this command succeeds:
scons ./build/ARM/base/pixeltest.opt

Change-Id: I642efdf9d62a5478e49ba51efe1a3a5ba453e21f
Signed-off-by: Andreas Sandberg <andreas.sandb...@arm.com>
Reviewed-by: Jack Travaglini <giacomo.travagl...@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/6641
Reviewed-by: Jason Lowe-Power <ja...@lowepower.com>
Reviewed-by: Gabe Black <gabebl...@google.com>
---
M src/SConscript
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  Andreas Sandberg: Looks good to me, approved



diff --git a/src/SConscript b/src/SConscript
index a98fbc4..1c53160 100755
--- a/src/SConscript
+++ b/src/SConscript
@@ -1092,7 +1092,7 @@
     gtestlib_sources = Source.all.with_tag('gtest lib')
     gtest_out_dir = Dir(new_env['BUILDDIR']).Dir('unittests.%s' % label)
     for test in GTest.all:
-        test_sources = test.sources
+        test_sources = list(test.sources)
         if not test.skip_lib:
             test_sources += gtestlib_sources
         for f in test.filters:

--
To view, visit https://gem5-review.googlesource.com/6641
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I642efdf9d62a5478e49ba51efe1a3a5ba453e21f
Gerrit-Change-Number: 6641
Gerrit-PatchSet: 2
Gerrit-Owner: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Assignee: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to