From 271ced3b428a77758600018555eb7f33d8461ffb Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Thu, 26 Oct 2023 16:13:18 -0700 Subject: [PATCH] Set rpath of gdbserver so relocate works properly --- src/relenv_gdb/build.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/relenv_gdb/build.py b/src/relenv_gdb/build.py index 8b4ef61..2e8bd67 100644 --- a/src/relenv_gdb/build.py +++ b/src/relenv_gdb/build.py @@ -98,6 +98,14 @@ def build_gdb(prefix): "gdb/gdb", ] ) + subprocess.run( + [ + "patchelf", + "--add-rpath", + f"{os.environ['TOOLCHAIN_PATH']}/{os.environ['TRIPLET']}/sysroot/lib", + "gdbserver/gdbserver", + ] + ) subprocess.run(["make", "install"]) # relenv.relocate.main(os.environ["RELENV_PATH"])