1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00

devel/dwz: Update to 0.14

PR:		254176
Submitted by:	Brian Callahan <bcallah@openbsd.org> (maintainer)
This commit is contained in:
Li-Wen Hsu 2021-03-10 13:30:04 +00:00
parent 7891882d0c
commit 1ffeb40d6f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=567999
8 changed files with 48 additions and 62 deletions

View File

@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= dwz
DISTVERSION= 0.13
DISTVERSION= 0.14
CATEGORIES= devel
MASTER_SITES= https://sourceware.org/ftp/dwz/releases/
@ -11,6 +11,8 @@ COMMENT= DWARF optimization and duplicate removal tool
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING3
ALL_TARGET= dwz
WRKSRC= ${WRKDIR}/${PORTNAME}
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1586106922
SHA256 (dwz-0.13.tar.gz) = 05166ad9d3173e92a517ef94aa2b149bca7d717a8c2ea88e28e4e39670c491ec
SIZE (dwz-0.13.tar.gz) = 143279
TIMESTAMP = 1615329145
SHA256 (dwz-0.14.tar.gz) = 33006eab875ff0a07f13fc885883c5bd9514d83ecea9f18bc46b5732dddf0d1f
SIZE (dwz-0.14.tar.gz) = 186623

View File

@ -1,6 +1,6 @@
--- Makefile.orig 2019-10-02 10:26:03.011230367 -0400
+++ Makefile 2020-04-05 14:21:31.102940000 -0400
@@ -1,22 +1,17 @@
--- Makefile.orig 2021-03-08 07:56:18 UTC
+++ Makefile
@@ -1,23 +1,20 @@
-ifneq ($(srcdir),)
-VPATH = $(srcdir)
-else
@ -8,47 +8,31 @@
-endif
-CFLAGS = -O2 -g
-DWZ_VERSION := $(shell cat $(srcdir)/VERSION)
-override CFLAGS += -Wall -W -D_FILE_OFFSET_BITS=64 -DDWZ_VERSION='"$(DWZ_VERSION)"'
-override CFLAGS += -Wall -W -D_FILE_OFFSET_BITS=64 \
- -DDWZ_VERSION='"$(DWZ_VERSION)"' $(shell cat $(srcdir)/COPYRIGHT_YEARS)
-prefix = /usr
+srcdir = .
+CFLAGS ?= -O2 -g
+DWZ_VERSION != cat $(srcdir)/VERSION
+CFLAGS += -D_FILE_OFFSET_BITS=64 -DDWZ_VERSION='"$(DWZ_VERSION)"'
+prefix = ${PREFIX}
+CFLAGS += -DDWZ_VERSION='"$(DWZ_VERSION)"'
+CYEARS != cat $(srcdir)/COPYRIGHT_YEARS
+CFLAGS += $(CYEARS)
+prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
datarootdir = $(prefix)/share
-mandir = $(datarootdir)/man
-OBJECTS = dwz.o hashtab.o sha1.o dwarfnames.o
-dwz: $(OBJECTS)
- $(CC) $(LDFLAGS) -o $@ $^ -lelf
-install: dwz
- install -D dwz $(DESTDIR)$(bindir)/dwz
- install -D -m 644 $(srcdir)/dwz.1 $(DESTDIR)$(mandir)/man1/dwz.1
+mandir = $(prefix)/man
+OBJECTS = dwz.o hashtab.o sha1.o dwarfnames.o obstack.o
+all: $(OBJECTS)
+ $(CC) $(LDFLAGS) -o dwz ${OBJECTS} -lelf
+install: all
+ install -c -s dwz $(DESTDIR)$(bindir)/dwz
+ install -c -m 644 $(srcdir)/dwz.1 $(DESTDIR)$(mandir)/man1/dwz.1
dwz: $(OBJECTS)
- $(CC) $(LDFLAGS) -o $@ $^ -lelf
+ $(CC) $(LDFLAGS) -o $@ $(OBJECTS) -lelf
install: dwz
- install -D dwz $(DESTDIR)$(bindir)/dwz
- install -D -m 644 $(srcdir)/dwz.1 $(DESTDIR)$(mandir)/man1/dwz.1
+ install dwz $(DESTDIR)$(bindir)/dwz
+ install -m 644 $(srcdir)/dwz.1 $(DESTDIR)$(mandir)/man1/dwz.1
clean:
rm -f $(OBJECTS) *~ core* dwz $(TEST_EXECS) $(DWZ_TEST_SOURCES) \
dwz.log dwz.sum
@@ -51,7 +46,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:
@@ -84,7 +79,7 @@ varval:
# WARNING: Couldn't find the global config file.
DEJAGNU ?= /dev/null
-check: dwz $(TEST_EXECS)
+check: all $(TEST_EXECS)
mkdir -p testsuite-bin
cd testsuite-bin; ln -sf $(PWD)/dwz .
export DEJAGNU=$(DEJAGNU); \

View File

@ -1,5 +1,5 @@
--- dwz.c.orig 2019-10-02 10:26:03.015230341 -0400
+++ dwz.c 2020-04-05 14:12:16.054408000 -0400
--- dwz.c.orig 2021-03-09 22:33:26 UTC
+++ dwz.c
@@ -20,11 +20,11 @@
#include <assert.h>
@ -13,18 +13,18 @@
#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"
@@ -136,6 +136,29 @@ dwz_oom (void)
longjmp (oom_buf, 1);
}
@@ -165,6 +165,29 @@ report_progress (void)
/* Where to longjmp on OOM. */
static jmp_buf oom_buf;
+/* error () wrapper based on the Linux manual page at
+ http://man7.org/linux/man-pages/man3/error.3.html. */
@ -49,10 +49,10 @@
+ exit (status);
+}
+
/* General obstack for struct dw_cu, dw_die, also used for temporary
vectors. */
static struct obstack ob;
@@ -10300,7 +10323,7 @@ fdopen_dso (int fd, const char *name)
/* 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. */
@@ -13723,7 +13746,7 @@ fdopen_dso (int fd, const char *name)
int i;
DSO *dso = NULL;
@ -61,7 +61,7 @@
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;
}
@ -70,7 +70,7 @@
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;
}
@ -79,7 +79,7 @@
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
}
}
@ -88,7 +88,7 @@
{
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;
}
@ -97,7 +97,7 @@
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;

View File

@ -1,5 +1,5 @@
--- hashtab.c.orig 2019-10-02 10:26:03.003230419 -0400
+++ hashtab.c 2020-04-05 14:12:16.089254000 -0400
--- hashtab.c.orig 2021-03-08 07:56:18 UTC
+++ hashtab.c
@@ -37,8 +37,8 @@ Boston, MA 02110-1301, USA. */
#include <stdio.h>
#include "hashtab.h"

View File

@ -1,5 +1,5 @@
--- obstack.c.orig 2020-04-05 14:12:16.123238000 -0400
+++ obstack.c 2020-04-05 14:12:16.161009000 -0400
--- obstack.c.orig 2021-03-09 22:36:58 UTC
+++ obstack.c
@@ -0,0 +1,511 @@
+/* obstack.c - subroutines used implicitly by object stack macros
+ Copyright (C) 1988,89,90,91,92,93,94,96,97 Free Software Foundation, Inc.

View File

@ -1,5 +1,5 @@
--- obstack.h.orig 2020-04-05 14:12:16.193157000 -0400
+++ obstack.h 2020-04-05 14:12:16.233805000 -0400
--- obstack.h.orig 2021-03-09 22:36:58 UTC
+++ obstack.h
@@ -0,0 +1,547 @@
+/* obstack.h - object stack macros
+ Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,

View File

@ -1,5 +1,5 @@
--- sha1.c.orig 2019-10-02 10:26:03.003230419 -0400
+++ sha1.c 2020-04-05 14:12:16.269464000 -0400
--- sha1.c.orig 2021-03-08 07:56:18 UTC
+++ sha1.c
@@ -27,9 +27,9 @@
#include <stddef.h>