From 874bb1a76091cce44d89f47bf13b9eac53eb2e41 Mon Sep 17 00:00:00 2001 From: Chun-Chen TK Hsu Date: Tue, 21 May 2019 00:38:31 +0800 Subject: [PATCH] scons: Move the marshal binary to the build directory The current marshal binary is in $BUILD/python/ directory which makes the dynamic linker fail to find shared libraries with rpath information when the marshal is executing. Moving $BUILD/python/marshal to $BUILD/marshal solves this problem. This is because the marshal binary is built with the same flags as gem5 binary. And if one adds rpath information with add_local_rpath() in some SConscripts, the marshal binary will also link to those shared libraries and have the same rpath information. So it must be in the same directory as gem5 binary such that the dynamic linker could find those shared libraries with the rpath information. Signed-off-by: Chun-Chen TK Hsu Change-Id: I98d9c3e0180abefe6b2b6a78ee5a96324038eb53 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18888 Reviewed-by: Andreas Sandberg Maintainer: Andreas Sandberg Tested-by: kokoro --- src/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SConscript b/src/SConscript index d21feeac9..d8014b248 100644 --- a/src/SConscript +++ b/src/SConscript @@ -1131,7 +1131,7 @@ env.AlwaysBuild(tags) # Build a small helper that marshals the Python code using the same # version of Python as gem5. This is in an unorthodox location to # avoid building it for every variant. -py_marshal = env.Program('python/marshal.cc')[0] +py_marshal = env.Program('marshal', 'python/marshal.cc')[0] # Embed python files. All .py files that have been indicated by a # PySource() call in a SConscript need to be embedded into the M5 -- 2.30.2