Skip to content

Commit

Permalink
patchelf on debian 11 is too old
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Sep 4, 2024
1 parent 6a47a86 commit 387b6cb
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/relenv_gdb/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ def build_gdb(prefix):
subprocess.run(["make"], check=True)
subprocess.run(["make", "install"], check=True)

# Newer patchelf for now
arch = relenv.common.build_arch()
url = f"https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0-{arch}.tar.gz"
relenv.common.download_url(
url,
src,
)
archive_name = str(src / pathlib.Path(url).name)
relenv.common.extract_archive(str(src), archive_name)
dir_name = archive_name.split(".tar")[0]
patchelf = (pathlib.Path(dir_name) / "bin" / "patchelf").resolve()

os.environ["LDFLAGS"] = f"{os.environ['LDFLAGS']} -lreadline"
url = "https://ftp.gnu.org/gnu/gdb/gdb-15.1.tar.xz"
relenv.common.download_url(
Expand Down Expand Up @@ -128,7 +140,7 @@ def build_gdb(prefix):
print(f"File not found {_}")
subprocess.run(
[
"patchelf",
str(patchelf),
f"--add-rpath={os.environ['TOOLCHAIN_PATH']}/{os.environ['TRIPLET']}/sysroot/lib",
_,
],
Expand Down

0 comments on commit 387b6cb

Please sign in to comment.