From owner-svn-ports-all@freebsd.org Sat Nov 28 16:16:59 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31DA24A4BBC; Sat, 28 Nov 2020 16:16:59 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CjxTR0v2Cz4VVn; Sat, 28 Nov 2020 16:16:59 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1199E2A0A7; Sat, 28 Nov 2020 16:16:59 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0ASGGwVg057569; Sat, 28 Nov 2020 16:16:58 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0ASGGvv1057558; Sat, 28 Nov 2020 16:16:57 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202011281616.0ASGGvv1057558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 28 Nov 2020 16:16:57 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r556513 - in head/devel/dwarves: . files X-SVN-Group: ports-head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/devel/dwarves: . files X-SVN-Commit-Revision: 556513 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2020 16:16:59 -0000 Author: cem (src committer) Date: Sat Nov 28 16:16:57 2020 New Revision: 556513 URL: https://svnweb.freebsd.org/changeset/ports/556513 Log: devel/dwarves: update to 1.19 Changes: https://github.com/acmel/dwarves/blob/master/changes-v1.19 Approved by: bapt Differential Revision: https://reviews.freebsd.org/D27400 Added: head/devel/dwarves/files/patch-dutil.h (contents, props changed) head/devel/dwarves/files/patch-pahole__strings.h (contents, props changed) Modified: head/devel/dwarves/Makefile head/devel/dwarves/distinfo head/devel/dwarves/files/patch-dwarves__fprintf.c head/devel/dwarves/files/patch-lib_bpf_src_btf.c head/devel/dwarves/files/patch-lib_bpf_src_libbpf.c head/devel/dwarves/pkg-plist Modified: head/devel/dwarves/Makefile ============================================================================== --- head/devel/dwarves/Makefile Sat Nov 28 15:27:43 2020 (r556512) +++ head/devel/dwarves/Makefile Sat Nov 28 16:16:57 2020 (r556513) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= dwarves -DISTVERSION= 1.17 +DISTVERSION= 1.19 CATEGORIES= devel MASTER_SITES= https://fedorapeople.org/~acme/dwarves/ @@ -27,7 +27,7 @@ USE_LDCONFIG= yes SHEBANG_FILES= btfdiff fullcircle ostra/ostra-cg ostra/python/ostra.py -CFLAGS+= -I${WRKSRC} +CFLAGS+= -I${WRKSRC} -Wno-attributes OPTIONS_DEFINE= MANPAGES OPTIONS_DEFAULT= MANPAGES Modified: head/devel/dwarves/distinfo ============================================================================== --- head/devel/dwarves/distinfo Sat Nov 28 15:27:43 2020 (r556512) +++ head/devel/dwarves/distinfo Sat Nov 28 16:16:57 2020 (r556513) @@ -1,3 +1,3 @@ -TIMESTAMP = 1584128313 -SHA256 (dwarves-1.17.tar.xz) = f196b0604c16a3812031ed2cd4c14d27fef889186b514a16db2d2f52717aef70 -SIZE (dwarves-1.17.tar.xz) = 309028 +TIMESTAMP = 1606511990 +SHA256 (dwarves-1.19.tar.xz) = 9af54663f2bab10d1ea85f97801c8fa045ff62e9b39d4ec6a8541354cb7b6ef3 +SIZE (dwarves-1.19.tar.xz) = 686136 Added: head/devel/dwarves/files/patch-dutil.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/dwarves/files/patch-dutil.h Sat Nov 28 16:16:57 2020 (r556513) @@ -0,0 +1,28 @@ +--- dutil.h.orig 2020-08-21 14:53:52 UTC ++++ dutil.h +@@ -28,6 +28,9 @@ + #define __pure __attribute__ ((pure)) + #endif + ++#ifdef roundup ++#undef roundup ++#endif + #define roundup(x,y) ((((x) + ((y) - 1)) / (y)) * (y)) + + static inline __attribute__((const)) bool is_power_of_2(unsigned long n) +@@ -35,6 +38,7 @@ static inline __attribute__((const)) bool is_power_of_ + return (n != 0 && ((n & (n - 1)) == 0)); + } + ++#ifndef __FreeBSD__ + /** + * fls - find last (most-significant) bit set + * @x: the word to search +@@ -46,6 +50,7 @@ static __always_inline int fls(int x) + { + return x ? sizeof(x) * 8 - __builtin_clz(x) : 0; + } ++#endif /* !__FreeBSD__ */ + + /** + * fls64 - find last set bit in a 64-bit word Modified: head/devel/dwarves/files/patch-dwarves__fprintf.c ============================================================================== --- head/devel/dwarves/files/patch-dwarves__fprintf.c Sat Nov 28 15:27:43 2020 (r556512) +++ head/devel/dwarves/files/patch-dwarves__fprintf.c Sat Nov 28 16:16:57 2020 (r556513) @@ -1,4 +1,4 @@ ---- dwarves_fprintf.c.orig 2020-05-06 22:11:18 UTC +--- dwarves_fprintf.c.orig 2020-11-19 18:44:29 UTC +++ dwarves_fprintf.c @@ -7,6 +7,8 @@ Copyright (C) 2007..2009 Arnaldo Carvalho de Melo @@ -9,7 +9,7 @@ #include #include #include -@@ -1910,12 +1912,7 @@ void cus__print_error_msg(const char *progname, const +@@ -1956,12 +1958,7 @@ void cus__print_error_msg(const char *progname, const void dwarves__fprintf_init(uint16_t user_cacheline_size) { if (user_cacheline_size == 0) { Modified: head/devel/dwarves/files/patch-lib_bpf_src_btf.c ============================================================================== --- head/devel/dwarves/files/patch-lib_bpf_src_btf.c Sat Nov 28 15:27:43 2020 (r556512) +++ head/devel/dwarves/files/patch-lib_bpf_src_btf.c Sat Nov 28 16:16:57 2020 (r556513) @@ -1,14 +1,53 @@ ---- lib/bpf/src/btf.c.orig 2020-03-12 19:57:29 UTC +--- lib/bpf/src/btf.c.orig 2020-11-16 19:49:14 UTC +++ lib/bpf/src/btf.c -@@ -436,6 +436,7 @@ done: - return btf; +@@ -1,8 +1,7 @@ + // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) + /* Copyright (c) 2018 Facebook */ + +-#include +-#include ++#include + #include + #include + #include +@@ -22,6 +21,12 @@ + #include "libbpf_internal.h" + #include "hashmap.h" + ++#ifdef __FreeBSD__ ++#define bswap_16(x) bswap16(x) ++#define bswap_32(x) bswap32(x) ++#define bswap_64(x) bswap64(x) ++#endif ++ + #define BTF_MAX_NR_TYPES 0x7fffffffU + #define BTF_MAX_STR_OFFSET 0x7fffffffU + +@@ -519,12 +524,12 @@ int btf__set_pointer_size(struct btf *btf, size_t ptr_ + + static bool is_host_big_endian(void) + { +-#if __BYTE_ORDER == __LITTLE_ENDIAN ++#if _BYTE_ORDER == _LITTLE_ENDIAN + return false; +-#elif __BYTE_ORDER == __BIG_ENDIAN ++#elif _BYTE_ORDER == _BIG_ENDIAN + return true; + #else +-# error "Unrecognized __BYTE_ORDER__" ++# error "Unrecognized _BYTE_ORDER" + #endif } +@@ -1080,6 +1085,7 @@ struct btf *btf__parse_split(const char *path, struct + return btf_parse(path, base_btf, NULL); + } + +#ifndef __FreeBSD__ - static bool btf_check_endianness(const GElf_Ehdr *ehdr) + static int compare_vsi_off(const void *_a, const void *_b) { - #if __BYTE_ORDER == __LITTLE_ENDIAN -@@ -684,6 +685,7 @@ done: + const struct btf_var_secinfo *a = _a; +@@ -1223,6 +1229,7 @@ done: free(log_buf); return err; } @@ -16,15 +55,15 @@ int btf__fd(const struct btf *btf) { -@@ -704,6 +706,7 @@ const char *btf__name_by_offset(const struct btf *btf, - return NULL; +@@ -1318,6 +1325,7 @@ const char *btf__name_by_offset(const struct btf *btf, + return btf__str_by_offset(btf, offset); } +#ifndef __FreeBSD__ int btf__get_from_id(__u32 id, struct btf **btf) { struct bpf_btf_info btf_info = { 0 }; -@@ -767,6 +770,7 @@ exit_free: +@@ -1381,6 +1389,7 @@ exit_free: return err; } @@ -32,15 +71,15 @@ int btf__get_map_kv_tids(const struct btf *btf, const char *map_name, __u32 expected_key_size, __u32 expected_value_size, -@@ -2936,6 +2940,7 @@ static int btf_dedup_remap_types(struct btf_dedup *d) +@@ -4559,6 +4568,7 @@ static int btf_dedup_remap_types(struct btf_dedup *d) return 0; } +#ifndef __FreeBSD__ - static struct btf *btf_load_raw(const char *path) - { - struct btf *btf; -@@ -3021,3 +3026,4 @@ struct btf *libbpf_find_kernel_btf(void) + /* + * Probe few well-known locations for vmlinux kernel image and try to load BTF + * data out of it to use for target BTF. +@@ -4609,3 +4619,4 @@ struct btf *libbpf_find_kernel_btf(void) pr_warn("failed to find valid kernel BTF\n"); return ERR_PTR(-ESRCH); } Modified: head/devel/dwarves/files/patch-lib_bpf_src_libbpf.c ============================================================================== --- head/devel/dwarves/files/patch-lib_bpf_src_libbpf.c Sat Nov 28 15:27:43 2020 (r556512) +++ head/devel/dwarves/files/patch-lib_bpf_src_libbpf.c Sat Nov 28 16:16:57 2020 (r556513) @@ -1,6 +1,6 @@ ---- lib/bpf/src/libbpf.c.orig 2020-03-12 19:57:29 UTC +--- lib/bpf/src/libbpf.c.orig 2020-11-16 19:49:14 UTC +++ lib/bpf/src/libbpf.c -@@ -29,18 +29,12 @@ +@@ -30,18 +30,12 @@ #include #include #include @@ -18,22 +18,20 @@ -#include #include #include - #include -@@ -73,11 +67,13 @@ + #include +@@ -72,9 +66,11 @@ #define __printf(a, b) __attribute__((format(printf, a, b))) +#ifndef __FreeBSD__ static struct bpf_map *bpf_object__add_map(struct bpf_object *obj); - static struct bpf_program *bpf_object__find_prog_by_idx(struct bpf_object *obj, - int idx); static const struct btf_type * skip_mods_and_typedefs(const struct btf *btf, __u32 id, __u32 *res_id); +#endif /* !__FreeBSD__ */ static int __base_pr(enum libbpf_print_level level, const char *format, va_list args) -@@ -111,6 +107,7 @@ void libbpf_print(enum libbpf_print_level level, const +@@ -108,6 +104,7 @@ void libbpf_print(enum libbpf_print_level level, const va_end(args); } @@ -41,7 +39,22 @@ static void pr_perm_msg(int err) { struct rlimit limit; -@@ -8396,3 +8387,4 @@ void bpf_object__destroy_skeleton(struct bpf_object_sk +@@ -8959,12 +8956,14 @@ bpf_object__find_map_by_offset(struct bpf_object *obj, + { + return ERR_PTR(-ENOTSUP); + } ++#endif /* !__FreeBSD__ */ + + long libbpf_get_error(const void *ptr) + { + return PTR_ERR_OR_ZERO(ptr); + } + ++#ifndef __FreeBSD__ + int bpf_prog_load(const char *file, enum bpf_prog_type type, + struct bpf_object **pobj, int *prog_fd) + { +@@ -10860,3 +10859,4 @@ void bpf_object__destroy_skeleton(struct bpf_object_sk free(s->progs); free(s); } Added: head/devel/dwarves/files/patch-pahole__strings.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/dwarves/files/patch-pahole__strings.h Sat Nov 28 16:16:57 2020 (r556513) @@ -0,0 +1,16 @@ +--- pahole_strings.h.orig 2020-10-20 20:25:03 UTC ++++ pahole_strings.h +@@ -1,5 +1,5 @@ +-#ifndef _STRINGS_H_ +-#define _STRINGS_H_ 1 ++#ifndef _PAHOLE_STRINGS_H_ ++#define _PAHOLE_STRINGS_H_ 1 + /* + SPDX-License-Identifier: GPL-2.0-only + +@@ -28,4 +28,4 @@ static inline const char *strings__ptr(const struct st + return btf__str_by_offset(strings->btf, s); + } + +-#endif /* _STRINGS_H_ */ ++#endif /* _PAHOLE_STRINGS_H_ */ Modified: head/devel/dwarves/pkg-plist ============================================================================== --- head/devel/dwarves/pkg-plist Sat Nov 28 15:27:43 2020 (r556512) +++ head/devel/dwarves/pkg-plist Sat Nov 28 16:16:57 2020 (r556513) @@ -26,8 +26,8 @@ include/dwarves/hash.h include/dwarves/libbtf.h include/dwarves/libctf.h include/dwarves/list.h +include/dwarves/pahole_strings.h include/dwarves/rbtree.h -include/dwarves/strings.h lib/libdwarves.so lib/libdwarves.so.1 lib/libdwarves.so.1.0.0