On 2021/03/08 12:27, Stuart Henderson wrote:
> Released today, and amongst others it adds DW_OP (DW_OP_entry_value, 0xa3)
> which I think should fix with LLVM 11 on amd64. (The existing dwz is ok
> on i386 with LLVM 11).

tidier Makefile patch (thanks naddy) -

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/dwz/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile    21 May 2020 12:38:46 -0000      1.4
+++ Makefile    8 Mar 2021 15:39:57 -0000
@@ -1,8 +1,7 @@
 # $OpenBSD: Makefile,v 1.4 2020/05/21 12:38:46 espie Exp $
 
 COMMENT =      DWARF optimization and duplicate removal tool
-DISTNAME =     dwz-0.13
-REVISION =     0
+DISTNAME =     dwz-0.14
 
 CATEGORIES =   devel
 
@@ -21,6 +20,7 @@ DEBUG_PACKAGES =      ${BUILD_PACKAGES}
 ALL_TARGET =   dwz
 
 NO_TEST =      Yes
+FAKE_FLAGS =   mandir=${TRUEPREFIX}/man prefix=${TRUEPREFIX}
 
 WRKDIST =      ${WRKDIR}/dwz
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/dwz/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo    23 Mar 2020 18:22:59 -0000      1.1.1.1
+++ distinfo    8 Mar 2021 15:39:57 -0000
@@ -1,2 +1,2 @@
-SHA256 (dwz-0.13.tar.gz) = BRZq2dMXPpKlF++UqisUm8p9cXqMLqiOKOTjlnDEkew=
-SIZE (dwz-0.13.tar.gz) = 143279
+SHA256 (dwz-0.14.tar.gz) = MwBuq4df8KB/E/yIWIPFvZUU2D7OqfGLxGtXMt3fDR8=
+SIZE (dwz-0.14.tar.gz) = 186623
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/devel/dwz/patches/patch-Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Makefile
--- patches/patch-Makefile      23 Mar 2020 18:22:59 -0000      1.1.1.1
+++ patches/patch-Makefile      8 Mar 2021 15:39:57 -0000
@@ -8,7 +8,7 @@ Convert to bsd make
 Index: Makefile
 --- Makefile.orig
 +++ Makefile
-@@ -1,19 +1,15 @@
+@@ -1,20 +1,16 @@
 -ifneq ($(srcdir),)
 -VPATH = $(srcdir)
 -else
@@ -16,19 +16,19 @@ Index: Makefile
 -endif
 -CFLAGS = -O2 -g
 -DWZ_VERSION := $(shell cat $(srcdir)/VERSION)
--override CFLAGS += -Wall -W -D_FILE_OFFSET_BITS=64 
-DDWZ_VERSION='"$(DWZ_VERSION)"'
--prefix = /usr
+-override CFLAGS += -Wall -W -D_FILE_OFFSET_BITS=64 \
+-      -DDWZ_VERSION='"$(DWZ_VERSION)"' $(shell cat $(srcdir)/COPYRIGHT_YEARS)
 +srcdir = .
 +CFLAGS ?= -O2 -g
 +DWZ_VERSION != cat $(srcdir)/VERSION
-+CFLAGS += -D_FILE_OFFSET_BITS=64 -DDWZ_VERSION='"$(DWZ_VERSION)"'
-+prefix ?= /usr/local
++CFLAGS += -DDWZ_VERSION='"$(DWZ_VERSION)"'
++CFLAGS !+= cat $(srcdir)/COPYRIGHT_YEARS
+ prefix = /usr
  exec_prefix = $(prefix)
  bindir = $(exec_prefix)/bin
  datarootdir = $(prefix)/share
--mandir = $(datarootdir)/man
+ mandir = $(datarootdir)/man
 -OBJECTS = dwz.o hashtab.o sha1.o dwarfnames.o
-+mandir = $(prefix)/man
 +OBJECTS = dwz.o hashtab.o sha1.o dwarfnames.o obstack.o
  dwz: $(OBJECTS)
 -      $(CC) $(LDFLAGS) -o $@ $^ -lelf
@@ -36,12 +36,3 @@ Index: Makefile
  install: dwz
        install -D dwz $(DESTDIR)$(bindir)/dwz
        install -D -m 644 $(srcdir)/dwz.1 $(DESTDIR)$(mandir)/man1/dwz.1
-@@ -51,7 +47,7 @@ DWZ_TEST_SOURCES := $(patsubst %.o,%-for-test.c,$(OBJE
-       sed 's/__GNUC__/NOT_DEFINED/' $< > $@
- 
- dwz-for-test: $(DWZ_TEST_SOURCES)
--      $(CC) $(DWZ_TEST_SOURCES) -O2 -g -lelf -o $@ -Wall -W -DDEVEL \
-+      $(CC) $(DWZ_TEST_SOURCES) -O2 -g -lelf -o $@ -DDEVEL \
-         -D_FILE_OFFSET_BITS=64 -DDWZ_VERSION='"for-test"' -I$(srcdir)
- 
- min:
Index: patches/patch-dwz_c
===================================================================
RCS file: /cvs/ports/devel/dwz/patches/patch-dwz_c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-dwz_c
--- patches/patch-dwz_c 23 Mar 2020 18:22:59 -0000      1.1.1.1
+++ patches/patch-dwz_c 8 Mar 2021 15:39:57 -0000
@@ -20,16 +20,16 @@ Index: dwz.c
  #include <stdbool.h>
  #include <stddef.h>
  #include <stdint.h>
-@@ -34,7 +34,7 @@
- #include <sys/stat.h>
+@@ -36,7 +36,7 @@
  #include <sys/types.h>
+ #include <sys/times.h>
  
 -#include <obstack.h>
 +#include "obstack.h"
  
  #include <gelf.h>
  #include "dwarf2.h"
-@@ -127,6 +127,29 @@
+@@ -165,6 +165,29 @@ report_progress (void)
  /* Where to longjmp on OOM.  */
  static jmp_buf oom_buf;
  
@@ -59,7 +59,7 @@ Index: dwz.c
  /* Handle OOM situation.  If handling more than one file, we might
     just fail to handle some large file due to OOM, but could very well
     handle other smaller files after it.  */
-@@ -10300,7 +10323,7 @@ fdopen_dso (int fd, const char *name)
+@@ -13723,7 +13746,7 @@ fdopen_dso (int fd, const char *name)
    int i;
    DSO *dso = NULL;
  
@@ -68,7 +68,7 @@ Index: dwz.c
    if (elf == NULL)
      {
        error (0, 0, "cannot open ELF file: %s", elf_errmsg (-1));
-@@ -10338,7 +10361,7 @@ fdopen_dso (int fd, const char *name)
+@@ -13761,7 +13784,7 @@ fdopen_dso (int fd, const char *name)
        goto error_out;
      }
  
@@ -77,7 +77,7 @@ Index: dwz.c
  
    memset (dso, 0, sizeof(DSO));
    dso->elf = elf;
-@@ -10829,7 +10852,7 @@ write_dso (DSO *dso, const char *file, struct stat *st
+@@ -14258,7 +14281,7 @@ write_dso (DSO *dso, const char *file, struct stat *st
        free (shstrtab);
        return 1;
      }
@@ -86,7 +86,7 @@ Index: dwz.c
    for (i = 0; i < ehdr.e_phnum; ++i)
      {
        GElf_Phdr *phdr, phdr_mem;
-@@ -10902,7 +10925,7 @@ write_dso (DSO *dso, const char *file, struct stat *st
+@@ -14331,7 +14354,7 @@ write_dso (DSO *dso, const char *file, struct stat *st
        }
      }
  
@@ -95,7 +95,7 @@ Index: dwz.c
      {
        error (0, 0, "%s: elf_update failed", dso->filename);
        unlink (file);
-@@ -12089,7 +12112,7 @@ optimize_multifile (void)
+@@ -15917,7 +15940,7 @@ optimize_multifile (unsigned int *die_count)
        error (0, 0, "Could not create new ELF headers");
        goto fail;
      }
@@ -104,7 +104,7 @@ Index: dwz.c
  
    sha1_init_ctx (&ctx);
    for (i = 0; debug_sections[i].name; i++)
-@@ -12176,7 +12199,7 @@ optimize_multifile (void)
+@@ -16010,7 +16033,7 @@ optimize_multifile (unsigned int *die_count)
    data->d_off = 0;
    data->d_align = 1;
  



Reply via email to