aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAric Belsito <lluixhi@gmail.com>2018-06-11 10:24:00 -0700
committerAric Belsito <lluixhi@gmail.com>2018-06-11 10:24:00 -0700
commit6996199dda78dc093e6ff2aeb0f80f5f3c23bdfd (patch)
tree7e9e6b351c9b1909ced2c37b2e465fbe1ccf93b7 /dev-libs/elfutils
parentdev-libs/elfutils: version bump to 0.171 (diff)
downloadmusl-6996199dda78dc093e6ff2aeb0f80f5f3c23bdfd.tar.gz
musl-6996199dda78dc093e6ff2aeb0f80f5f3c23bdfd.tar.bz2
musl-6996199dda78dc093e6ff2aeb0f80f5f3c23bdfd.zip
dev-libs/elfutils: bump patch
Diffstat (limited to 'dev-libs/elfutils')
-rw-r--r--dev-libs/elfutils/elfutils-0.171.ebuild2
-rw-r--r--dev-libs/elfutils/files/elfutils-0.171-musl-utils.patch134
2 files changed, 135 insertions, 1 deletions
diff --git a/dev-libs/elfutils/elfutils-0.171.ebuild b/dev-libs/elfutils/elfutils-0.171.ebuild
index 874fd07..b42dcab 100644
--- a/dev-libs/elfutils/elfutils-0.171.ebuild
+++ b/dev-libs/elfutils/elfutils-0.171.ebuild
@@ -35,7 +35,7 @@ src_prepare() {
# Add MUSL patches
epatch "${FILESDIR}"/${PN}-0.170-musl-obstack-fts.patch
epatch "${FILESDIR}"/${P}-musl-libs.patch
- epatch "${FILESDIR}"/${PN}-0.170-musl-utils.patch
+ epatch "${FILESDIR}"/${P}-musl-utils.patch
eautoreconf
diff --git a/dev-libs/elfutils/files/elfutils-0.171-musl-utils.patch b/dev-libs/elfutils/files/elfutils-0.171-musl-utils.patch
new file mode 100644
index 0000000..a6b9684
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.171-musl-utils.patch
@@ -0,0 +1,134 @@
+diff -Naur elfutils-0.171.orig/src/arlib.h elfutils-0.171/src/arlib.h
+--- elfutils-0.171.orig/src/arlib.h 2018-06-11 10:11:02.221181359 -0700
++++ elfutils-0.171/src/arlib.h 2018-06-11 10:21:30.810170102 -0700
+@@ -29,6 +29,12 @@
+ #include <stdint.h>
+ #include <sys/types.h>
+
++#if !defined(ALLPERMS)
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
++#endif
++#if !defined(DEFFILEMODE)
++# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/
++#endif
+
+ /* State of -D/-U flags. */
+ extern bool arlib_deterministic_output;
+diff -Naur elfutils-0.171.orig/src/elfcompress.c elfutils-0.171/src/elfcompress.c
+--- elfutils-0.171.orig/src/elfcompress.c 2018-06-11 10:11:02.221181359 -0700
++++ elfutils-0.171/src/elfcompress.c 2018-06-11 10:21:30.813170102 -0700
+@@ -37,6 +37,13 @@
+ #include "libeu.h"
+ #include "printversion.h"
+
++#if !defined(ALLPERMS)
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
++#endif
++#if !defined(FNM_EXTMATCH)
++# define FNM_EXTMATCH ( 1 << 5)
++#endif
++
+ /* Name and version of program. */
+ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
+
+diff -Naur elfutils-0.171.orig/src/readelf.c elfutils-0.171/src/readelf.c
+--- elfutils-0.171.orig/src/readelf.c 2018-06-11 10:11:02.221181359 -0700
++++ elfutils-0.171/src/readelf.c 2018-06-11 10:21:43.630169873 -0700
+@@ -4771,10 +4771,11 @@
+ return cudie_base (&cu);
+ }
+
++static const char *listptr_name;
++
+ static int
+-compare_listptr (const void *a, const void *b, void *arg)
++compare_listptr (const void *a, const void *b)
+ {
+- const char *name = arg;
+ struct listptr *p1 = (void *) a;
+ struct listptr *p2 = (void *) b;
+
+@@ -4790,21 +4791,21 @@
+ p1->warned = p2->warned = true;
+ error (0, 0,
+ gettext ("%s %#" PRIx64 " used with different address sizes"),
+- name, (uint64_t) p1->offset);
++ listptr_name, (uint64_t) p1->offset);
+ }
+ if (p1->dwarf64 != p2->dwarf64)
+ {
+ p1->warned = p2->warned = true;
+ error (0, 0,
+ gettext ("%s %#" PRIx64 " used with different offset sizes"),
+- name, (uint64_t) p1->offset);
++ listptr_name, (uint64_t) p1->offset);
+ }
+ if (listptr_base (p1) != listptr_base (p2))
+ {
+ p1->warned = p2->warned = true;
+ error (0, 0,
+ gettext ("%s %#" PRIx64 " used with different base addresses"),
+- name, (uint64_t) p1->offset);
++ listptr_name, (uint64_t) p1->offset);
+ }
+ if (p1->attr != p2 ->attr)
+ {
+@@ -4812,7 +4813,7 @@
+ error (0, 0,
+ gettext ("%s %#" PRIx64
+ " used with different attribute %s and %s"),
+- name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr),
++ listptr_name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr),
+ dwarf_attr_name (p2->attr));
+ }
+ }
+@@ -4884,8 +4885,11 @@
+ sort_listptr (struct listptr_table *table, const char *name)
+ {
+ if (table->n > 0)
+- qsort_r (table->table, table->n, sizeof table->table[0],
+- &compare_listptr, (void *) name);
++ {
++ listptr_name = name;
++ qsort (table->table, table->n, sizeof table->table[0],
++ &compare_listptr);
++ }
+ }
+
+ static bool
+diff -Naur elfutils-0.171.orig/src/strip.c elfutils-0.171/src/strip.c
+--- elfutils-0.171.orig/src/strip.c 2018-06-11 10:11:02.221181359 -0700
++++ elfutils-0.171/src/strip.c 2018-06-11 10:21:30.818170102 -0700
+@@ -47,6 +47,13 @@
+ #include <system.h>
+ #include <printversion.h>
+
++#if !defined(ACCESSPERMS)
++# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
++#endif
++#if !defined(FNM_EXTMATCH)
++# define FNM_EXTMATCH ( 1 << 5)
++#endif
++
+ typedef uint8_t GElf_Byte;
+
+ /* Name and version of program. */
+diff -Naur elfutils-0.171.orig/src/unstrip.c elfutils-0.171/src/unstrip.c
+--- elfutils-0.171.orig/src/unstrip.c 2018-06-11 10:11:02.221181359 -0700
++++ elfutils-0.171/src/unstrip.c 2018-06-11 10:21:30.819170102 -0700
+@@ -56,6 +56,15 @@
+ # define _(str) gettext (str)
+ #endif
+
++#ifndef strndupa
++#define strndupa(s, n) \
++ ({const char *__in = (s); \
++ size_t __len = strnlen (__in, (n)) + 1; \
++ char *__out = (char *) alloca (__len); \
++ __out[__len-1] = '\0'; \
++ (char *) memcpy (__out, __in, __len-1);})
++#endif
++
+ /* Name and version of program. */
+ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
+