Skip to content

Commit

Permalink
update-patchelf
Browse files Browse the repository at this point in the history
Update patchelf to current git version

The current version fixes a bug which broke the ability to strip
binaries with debug symbols:
NixOS/patchelf#117

With the former version of patchelf, I would get "not enough room for
program headers, try linking with -N" when trying to strip the binaries.

This patch brings patchelf in sync with the commit
27ffe8ae871e7a186018d66020ef3f6162c12c69 of patchelf's git
repository.

Also update patchelf's build process to match the logic in upstream's
automake files (thanks to Frédéric Bonnard for the patch to properly use
getconf PAGESIZE).

Bug: https://bugreports.qt.io/browse/PYSIDE-740
Last-Update: 2018-07-09

Gbp-Pq: Name update-patchelf.patch
  • Loading branch information
Debian Qt/KDE Maintainers authored and mitya57 committed Oct 19, 2020
1 parent d785cd0 commit 67ee2ac
Show file tree
Hide file tree
Showing 3 changed files with 1,673 additions and 505 deletions.
13 changes: 12 additions & 1 deletion build_scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,18 @@ def build_patchelf(self):
return
log.info("Building patchelf...")
module_src_dir = os.path.join(self.sources_dir, "patchelf")
build_cmd = ["g++", "{}/patchelf.cc".format(module_src_dir), "-o", "patchelf"]
import subprocess
pagesize = subprocess.check_output("getconf PAGESIZE", shell=True).decode('utf-8').rstrip()
build_cmd = [
"g++",
"-std=c++11",
"-DPAGESIZE=%s" % (pagesize),
'-DPACKAGE_STRING="patchelf"',
"-D_FILE_OFFSET_BITS=64",
"{}/patchelf.cc".format(module_src_dir),
"-o",
"patchelf",
]
if run_process(build_cmd) != 0:
raise DistutilsSetupError("Error building patchelf")
self._patchelf_path = os.path.join(self.script_dir, "patchelf")
Expand Down
Loading

0 comments on commit 67ee2ac

Please sign in to comment.