From 10756e9db44816622239ab48a0fdf91642f688a9 Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Wed, 15 Jun 2016 09:03:36 -0600 Subject: patchelf: update recipe version to version 0.9 This fixes uninative go builds. Without this, native recipes written in go fail to update the runtime linker. Signed-off-by: Dan McGregor --- .../patchelf/patchelf/maxsize.patch | 10 ++++----- .../patchelf/patchelf/skip-empty.patch | 26 ++++++++++++++++++++++ meta/recipes-devtools/patchelf/patchelf_0.8.bb | 13 ----------- meta/recipes-devtools/patchelf/patchelf_0.9.bb | 14 ++++++++++++ 4 files changed, 45 insertions(+), 18 deletions(-) create mode 100644 meta/recipes-devtools/patchelf/patchelf/skip-empty.patch delete mode 100644 meta/recipes-devtools/patchelf/patchelf_0.8.bb create mode 100644 meta/recipes-devtools/patchelf/patchelf_0.9.bb diff --git a/meta/recipes-devtools/patchelf/patchelf/maxsize.patch b/meta/recipes-devtools/patchelf/patchelf/maxsize.patch index cc04a89e69..afc6d30bb0 100644 --- a/meta/recipes-devtools/patchelf/patchelf/maxsize.patch +++ b/meta/recipes-devtools/patchelf/patchelf/maxsize.patch @@ -16,15 +16,15 @@ RP 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/patchelf.cc b/src/patchelf.cc -index 8566ed9..df75593 100644 +index fe51f77..f7cb648 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc -@@ -248,7 +248,7 @@ static void readFile(string fileName, mode_t * fileMode) +@@ -256,7 +256,7 @@ static void readFile(string fileName) + struct stat st; if (stat(fileName.c_str(), &st) != 0) error("stat"); fileSize = st.st_size; - *fileMode = st.st_mode; -- maxSize = fileSize + 8 * 1024 * 1024; +- maxSize = fileSize + 32 * 1024 * 1024; + maxSize = fileSize + 64 * 1024 * 1024; contents = (unsigned char *) malloc(fileSize + maxSize); - if (!contents) abort(); \ No newline at end of file + if (!contents) abort(); diff --git a/meta/recipes-devtools/patchelf/patchelf/skip-empty.patch b/meta/recipes-devtools/patchelf/patchelf/skip-empty.patch new file mode 100644 index 0000000000..f0caa46d92 --- /dev/null +++ b/meta/recipes-devtools/patchelf/patchelf/skip-empty.patch @@ -0,0 +1,26 @@ +From 40a9673d6816f0af68fe194460193b59bfc3ebcc Mon Sep 17 00:00:00 2001 +From: Piotr Gaczkowski +Date: Tue, 3 May 2016 10:01:21 +0200 +Subject: [PATCH] Skip empty section (fixes #66) + +--- + src/patchelf.cc | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/patchelf.cc b/src/patchelf.cc +index 136098f..fe51f77 100644 +--- a/src/patchelf.cc ++++ b/src/patchelf.cc +@@ -684,6 +684,9 @@ void ElfFile::rewriteSectionsExecutable() + for (unsigned int i = 1; i <= lastReplaced; ++i) { + Elf_Shdr & shdr(shdrs[i]); + string sectionName = getSectionName(shdr); ++ if (sectionName == "") { ++ continue; ++ } + debug("looking at section `%s'\n", sectionName.c_str()); + /* !!! Why do we stop after a .dynstr section? I can't + remember! */ +-- +2.8.2 + diff --git a/meta/recipes-devtools/patchelf/patchelf_0.8.bb b/meta/recipes-devtools/patchelf/patchelf_0.8.bb deleted file mode 100644 index 8484a7e589..0000000000 --- a/meta/recipes-devtools/patchelf/patchelf_0.8.bb +++ /dev/null @@ -1,13 +0,0 @@ -SRC_URI = "http://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2 \ - file://maxsize.patch" -LICENSE = "GPLv3" -SUMMARY = "Tool to allow editing of RPATH and interpreter fields in ELF binaries" - -SRC_URI[md5sum] = "5b151e3c83b31f5931b4a9fc01635bfd" -SRC_URI[sha256sum] = "c99f84d124347340c36707089ec8f70530abd56e7827c54d506eb4cc097a17e7" - -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -inherit autotools - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/patchelf/patchelf_0.9.bb b/meta/recipes-devtools/patchelf/patchelf_0.9.bb new file mode 100644 index 0000000000..6f45796c88 --- /dev/null +++ b/meta/recipes-devtools/patchelf/patchelf_0.9.bb @@ -0,0 +1,14 @@ +SRC_URI = "http://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2 \ + file://skip-empty.patch \ + file://maxsize.patch" +LICENSE = "GPLv3" +SUMMARY = "Tool to allow editing of RPATH and interpreter fields in ELF binaries" + +SRC_URI[md5sum] = "d02687629c7e1698a486a93a0d607947" +SRC_URI[sha256sum] = "a0f65c1ba148890e9f2f7823f4bedf7ecad5417772f64f994004f59a39014f83" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +inherit autotools + +BBCLASSEXTEND = "native nativesdk" -- cgit 1.2.3-korg