Index: head/devel/elfutils/Makefile =================================================================== --- head/devel/elfutils/Makefile (revision 534193) +++ head/devel/elfutils/Makefile (revision 534194) @@ -1,57 +1,59 @@ # Created by: Conrad Meyer # $FreeBSD$ PORTNAME= elfutils -PORTVERSION= 0.174 -PORTREVISION= 4 +PORTVERSION= 0.179 CATEGORIES= devel MASTER_SITES= https://sourceware.org/elfutils/ftp/${PORTVERSION}/ MAINTAINER= cem@FreeBSD.org COMMENT= Library for manipulating ELF files and partial implementation of binutils LICENSE= LGPL3 GPLv2+ GPLv3+ LICENSE_COMB= multi LICENSE_FILE_GPLv3+ = ${WRKSRC}/COPYING LICENSE_FILE_GPLv2+ = ${WRKSRC}/COPYING-GPLV2 LICENSE_FILE_LGPL3= ${WRKSRC}/COPYING-LGPLV3 +IGNORE_FreeBSD_11= fails to build: fails to compile dwarf_abbrev_hash.c BROKEN_armv6= fails to build: fails to compile i386_disasm.c BROKEN_armv7= fails to build: fails to compile i386_disasm.c BROKEN_sparc64= sparc patch does not apply cleanly to 0.172 LIB_DEPENDS= libargp.so:devel/argp-standalone -PATCH_DEPENDS= ${NONEXISTENT}:devel/gnulib:extract +BUILD_DEPENDS= gnulib>=0:devel/gnulib PLIST_SUB= VERSION=${PORTVERSION} -OPTIONS_DEFINE= NLS +OPTIONS_DEFINE= MANPAGES NLS +OPTIONS_DEFAULT= MANPAGES OPTIONS_SUB= yes NLS_USES= gettext NLS_USES_OFF= gettext # used anyway NLS_CONFIGURE_ENABLE= nls -USES= autoreconf gmake libtool tar:bzip2 +USES= autoreconf gmake libtool pkgconfig tar:bzip2 USE_GCC= yes GNU_CONFIGURE= yes USE_LDCONFIG= yes CFLAGS+= -Wno-null-dereference -Wno-unused-value # For GCC8: CFLAGS+= -Wno-cast-function-type # Give i386 a prayer of building, and we can fix the warnings later: CFLAGS_i386+= -Wno-error # Avoid conflict with binutils / elftoolchain programs with the same names: CONFIGURE_ARGS+= --program-prefix=eu- +# Disable debuginfod until option support can be added: +CONFIGURE_ARGS+= --disable-debuginfod -post-patch: - @${LN} -s `${MAKE} -C ${PORTSDIR}/devel/gnulib -V WRKSRC` ${WRKDIR}/gnulib +pre-configure: @${CP} -a \ - ${WRKDIR}/gnulib/lib/obstack.c \ - ${WRKDIR}/gnulib/lib/obstack.h \ - ${WRKDIR}/gnulib/lib/obstack_printf.c \ + ${LOCALBASE}/share/gnulib/lib/obstack.c \ + ${LOCALBASE}/share/gnulib/lib/obstack.h \ + ${LOCALBASE}/share/gnulib/lib/obstack_printf.c \ ${WRKSRC}/lib .include Index: head/devel/elfutils/distinfo =================================================================== --- head/devel/elfutils/distinfo (revision 534193) +++ head/devel/elfutils/distinfo (revision 534194) @@ -1,3 +1,3 @@ -TIMESTAMP = 1536943739 -SHA256 (elfutils-0.174.tar.bz2) = cdf27e70076e10a29539d89e367101d516bc4aa11b0d7777fe52139e3fcad08a -SIZE (elfutils-0.174.tar.bz2) = 8700793 +TIMESTAMP = 1585570776 +SHA256 (elfutils-0.179.tar.bz2) = 25a545566cbacaa37ae6222e58f1c48ea4570f53ba991886e2f5ce96e22a23a2 +SIZE (elfutils-0.179.tar.bz2) = 9057637 Index: head/devel/elfutils/files/patch-libelf_elf_update.c =================================================================== --- head/devel/elfutils/files/patch-libelf_elf_update.c (revision 534193) +++ head/devel/elfutils/files/patch-libelf_elf_update.c (nonexistent) @@ -1,18 +0,0 @@ ---- libelf/elf_update.c.orig 2018-09-14 03:23:36.000000000 -0700 -+++ libelf/elf_update.c -@@ -106,9 +106,13 @@ - if (elf->cmd == ELF_C_RDWR_MMAP - && (size_t) size > elf->maximum_size) - { -- if (mremap (elf->map_address, elf->maximum_size, -- size, 0) == MAP_FAILED) -+ if (munmap (elf->map_address, elf->maximum_size) != 0 || -+ mmap (elf->map_address, size, PROT_READ | PROT_WRITE, -+ MAP_SHARED | MAP_FIXED | MAP_EXCL, elf->fildes, -+ 0) == MAP_FAILED) - { -+ elf->map_address = NULL; -+ elf->flags &= ~ELF_F_MMAPPED; - __libelf_seterrno (ELF_E_WRITE_ERROR); - return -1; - } Property changes on: head/devel/elfutils/files/patch-libelf_elf_update.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/elfutils/files/patch-git_be8080bdd746 =================================================================== --- head/devel/elfutils/files/patch-git_be8080bdd746 (revision 534193) +++ head/devel/elfutils/files/patch-git_be8080bdd746 (nonexistent) @@ -1,32 +0,0 @@ -diff --git libelf/elf32_fsize.c libelf/elf32_fsize.c -index fddae91e..16919daa 100644 ---- libelf/elf32_fsize.c -+++ libelf/elf32_fsize.c -@@ -64,5 +64,3 @@ elfw2(LIBELFBITS, fsize) (Elf_Type type, size_t count, unsigned int version) - * __libelf_type_sizes[0][ELFW(ELFCLASS,LIBELFBITS) - 1][type]); - #endif - } --#define local_strong_alias(n1, n2) strong_alias (n1, n2) --local_strong_alias (elfw2(LIBELFBITS, fsize), __elfw2(LIBELFBITS, msize)) -diff --git libelf/libelfP.h libelf/libelfP.h -index ed216c8c..c6bb992d 100644 ---- libelf/libelfP.h -+++ libelf/libelfP.h -@@ -454,17 +454,6 @@ extern const uint_fast8_t __libelf_type_aligns[EV_NUM - 1][ELFCLASSNUM - 1][ELF_ - be ELF_T_BYTE. */ - extern Elf_Type __libelf_data_type (Elf *elf, int sh_type) internal_function; - --/* The libelf API does not have such a function but it is still useful. -- Get the memory size for the given type. -- -- These functions cannot be marked internal since they are aliases -- of the export elfXX_fsize functions.*/ --extern size_t __elf32_msize (Elf_Type __type, size_t __count, -- unsigned int __version); --extern size_t __elf64_msize (Elf_Type __type, size_t __count, -- unsigned int __version); -- -- - /* Create Elf descriptor from memory image. */ - extern Elf *__libelf_read_mmaped_file (int fildes, void *map_address, - off_t offset, size_t maxsize, Property changes on: head/devel/elfutils/files/patch-git_be8080bdd746 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/elfutils/files/patch-lib_Makefile.am =================================================================== --- head/devel/elfutils/files/patch-lib_Makefile.am (revision 534193) +++ head/devel/elfutils/files/patch-lib_Makefile.am (revision 534194) @@ -1,12 +1,12 @@ ---- lib/Makefile.am.orig 2017-11-22 03:44:22.000000000 -0800 +--- lib/Makefile.am.orig 2020-03-30 12:17:45 UTC +++ lib/Makefile.am -@@ -35,7 +35,8 @@ +@@ -35,7 +35,8 @@ noinst_LIBRARIES = libeu.a libeu_a_SOURCES = xstrdup.c xstrndup.c xmalloc.c next_prime.c \ crc32.c crc32_file.c \ - color.c printversion.c + color.c printversion.c \ + error.c obstack.c obstack_printf.c noinst_HEADERS = fixedsizehash.h libeu.h system.h dynamicsizehash.h list.h \ - eu-config.h color.h printversion.h bpf.h + eu-config.h color.h printversion.h bpf.h \ Index: head/devel/elfutils/files/patch-lib_eu-config.h =================================================================== --- head/devel/elfutils/files/patch-lib_eu-config.h (revision 534193) +++ head/devel/elfutils/files/patch-lib_eu-config.h (revision 534194) @@ -1,183 +1,185 @@ ---- lib/eu-config.h.orig 2015-06-11 11:38:55 UTC +--- lib/eu-config.h.orig 2020-03-30 12:17:45 UTC +++ lib/eu-config.h -@@ -187,4 +187,180 @@ asm (".section predict_data, \"aw\"; .pr - #endif +@@ -176,6 +176,182 @@ asm (".section predict_data, \"aw\"; .previous\n" + #define ELFUTILS_HEADER(name) +/* FreeBSD ports of glibcisms */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define _GL_ATTRIBUTE_PURE __attribute__((__pure__)) + +struct obstack; +extern int obstack_printf(struct obstack *, const char *, ...); +extern int obstack_vprintf(struct obstack *, const char *, va_list); + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" +static inline void * +mempcpy(void * restrict dst, const void * restrict src, size_t len) +{ + + return (((char *)memcpy(dst, src, len)) + len); +} + +static inline wchar_t * +wmempcpy(wchar_t * restrict dst, const wchar_t * restrict src, size_t len) +{ + + return (wmemcpy(dst, src, len) + len); +} +#pragma GCC diagnostic pop + +static inline void * +rawmemchr(const void *s, int c) +{ + + return (memchr(s, c, SSIZE_MAX)); +} + +static inline void +tdestroy(void *vroot __unused, void (*freefct)(void *) __unused) +{ + + /* XXX: Just leak the memory for now. */ +} + +static inline char * +canonicalize_file_name(const char *path) +{ + + return (realpath(path, NULL)); +} + +/* + * A GNU-like basename(). + * + * Unlike POSIX basename(3), this version never modifies its argument. If the + * argument ends in a slash, it returns the empty string. + */ +static inline char * +eu_basename(const char *path) +{ + const char *slash; + + slash = strrchr(path, '/'); + if (slash != NULL) + slash++; + else + slash = path; + return (__DECONST(char *, slash)); +} +#ifdef basename +#undef basename +#endif +#define basename eu_basename + +#ifndef TEMP_FAILURE_RETRY +#define TEMP_FAILURE_RETRY(expr) ({ \ + long value; \ + do { \ + value = (long)(expr); \ + } while (value == -1 && errno == EINTR); \ + (value); \ +}) +#endif + +#define strndupa(s, n) \ +({ \ + size_t len = (n); \ + const char *end; \ + char *res; \ + \ + end = memchr((s), 0, (n)); \ + if (end != NULL) \ + len = end - (s); \ + \ + res = alloca(len + 1); \ + memcpy(res, (s), len); \ + res[len] = '\0'; \ + res; \ +}) + + +#define program_invocation_short_name __DECONST(char *, getprogname()) +#ifndef loff_t +#define loff_t off_t +#endif +#ifndef off64_t +#define off64_t off_t +#endif + +#define ftruncate64 ftruncate +#define open64 open +#define fstat64 fstat +#define stat64 stat +#define pread64 pread +#define mmap64 mmap +#define lseek64 lseek + +#define MAP_POPULATE MAP_PREFAULT_READ + +#define bswap_16 bswap16 +#define bswap_32 bswap32 +#define bswap_64 bswap64 + +/* + * Future versions of FreeBSD will provide proper versions of these _unlocked + * variants. These can and should be used instead, but won't be available + * until FreeBSD 11.4 and 12.2, at which point we should limit the scope of + * these to DragonFlyBSD. + */ +#ifndef fputc_unlocked +#define fputc_unlocked putc_unlocked +#endif +#define fputs_unlocked fputs +#define fwrite_unlocked fwrite +#define fread_unlocked fread + +#ifndef __BYTE_ORDER +#define __BYTE_ORDER _BYTE_ORDER +#endif +#ifndef __LITTLE_ENDIAN +#define __LITTLE_ENDIAN _LITTLE_ENDIAN +#endif +#ifndef __BIG_ENDIAN +#define __BIG_ENDIAN _BIG_ENDIAN +#endif + +#define DL_CALL_FCT(fn, args) ((fn) args) + +/* This package doesn't really respect --disable-nls. Hack it. */ +#if !ENABLE_NLS +/* Skip loading libintl.h, which is hardcoded in most source files: */ +#define _LIBINTL_H 1 +#define dgettext(module, str) (str) +#define gettext(str) (str) + +static inline char * +bindtextdomain(const char *d __unused, const char *dr __unused) +{ + + return ("/"); +} + +static inline char * +textdomain(const char *dom) +{ + + return (__DECONST(char *, dom)); +} + +#define ngettext(s, p, n) (((n) == 1) ? (s) : (p)) +#endif + - #endif /* eu-config.h */ + #ifdef SYMBOL_VERSIONING + # define OLD_VERSION(name, version) \ + asm (".globl _compat." #version "." #name "\n" \ Index: head/devel/elfutils/files/patch-libdw_Makefile.am =================================================================== --- head/devel/elfutils/files/patch-libdw_Makefile.am (revision 534193) +++ head/devel/elfutils/files/patch-libdw_Makefile.am (revision 534194) @@ -1,11 +1,11 @@ ---- libdw/Makefile.am.orig 2017-08-02 12:06:25 UTC +--- libdw/Makefile.am.orig 2020-03-30 12:17:45 UTC +++ libdw/Makefile.am -@@ -105,7 +105,7 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURC - libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \ - ../libdwfl/libdwfl_pic.a ../libebl/libebl.a +@@ -109,7 +109,7 @@ libdw_so_LIBS = ../libebl/libebl_pic.a ../backends/lib + ../libcpu/libcpu_pic.a libdw_pic.a ../libdwelf/libdwelf_pic.a \ + ../libdwfl/libdwfl_pic.a libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so --libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) -+libdw_so_LDLIBS = $(libdw_so_DEPS) -lz $(argp_LDADD) $(zip_LIBS) +-libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) -pthread ++libdw_so_LDLIBS = $(libdw_so_DEPS) -lz $(argp_LDADD) $(zip_LIBS) -pthread libdw_so_SOURCES = libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS) - # The rpath is necessary for libebl because its $ORIGIN use will + $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \ Index: head/devel/elfutils/files/patch-libdw_dwarf__getsrclines.c =================================================================== --- head/devel/elfutils/files/patch-libdw_dwarf__getsrclines.c (revision 534193) +++ head/devel/elfutils/files/patch-libdw_dwarf__getsrclines.c (revision 534194) @@ -1,11 +1,11 @@ ---- libdw/dwarf_getsrclines.c.orig 2016-12-25 13:36:55 UTC +--- libdw/dwarf_getsrclines.c.orig 2020-03-30 12:17:45 UTC +++ libdw/dwarf_getsrclines.c -@@ -273,7 +273,7 @@ read_srclines (Dwarf *dbg, +@@ -287,7 +287,7 @@ read_srclines (Dwarf *dbg, /* Remember array with the standard opcode length (-1 to account for the opcode with value zero not being mentioned). */ const uint8_t *standard_opcode_lengths = linep - 1; - if (unlikely (lineendp - linep < opcode_base - 1)) + if (unlikely (lineendp - linep < (ptrdiff_t)opcode_base - 1)) goto invalid_data; linep += opcode_base - 1; Index: head/devel/elfutils/files/patch-libelf_elf.h =================================================================== --- head/devel/elfutils/files/patch-libelf_elf.h (revision 534193) +++ head/devel/elfutils/files/patch-libelf_elf.h (revision 534194) @@ -1,18 +1,18 @@ ---- libelf/elf.h.orig 2017-08-02 12:06:25 UTC +--- libelf/elf.h.orig 2020-03-30 12:17:45 UTC +++ libelf/elf.h @@ -54,6 +54,7 @@ typedef uint64_t Elf64_Off; /* Type for section indices, which are 16-bit quantities. */ typedef uint16_t Elf32_Section; typedef uint16_t Elf64_Section; +#define LIBELF_ELF_SECTION_DEFINED 1 /* Type for version symbol information. */ typedef Elf32_Half Elf32_Versym; -@@ -1110,6 +1111,7 @@ typedef struct +@@ -1145,6 +1146,7 @@ typedef struct on 64-bit platforms and vice versa. */ } a_un; } Elf64_auxv_t; +#define LIBELF_ELF_AUXV_T_DEFINED 1 /* Legal values for a_type (entry type). */ Index: head/devel/elfutils/files/patch-libelf_elf__update.c =================================================================== --- head/devel/elfutils/files/patch-libelf_elf__update.c (nonexistent) +++ head/devel/elfutils/files/patch-libelf_elf__update.c (revision 534194) @@ -0,0 +1,18 @@ +--- libelf/elf_update.c.orig 2020-03-30 12:17:45 UTC ++++ libelf/elf_update.c +@@ -106,9 +106,13 @@ write_file (Elf *elf, int64_t size, int change_bo, siz + if (elf->cmd == ELF_C_RDWR_MMAP + && (size_t) size > elf->maximum_size) + { +- if (mremap (elf->map_address, elf->maximum_size, +- size, 0) == MAP_FAILED) ++ if (munmap (elf->map_address, elf->maximum_size) != 0 || ++ mmap (elf->map_address, size, PROT_READ | PROT_WRITE, ++ MAP_SHARED | MAP_FIXED | MAP_EXCL, elf->fildes, ++ 0) == MAP_FAILED) + { ++ elf->map_address = NULL; ++ elf->flags &= ~ELF_F_MMAPPED; + __libelf_seterrno (ELF_E_WRITE_ERROR); + return -1; + } Property changes on: head/devel/elfutils/files/patch-libelf_elf__update.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/elfutils/files/patch-src_Makefile.am =================================================================== --- head/devel/elfutils/files/patch-src_Makefile.am (revision 534193) +++ head/devel/elfutils/files/patch-src_Makefile.am (revision 534194) @@ -1,46 +1,11 @@ ---- src/Makefile.am.orig 2016-12-28 09:32:00 UTC +--- src/Makefile.am.orig 2020-03-30 12:17:45 UTC +++ src/Makefile.am -@@ -40,11 +40,11 @@ CLEANFILES += make-debug-archive +@@ -41,7 +41,7 @@ CLEANFILES += make-debug-archive if BUILD_STATIC libasm = ../libasm/libasm.a --libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -+libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) $(libeu) +-libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread ++libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -lpthread libelf = ../libelf/libelf.a -lz else libasm = ../libasm/libasm.so --libdw = ../libdw/libdw.so -+libdw = ../libdw/libdw.so $(libeu) - libelf = ../libelf/libelf.so - endif - libebl = ../libebl/libebl.a -@@ -67,21 +67,21 @@ ranlib_no_Wstack_usage = yes - ar_no_Wstack_usage = yes - unstrip_no_Wstack_usage = yes - --readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl --nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl \ -+readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -+nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) \ - $(demanglelib) - size_LDADD = $(libelf) $(libeu) $(argp_LDADD) --strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl --elflint_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl -+strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -+elflint_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) - findtextrel_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) - addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib) --elfcmp_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl --objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl -+elfcmp_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -+objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) - ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) - strings_LDADD = $(libelf) $(libeu) $(argp_LDADD) - ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) --unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl --stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl $(demanglelib) -+unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -+stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(demanglelib) - elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) - - installcheck-binPROGRAMS: $(bin_PROGRAMS) Index: head/devel/elfutils/files/patch-src_elfcompress.c =================================================================== --- head/devel/elfutils/files/patch-src_elfcompress.c (revision 534193) +++ head/devel/elfutils/files/patch-src_elfcompress.c (revision 534194) @@ -1,23 +1,23 @@ ---- src/elfcompress.c.orig 2016-12-28 01:32:01.000000000 -0800 -+++ src/elfcompress.c 2017-01-18 16:21:03.680565000 -0800 -@@ -135,7 +135,10 @@ +--- src/elfcompress.c.orig 2020-03-30 12:17:45 UTC ++++ src/elfcompress.c +@@ -135,7 +135,10 @@ parse_opt (int key, char *arg __attribute__ ((unused)) if (type == T_UNSET) type = T_COMPRESS_ZLIB; if (patterns == NULL) - add_pattern (".?(z)debug*"); + { + add_pattern (".debug*"); + add_pattern (".zdebug*"); + } break; case ARGP_KEY_NO_ARGS: -@@ -162,7 +165,7 @@ +@@ -162,7 +165,7 @@ section_name_matches (const char *name) 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; } Index: head/devel/elfutils/files/patch-src_readelf.c =================================================================== --- head/devel/elfutils/files/patch-src_readelf.c (revision 534193) +++ head/devel/elfutils/files/patch-src_readelf.c (revision 534194) @@ -1,10 +1,10 @@ ---- src/readelf.c.orig 2017-08-02 12:06:25 UTC +--- src/readelf.c.orig 2020-03-30 12:17:45 UTC +++ src/readelf.c -@@ -8130,6 +8130,7 @@ print_debug_exception_table (Dwfl_Module +@@ -10744,6 +10744,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __at default: dsize = 0; error (1, 0, gettext ("invalid TType encoding")); + abort(); } if (max_ar_filter Index: head/devel/elfutils/files/patch-src_strip.c =================================================================== --- head/devel/elfutils/files/patch-src_strip.c (revision 534193) +++ head/devel/elfutils/files/patch-src_strip.c (revision 534194) @@ -1,31 +1,31 @@ ---- src/strip.c.orig 2017-08-02 12:06:25 UTC +--- src/strip.c.orig 2020-03-30 12:17:45 UTC +++ src/strip.c -@@ -85,8 +85,8 @@ static const struct argp_option options[ - N_("Resolve all trivial relocations between debug sections if the removed sections are placed in a debug file (only relevant for ET_REL files, operation is not reversable, needs -f)"), 0 }, +@@ -87,8 +87,8 @@ static const struct argp_option options[] = + N_("Similar to --reloc-debug-sections, but resolve all trivial relocations between debug sections in place. No other stripping is performed (operation is not reversable, incompatible with -f, -g, --remove-comment and --remove-section)"), 0 }, { "remove-comment", OPT_REMOVE_COMMENT, NULL, 0, N_("Remove .comment section"), 0 }, - { "remove-section", 'R', "SECTION", 0, N_("Remove the named section. SECTION is an extended wildcard pattern. May be given more than once. Only non-allocated sections can be removed."), 0 }, - { "keep-section", OPT_KEEP_SECTION, "SECTION", 0, N_("Keep the named section. SECTION is an extended wildcard pattern. May be given more than once."), 0 }, + { "remove-section", 'R', "SECTION", 0, N_("Remove the named section. SECTION is an wildcard pattern. May be given more than once. Only non-allocated sections can be removed."), 0 }, + { "keep-section", OPT_KEEP_SECTION, "SECTION", 0, N_("Keep the named section. SECTION is an wildcard pattern. May be given more than once."), 0 }, { "permissive", OPT_PERMISSIVE, NULL, 0, N_("Relax a few rules to handle slightly broken ELF files"), 0 }, { NULL, 0, NULL, 0, NULL, 0 } -@@ -205,7 +205,7 @@ section_name_matches (struct section_pat +@@ -210,7 +210,7 @@ section_name_matches (struct section_pattern *patterns 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; } -@@ -313,7 +313,7 @@ parse_opt (int key, char *arg, struct ar +@@ -328,7 +328,7 @@ parse_opt (int key, char *arg, struct argp_state *stat break; case 'R': - if (fnmatch (arg, ".comment", FNM_EXTMATCH) == 0) + if (fnmatch (arg, ".comment", 0) == 0) remove_comment = true; add_pattern (&remove_secs, arg); break; Index: head/devel/elfutils/files/patch-tests_Makefile.am =================================================================== --- head/devel/elfutils/files/patch-tests_Makefile.am (revision 534193) +++ head/devel/elfutils/files/patch-tests_Makefile.am (revision 534194) @@ -1,132 +1,111 @@ ---- tests/Makefile.am.orig 2018-09-14 04:12:13.000000000 -0700 +--- tests/Makefile.am.orig 2020-03-30 12:17:45 UTC +++ tests/Makefile.am -@@ -457,7 +457,7 @@ +@@ -537,7 +537,7 @@ libasm = -lasm libebl = -lebl else !STANDALONE if BUILD_STATIC --libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -+libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) +-libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread ++libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -lpthread libelf = ../libelf/libelf.a -lz libasm = ../libasm/libasm.a else -@@ -472,16 +472,16 @@ +@@ -552,16 +552,16 @@ endif !STANDALONE arextract_LDADD = $(libelf) arsymtest_LDADD = $(libelf) newfile_LDADD = $(libelf) -saridx_LDADD = $(libelf) +saridx_LDADD = $(libeu) $(libelf) scnnames_LDADD = $(libelf) -sectiondump_LDADD = $(libelf) +sectiondump_LDADD = $(libeu) $(libelf) showptable_LDADD = $(libelf) hash_LDADD = $(libelf) test_nlist_LDADD = $(libelf) msg_tst_LDADD = $(libelf) newscn_LDADD = $(libelf) -early_offscn_LDADD = $(libelf) -ecp_LDADD = $(libelf) +early_offscn_LDADD = $(libeu) $(libelf) +ecp_LDADD = $(libeu) $(libelf) update1_LDADD = $(libelf) update2_LDADD = $(libelf) update3_LDADD = $(libdw) $(libelf) -@@ -495,34 +495,34 @@ +@@ -575,12 +575,12 @@ get_files_LDADD = $(libdw) $(libelf) next_files_LDADD = $(libdw) $(libelf) get_aranges_LDADD = $(libdw) $(libelf) allfcts_LDADD = $(libdw) $(libelf) -line2addr_LDADD = $(libdw) $(argp_LDADD) -addrscopes_LDADD = $(libdw) $(argp_LDADD) -funcscopes_LDADD = $(libdw) $(argp_LDADD) -funcretval_LDADD = $(libdw) $(argp_LDADD) -allregs_LDADD = $(libdw) $(argp_LDADD) -find_prologues_LDADD = $(libdw) $(argp_LDADD) +line2addr_LDADD = $(libeu) $(libdw) $(argp_LDADD) +addrscopes_LDADD = $(libeu) $(libdw) $(argp_LDADD) +funcscopes_LDADD = $(libeu) $(libdw) $(argp_LDADD) +funcretval_LDADD = $(libeu) $(libdw) $(argp_LDADD) +allregs_LDADD = $(libeu) $(libdw) $(argp_LDADD) +find_prologues_LDADD = $(libeu) $(libdw) $(argp_LDADD) #show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf) --asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl --asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl --asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl --asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl --asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl --asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl --asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl --asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl --asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl --dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl + asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) + asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) +@@ -592,13 +592,13 @@ asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libdw + asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) + asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) + dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -rdwrmmap_LDADD = $(libelf) --dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) -ldl -+asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -+asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -+asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -+asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -+asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -+asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -+asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -+asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -+asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -+dwflmodtest_LDADD = $(libeu) $(libdw) $(libebl) $(libelf) $(argp_LDADD) +rdwrmmap_LDADD = $(libeu) $(libelf) -+dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) + dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) arls_LDADD = $(libelf) --dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) -ldl --dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) -ldl --dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) -ldl --dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl -+dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) -+dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) + dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) + dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) +-dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) +-dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) +dwfl_bug_getmodules_LDADD = $(libeu) $(libdw) $(libebl) $(libelf) +dwfl_addr_sect_LDADD = $(libeu) $(libdw) $(libebl) $(libelf) $(argp_LDADD) dwarf_getmacros_LDADD = $(libdw) dwarf_ranges_LDADD = $(libdw) dwarf_getstring_LDADD = $(libdw) --addrcfi_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl -+addrcfi_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) - dwarfcfi_LDADD = $(libdw) $(libelf) - test_flag_nobits_LDADD = $(libelf) - rerequest_tag_LDADD = $(libdw) -@@ -532,9 +532,9 @@ +@@ -612,10 +612,10 @@ typeiter2_LDADD = $(libdw) $(libelf) low_high_pc_LDADD = $(libdw) $(libelf) $(argp_LDADD) test_elf_cntl_gelf_getshdr_LDADD = $(libelf) dwflsyms_LDADD = $(libdw) $(libelf) $(argp_LDADD) -dwfllines_LDADD = $(libdw) $(libelf) $(argp_LDADD) -dwfl_report_elf_align_LDADD = $(libdw) --varlocs_LDADD = $(libdw) $(libelf) $(argp_LDADD) +dwfllines_LDADD = $(libeu) $(libdw) $(libelf) $(argp_LDADD) +dwfl_report_elf_align_LDADD = $(libeu) $(libdw) + dwfl_report_segment_contiguous_LDADD = $(libdw) $(libebl) $(libelf) +-varlocs_LDADD = $(libdw) $(libelf) $(argp_LDADD) +varlocs_LDADD = $(libeu) $(libdw) $(libelf) $(argp_LDADD) backtrace_LDADD = $(libdw) $(libelf) $(argp_LDADD) # backtrace-child-biarch also uses those *_CFLAGS and *_LDLAGS variables: backtrace_child_CFLAGS = $(fpie_CFLAGS) -@@ -543,23 +543,23 @@ +@@ -624,23 +624,23 @@ backtrace_child_biarch_SOURCES = backtrace-child.c backtrace_data_LDADD = $(libdw) $(libelf) backtrace_dwarf_CFLAGS = -Wno-unused-parameter backtrace_dwarf_LDADD = $(libdw) $(libelf) -debuglink_LDADD = $(libdw) $(libelf) -debugaltlink_LDADD = $(libdw) $(libelf) -buildid_LDADD = $(libdw) $(libelf) +debuglink_LDADD = $(libeu) $(libdw) $(libelf) +debugaltlink_LDADD = $(libeu) $(libdw) $(libelf) +buildid_LDADD = $(libeu) $(libdw) $(libelf) deleted_LDADD = ./deleted-lib.so deleted_lib_so_LDFLAGS = -shared deleted_lib_so_CFLAGS = $(fpic_CFLAGS) -fasynchronous-unwind-tables aggregate_size_LDADD = $(libdw) $(libelf) $(argp_LDADD) peel_type_LDADD = $(libdw) $(libelf) $(argp_LDADD) vdsosyms_LDADD = $(libdw) $(libelf) -getsrc_die_LDADD = $(libdw) $(libelf) +getsrc_die_LDADD = $(libeu) $(libdw) $(libelf) strptr_LDADD = $(libelf) newdata_LDADD = $(libelf) elfstrtab_LDADD = $(libelf) dwfl_proc_attach_LDADD = $(libdw) dwfl_proc_attach_LDFLAGS = -pthread $(AM_LDFLAGS) elfshphehdr_LDADD =$(libelf) -elfstrmerge_LDADD = $(libdw) $(libelf) +elfstrmerge_LDADD = $(libeu) $(libdw) $(libelf) dwelfgnucompressed_LDADD = $(libelf) $(libdw) elfgetchdr_LDADD = $(libelf) $(libdw) elfgetzdata_LDADD = $(libelf) Index: head/devel/elfutils/pkg-plist =================================================================== --- head/devel/elfutils/pkg-plist (revision 534193) +++ head/devel/elfutils/pkg-plist (revision 534194) @@ -1,80 +1,55 @@ bin/eu-addr2line bin/eu-ar +bin/eu-elfclassify bin/eu-elfcmp bin/eu-elfcompress bin/eu-elflint bin/eu-findtextrel bin/eu-make-debug-archive bin/eu-nm bin/eu-objdump bin/eu-ranlib bin/eu-readelf bin/eu-size bin/eu-stack bin/eu-strings bin/eu-strip bin/eu-unstrip include/dwarf.h include/elfutils/elf-knowledge.h include/elfutils/known-dwarf.h include/elfutils/libasm.h include/elfutils/libdw.h include/elfutils/libdwelf.h include/elfutils/libdwfl.h -include/elfutils/libebl.h include/elfutils/version.h include/gelf.h include/libelf.h include/nlist.h -lib/elfutils/libebl_aarch64-%%VERSION%%.so -lib/elfutils/libebl_aarch64.so -lib/elfutils/libebl_alpha-%%VERSION%%.so -lib/elfutils/libebl_alpha.so -lib/elfutils/libebl_arm-%%VERSION%%.so -lib/elfutils/libebl_arm.so -lib/elfutils/libebl_bpf-%%VERSION%%.so -lib/elfutils/libebl_bpf.so -lib/elfutils/libebl_i386-%%VERSION%%.so -lib/elfutils/libebl_i386.so -lib/elfutils/libebl_ia64-%%VERSION%%.so -lib/elfutils/libebl_ia64.so -lib/elfutils/libebl_m68k-%%VERSION%%.so -lib/elfutils/libebl_m68k.so -lib/elfutils/libebl_ppc-%%VERSION%%.so -lib/elfutils/libebl_ppc.so -lib/elfutils/libebl_ppc64-%%VERSION%%.so -lib/elfutils/libebl_ppc64.so -lib/elfutils/libebl_riscv-%%VERSION%%.so -lib/elfutils/libebl_riscv.so -lib/elfutils/libebl_s390-%%VERSION%%.so -lib/elfutils/libebl_s390.so -lib/elfutils/libebl_sh-%%VERSION%%.so -lib/elfutils/libebl_sh.so -lib/elfutils/libebl_sparc-%%VERSION%%.so -lib/elfutils/libebl_sparc.so -lib/elfutils/libebl_tilegx-%%VERSION%%.so -lib/elfutils/libebl_tilegx.so -lib/elfutils/libebl_x86_64-%%VERSION%%.so -lib/elfutils/libebl_x86_64.so lib/libasm-%%VERSION%%.so lib/libasm.a lib/libasm.so lib/libasm.so.1 lib/libdw-%%VERSION%%.so lib/libdw.a lib/libdw.so lib/libdw.so.1 -lib/libebl.a lib/libelf-%%VERSION%%.so lib/libelf.a lib/libelf.so lib/libelf.so.1 libdata/pkgconfig/libdw.pc libdata/pkgconfig/libelf.pc +%%MANPAGES%%man/man1/eu-elfclassify.1.gz +%%MANPAGES%%man/man1/eu-readelf.1.gz +%%MANPAGES%%man/man3/elf_begin.3.gz +%%MANPAGES%%man/man3/elf_clone.3.gz +%%MANPAGES%%man/man3/elf_getdata.3.gz +%%MANPAGES%%man/man3/elf_update.3.gz %%NLS%%share/locale/de/LC_MESSAGES/elfutils.mo %%NLS%%share/locale/en@boldquot/LC_MESSAGES/elfutils.mo %%NLS%%share/locale/en@quot/LC_MESSAGES/elfutils.mo %%NLS%%share/locale/es/LC_MESSAGES/elfutils.mo %%NLS%%share/locale/ja/LC_MESSAGES/elfutils.mo %%NLS%%share/locale/pl/LC_MESSAGES/elfutils.mo %%NLS%%share/locale/uk/LC_MESSAGES/elfutils.mo Index: head/devel/kcov/Makefile =================================================================== --- head/devel/kcov/Makefile (revision 534193) +++ head/devel/kcov/Makefile (revision 534194) @@ -1,44 +1,45 @@ # $FreeBSD$ PORTNAME= kcov DISTVERSIONPREFIX= v DISTVERSION= 37 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= asomers@FreeBSD.org COMMENT= Coverage checker for ELF, Bash, and Python programs LICENSE= GPLv2 MIT # MIT for bundled handlebars, jquery, tablesorter LICENSE_COMB= multi LICENSE_FILE_GPLv2= ${WRKSRC}/COPYING ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= ptrace code is only implemented for amd64 BUILD_DEPENDS= binutils>=2.30:devel/binutils LIB_DEPENDS= libcurl.so:ftp/curl \ libdw.so:devel/elfutils \ libelf.so:devel/elfutils USES= cmake shebangfix python:build gettext-runtime # Remove -DPORTVERSION (and associated patch) when basing the port on an # official release CMAKE_ARGS= -DKCOV_INSTALL_MANDIR=${PREFIX}/man -DPORTVERSION=${PORTVERSION} SHEBANG_GLOB= *.py USE_GITHUB= yes GH_ACCOUNT= SimonKagstrom PLIST_FILES= bin/kcov \ man/man1/kcov.1.gz OPTIONS_DEFINE= DOCS PORTDOCS= COPYING.externals \ ChangeLog post-stage: ${RM} ${STAGEDIR}${DOCSDIR}/COPYING .include