From fcd63746ebd992c88e84bba3471f9967468a0514 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 28 Oct 2023 13:42:48 -0700 Subject: [PATCH] Set rpath via ldflags --- src/relenv_gdb/build.py | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/relenv_gdb/build.py b/src/relenv_gdb/build.py index 2e8bd67..0c06a57 100644 --- a/src/relenv_gdb/build.py +++ b/src/relenv_gdb/build.py @@ -78,6 +78,9 @@ def build_gdb(prefix): dir_name = archive_name.split(".tar")[0] # os.environ["LDFLAGS"] = f"{os.environ['LDFLAGS']} '-Wl,-rpath=$$ORIGIN/../lib'" # os.environ["LDFLAGS"] += f" -Wl,-rpath={os.environ['TOOLCHAIN_PATH']}/{os.environ['TRIPLET']}/sysroot/lib" + os.environ[ + "LDFLAGS" + ] += f" -Wl,-rpath={os.environ['TOOLCHAIN_PATH']}/{os.environ['TRIPLET']}/sysroot/lib" with pushd(src / dir_name): subprocess.run( [ @@ -90,22 +93,22 @@ def build_gdb(prefix): ) subprocess.run(["make"]) # subprocess.run(["patchelf", "--add-rpath", "$ORIGIN/../lib", "gdb/gdb"]) - subprocess.run( - [ - "patchelf", - "--add-rpath", - f"{os.environ['TOOLCHAIN_PATH']}/{os.environ['TRIPLET']}/sysroot/lib", - "gdb/gdb", - ] - ) - subprocess.run( - [ - "patchelf", - "--add-rpath", - f"{os.environ['TOOLCHAIN_PATH']}/{os.environ['TRIPLET']}/sysroot/lib", - "gdbserver/gdbserver", - ] - ) + # subprocess.run( + # [ + # "patchelf", + # "--add-rpath", + # f"{os.environ['TOOLCHAIN_PATH']}/{os.environ['TRIPLET']}/sysroot/lib", + # "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"])