summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-07-20 00:35:31 +0100
committerSam James <sam@gentoo.org>2023-07-20 00:55:06 +0100
commitc7245f6d8e9fd787dd859cbb39930e5a1288ef3a (patch)
treeae5d89e746791a04d14fa68ed75701251f27615c /dev-libs/elfutils/files/elfutils-0.189-musl-macros.patch
parentsys-auth/oath-toolkit: add 2.6.9 (diff)
downloadgentoo-c7245f6d8e9fd787dd859cbb39930e5a1288ef3a.tar.gz
gentoo-c7245f6d8e9fd787dd859cbb39930e5a1288ef3a.tar.bz2
gentoo-c7245f6d8e9fd787dd859cbb39930e5a1288ef3a.zip
dev-libs/elfutils: drop stale patches, fix tests w/ mawk
Thank you again to mjw for pointing this out! Drop two stale patches: - elfutils-0.177-disable-large.patch: see https://sourceware.org/bugzilla/show_bug.cgi?id=24158#c3. - elfutils-0.175-disable-biarch-test-PR24158.patch: see https://sourceware.org/bugzilla/show_bug.cgi?id=28975. Add two test patches: - elfutils-0.189-skip-DT_RELR-failing-tests.patch - elfutils-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch Import musl patches to files/ so all of them are in the same place (there's no longer a huge musl patch for error.h so this is fine): - elfutils-0.189-musl-aarch64-regs.patch - elfutils-0.189-musl-macros.patch Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/elfutils/files/elfutils-0.189-musl-macros.patch')
-rw-r--r--dev-libs/elfutils/files/elfutils-0.189-musl-macros.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/dev-libs/elfutils/files/elfutils-0.189-musl-macros.patch b/dev-libs/elfutils/files/elfutils-0.189-musl-macros.patch
new file mode 100644
index 000000000000..97c6c1dcd62e
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.189-musl-macros.patch
@@ -0,0 +1,86 @@
+May not be required (or at least some hunks) with next release (0.186?)
+
+https://git.alpinelinux.org/aports/plain/main/elfutils/musl-macros.patch
+--- a/lib/libeu.h
++++ b/lib/libeu.h
+@@ -31,6 +31,27 @@
+
+ #include <stddef.h>
+ #include <stdint.h>
++#include <unistd.h>
++#include <alloca.h>
++#include <string.h>
++
++#ifndef TEMP_FAILURE_RETRY
++#define TEMP_FAILURE_RETRY(expression) \
++ (__extension__ \
++ ({ long int __result; \
++ do __result = (long int) (expression); \
++ while (__result == -1L && errno == EINTR); \
++ __result; }))
++#endif
++
++#ifndef strndupa
++#define strndupa(s, n) \
++ (__extension__ ({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
+
+ extern void *xmalloc (size_t) __attribute__ ((__malloc__));
+ extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__));
+--- a/src/arlib.h
++++ b/src/arlib.h
+@@ -29,6 +29,16 @@
+ #include <stdint.h>
+ #include <sys/types.h>
+
++#if !defined(ACCESSPERMS)
++# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
++#endif
++#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;
+--- a/src/elfcompress.c
++++ b/src/elfcompress.c
+@@ -37,6 +37,14 @@
+ #include "libeu.h"
+ #include "printversion.h"
+
++#if !defined(FNM_EXTMATCH)
++# define FNM_EXTMATCH 0
++#endif
++
++#if !defined(ALLPERMS)
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
++#endif
++
+ /* Name and version of program. */
+ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
+
+--- a/src/strip.c
++++ b/src/strip.c
+@@ -45,6 +45,14 @@
+ #include <system.h>
+ #include <printversion.h>
+
++#if !defined(FNM_EXTMATCH)
++# define FNM_EXTMATCH 0
++#endif
++
++#if !defined(ACCESSPERMS)
++#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
++#endif
++
+ typedef uint8_t GElf_Byte;
+
+ /* Name and version of program. */