elfutils: Update from 0.168 to 0.170
authorFredrik Fornwall <fredrik@fornwall.net>
Sun, 10 Dec 2017 00:21:26 +0000 (01:21 +0100)
committerFredrik Fornwall <fredrik@fornwall.net>
Sun, 10 Dec 2017 00:21:26 +0000 (01:21 +0100)
packages/elfutils/build.sh
packages/elfutils/elf_getarsym.c.patch
packages/elfutils/elfcompress.c.patch [deleted file]
packages/elfutils/readelf.c.patch [deleted file]
packages/elfutils/src-ar.c.patch [moved from packages/elfutils/ar.c.patch with 99% similarity]
packages/elfutils/src-readelf.c.patch [new file with mode: 0644]
packages/elfutils/unstrip.c.patch

index 6dbf37e..bd6f28b 100644 (file)
@@ -1,9 +1,8 @@
 TERMUX_PKG_HOMEPAGE=https://sourceware.org/elfutils/
 TERMUX_PKG_DESCRIPTION="ELF object file access library"
-TERMUX_PKG_VERSION=0.168
-TERMUX_PKG_REVISION=2
+TERMUX_PKG_VERSION=0.170
+TERMUX_PKG_SHA256=1f844775576b79bdc9f9c717a50058d08620323c1e935458223a12f249c9e066
 TERMUX_PKG_SRCURL=ftp://sourceware.org/pub/elfutils/${TERMUX_PKG_VERSION}/elfutils-${TERMUX_PKG_VERSION}.tar.bz2
-TERMUX_PKG_SHA256=b88d07893ba1373c7dd69a7855974706d05377766568a7d9002706d5de72c276
 # libandroid-support for langinfo.
 TERMUX_PKG_DEPENDS="libandroid-support, liblzma, libbz2"
 TERMUX_PKG_CLANG=no
@@ -20,6 +19,8 @@ termux_step_pre_configure() {
        # Exposes ACCESSPERMS in <sys/stat.h> which elfutils uses:
        CFLAGS+=" -D__USE_BSD"
 
+       CFLAGS+=" -DFNM_EXTMATCH=0"
+
        # Install argp lib.
        ARGP_FILE=$TERMUX_PKG_CACHEDIR/argp-standalone.1.3.tar.gz
        termux_download http://www.lysator.liu.se/~nisse/archive/argp-standalone-1.3.tar.gz \
index 30a0d59..f49cdb6 100644 (file)
@@ -126,12 +126,3 @@ diff -u -r ../elfutils-0.159/libelf/elf_getarsym.c ./libelf/elf_getarsym.c
  
  static int
  read_number_entries (uint64_t *nump, Elf *elf, size_t *offp, bool index64_p)
-@@ -166,7 +284,7 @@
-       /* We have an archive.  The first word in there is the number of
-        entries in the table.  */
--      uint64_t n;
-+      uint64_t n = 0;
-       size_t off = elf->start_offset + SARMAG + sizeof (struct ar_hdr);
-       if (read_number_entries (&n, elf, &off, index64_p) < 0)
-       {
diff --git a/packages/elfutils/elfcompress.c.patch b/packages/elfutils/elfcompress.c.patch
deleted file mode 100644 (file)
index 36cd5e4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -u -r ../elfutils-0.166/src/elfcompress.c ./src/elfcompress.c
---- ../elfutils-0.166/src/elfcompress.c        2016-03-02 11:25:38.000000000 -0500
-+++ ./src/elfcompress.c        2016-05-04 14:33:03.812183632 -0400
-@@ -166,7 +166,7 @@
-   struct section_pattern *pattern = patterns;
-   while (pattern != NULL)
-     {
--      if (fnmatch (pattern->pattern, name, FNM_EXTMATCH) == 0)
-+      if (fnmatch (pattern->pattern, name, 0) == 0)
-       return true;
-       pattern = pattern->next;
-     }
diff --git a/packages/elfutils/readelf.c.patch b/packages/elfutils/readelf.c.patch
deleted file mode 100644 (file)
index 76dd5c8..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -u -r ../elfutils-0.166/src/readelf.c ./src/readelf.c
---- ../elfutils-0.166/src/readelf.c    2016-03-02 11:25:38.000000000 -0500
-+++ ./src/readelf.c    2016-05-04 14:13:42.967553723 -0400
-@@ -43,6 +43,7 @@
- #include <sys/param.h>
- #include <sys/stat.h>
- #include <signal.h>
-+#include <qsort_r.h>
- #include <system.h>
- #include "../libelf/libelfP.h"
-@@ -6128,7 +6129,7 @@
-       printf ("           %*s%-20s (%s) %s\n",
-             (int) (level * 2), "", dwarf_attr_name (attr),
--            dwarf_form_name (form), nl_langinfo (flag ? YESSTR : NOSTR));
-+            dwarf_form_name (form), flag ? "yes" : "no");
-       break;
-     case DW_FORM_flag_present:
-@@ -6136,7 +6137,7 @@
-       break;
-       printf ("           %*s%-20s (%s) %s\n",
-             (int) (level * 2), "", dwarf_attr_name (attr),
--            dwarf_form_name (form), nl_langinfo (YESSTR));
-+            dwarf_form_name (form), "yes");
-       break;
-     case DW_FORM_exprloc:
-@@ -7646,7 +7647,7 @@
-                     if (readp + 1 > readendp)
-                       goto invalid_data;
-                     val = *readp++;
--                    printf (" %s", nl_langinfo (val != 0 ? YESSTR : NOSTR));
-+                    printf (" %s", val != 0 ? "yes" : "no");
-                     break;
-                   case DW_FORM_string:
similarity index 99%
rename from packages/elfutils/ar.c.patch
rename to packages/elfutils/src-ar.c.patch
index beada08..aabebf5 100644 (file)
@@ -1,7 +1,7 @@
-diff -u -r ../elfutils-0.168/src/ar.c ./src/ar.c
---- ../elfutils-0.168/src/ar.c 2016-12-28 04:32:01.000000000 -0500
-+++ ./src/ar.c 2017-01-14 19:32:22.921445583 -0500
-@@ -1,1528 +1 @@
+diff -u -r ../elfutils-0.170/src/ar.c ./src/ar.c
+--- ../elfutils-0.170/src/ar.c 2017-06-19 16:45:16.000000000 +0200
++++ ./src/ar.c 2017-12-10 01:12:10.164427616 +0100
+@@ -1,1529 +1 @@
 -/* Create, modify, and extract from archives.
 -   Copyright (C) 2005-2012, 2016 Red Hat, Inc.
 -   This file is part of elfutils.
@@ -45,6 +45,7 @@ diff -u -r ../elfutils-0.168/src/ar.c ./src/ar.c
 -#include <sys/time.h>
 -
 -#include <system.h>
+-#include <printversion.h>
 -
 -#include "arlib.h"
 -
diff --git a/packages/elfutils/src-readelf.c.patch b/packages/elfutils/src-readelf.c.patch
new file mode 100644 (file)
index 0000000..19594c3
--- /dev/null
@@ -0,0 +1,11 @@
+diff -u -r ../elfutils-0.170/src/readelf.c ./src/readelf.c
+--- ../elfutils-0.170/src/readelf.c    2017-08-02 14:06:25.000000000 +0200
++++ ./src/readelf.c    2017-12-10 01:14:25.898858528 +0100
+@@ -43,6 +43,7 @@
+ #include <unistd.h>
+ #include <sys/stat.h>
+ #include <signal.h>
++#include <qsort_r.h>
+ #include <libeu.h>
+ #include <system.h>
index 4ae3b8c..a71fd5c 100644 (file)
@@ -1,20 +1,12 @@
 diff -u -r ../elfutils-0.166/src/unstrip.c ./src/unstrip.c
 --- ../elfutils-0.166/src/unstrip.c    2016-01-12 07:49:19.000000000 -0500
 +++ ./src/unstrip.c    2016-05-04 15:22:24.975567076 -0400
-@@ -294,6 +294,7 @@
- static void
- make_directories (const char *path)
- {
-+  size_t substr_len;
-   const char *lastslash = strrchr (path, '/');
-   if (lastslash == NULL)
-     return;
 @@ -303,7 +304,11 @@
    if (lastslash == path)
      return;
  
 -  char *dir = strndupa (path, lastslash - path);
-+  substr_len = lastslash - path;
++  size_t substr_len = lastslash - path;
 +  char *dir = alloca(substr_len+1);
 +  strncpy(dir, path, substr_len);
 +  dir[substr_len] = 0;