From nobody Fri Mar 25 13:42:41 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E060F1A28AB8; Fri, 25 Mar 2022 13:42:44 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KQ3F0393hz3L38; Fri, 25 Mar 2022 13:42:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648215764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SEl533CFWu7xfRIsOM2Ss8oCYfsZ0rvoSlbqovVMRLU=; b=VzqYHqxk/9PuuEbD/lNpoTKNySaQiwB92vC1YaSHCXOKVLbVsKVF6N9/S/CXgcOuWNrFAx AH1kBe8uKOdlfS4OWhKP+j38PiHScwMsH5iM2Eqnnl0R+skJvuC+5n0drnb8GkVFkFL5Eq FXd9+SJu4UoPK+vc1ddhjjTpOxhnn6w+Fh3hXPWctj/I3A0nT6/cFACxm/e+oPn3FZm2+v spfFkHOtt86vQZ0MMLJiVR/Qq/TnvbT4WOn4Ny2K+/MzJrPJTjqy9iJE7bMspCRe7UaP+I qIthyVH6c7up5R8THts73Tw8Z6VT4fjWVhpwGu6vkdcdItgZAmzVyvrab2T0Xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0ABE95696; Fri, 25 Mar 2022 13:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22PDgfsB018410; Fri, 25 Mar 2022 13:42:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22PDgf6n018409; Fri, 25 Mar 2022 13:42:41 GMT (envelope-from git) Date: Fri, 25 Mar 2022 13:42:41 GMT Message-Id: <202203251342.22PDgf6n018409@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: eefb851bfa83 - main - devel/libunwind: Rename patch file and add comment List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eefb851bfa83b0d84ebaacdb11ce4dbeb770f13d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648215764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SEl533CFWu7xfRIsOM2Ss8oCYfsZ0rvoSlbqovVMRLU=; b=Rksq+t6s5Pl2ES/MMg4uHRDQf2ifwdHnAMr90Ln6eO294zN2VY8Y2coFUozsll/+6khQsS xe+b9igLascpxDmDJQpVMphy27+XzraaBwXDaXPXJdVrNAhZ6VB69Wd3OqqcuLcfLdIfyR Kc16ibawOWbguXL8nXcXQ2wRZQZlzg4CsLhjGsBkDMsPK0V9gzpiVaziqeeTVE/HcdQy6X mcRDhLlqYlV9TvleFjGvIc3JfcbXKxpf7lTJlVVVOlbHDXfp/RNQVkObYtxWDM0a7U6i2U QsBsAgRy577I+GHI/dnPYsrfArbPpWUEpDd8yDec/WPUobFEBZogMJvYaS+3bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648215764; a=rsa-sha256; cv=none; b=loKMo7AYP1PKyVsk52cRQVAHD6BR+cSjlNo/0mL5XDJCE3OOLWDgjTJl71DHPWiTFLvI8o U/6s1BIQ099NnCL1s2yL32mzl+cTf0IEStZQjTgyL1AIEx+OZFgoaS1niZaTHlz6JGFhuE UIJMm2Lb140dzNtbV0M/HlnVGEbBIuSIEeIX54fDC1eeCHymDs/Dk0LVqCecNk4GAXK6my LwkEIWPypMl1FKkiuNFqjz1kVcUywuW85xz36EITrMtrKOwxqJv1QjYFcKALpAW7XlxdwD 5ujnDM+iY96k+HiTxfQaaRf2+LRUgIXpMyBNTAB45J/dXL02d5W0GL+Bodl/XQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=eefb851bfa83b0d84ebaacdb11ce4dbeb770f13d commit eefb851bfa83b0d84ebaacdb11ce4dbeb770f13d Author: Po-Chuan Hsieh AuthorDate: 2022-03-25 12:45:56 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-03-25 13:36:40 +0000 devel/libunwind: Rename patch file and add comment --- devel/libunwind/files/patch-aarch64 | 64 ++++++++++++++++++++++ .../files/patch-include_libunwind-aarch64.h | 28 ---------- devel/libunwind/files/patch-src_aarch64_Ginit.c | 20 ------- .../libunwind/files/patch-src_aarch64_unwind__i.h | 13 ----- 4 files changed, 64 insertions(+), 61 deletions(-) diff --git a/devel/libunwind/files/patch-aarch64 b/devel/libunwind/files/patch-aarch64 new file mode 100644 index 000000000000..5df59a1815ae --- /dev/null +++ b/devel/libunwind/files/patch-aarch64 @@ -0,0 +1,64 @@ +Reference: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262447 + https://github.com/libunwind/libunwind/pull/344 + +--- include/libunwind-aarch64.h.orig 2021-12-01 00:46:39 UTC ++++ include/libunwind-aarch64.h +@@ -226,15 +226,24 @@ typedef struct + #else + /* On AArch64, we can directly use ucontext_t as the unwind context. */ + typedef ucontext_t unw_tdep_context_t; ++#if defined(__FreeBSD__) ++typedef ucontext_t unw_fpsimd_context_t; + #endif ++#endif + + + #include "libunwind-common.h" + #include "libunwind-dynamic.h" + ++#if defined(__FreeBSD__) ++#define UNW_BASE register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.mc_gpregs.gp_x[0]; ++#else ++#define UNW_BASE register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.regs; ++#endif ++ + #define unw_tdep_getcontext(uc) ({ \ + unw_tdep_context_t *unw_ctx = (uc); \ +- register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.regs; \ ++ UNW_BASE \ + __asm__ __volatile__ ( \ + "stp x0, x1, [%[base], #0]\n" \ + "stp x2, x3, [%[base], #16]\n" \ +--- src/aarch64/Ginit.c.orig 2021-11-30 17:12:31 UTC ++++ src/aarch64/Ginit.c +@@ -47,9 +47,17 @@ static inline void * + uc_addr (unw_tdep_context_t *uc, int reg) + { + if (reg >= UNW_AARCH64_X0 && reg < UNW_AARCH64_V0) ++#if defined(__FreeBSD__) ++ return &uc->uc_mcontext.mc_gpregs.gp_x[reg]; ++#else + return &uc->uc_mcontext.regs[reg]; ++#endif + else if (reg >= UNW_AARCH64_V0 && reg <= UNW_AARCH64_V31) ++#if defined(__FreeBSD__) ++ return &GET_FPCTX(uc)->uc_mcontext.mc_fpregs.fp_q[reg - UNW_AARCH64_V0]; ++#else + return &GET_FPCTX(uc)->vregs[reg - UNW_AARCH64_V0]; ++#endif + else + return NULL; + } +--- src/aarch64/unwind_i.h.orig 2020-04-28 15:49:14 UTC ++++ src/aarch64/unwind_i.h +@@ -59,6 +59,10 @@ extern int aarch64_local_resume (unw_addr_space_t as, + } while (0) + #endif + ++#if defined(__FreeBSD__) ++#define GET_FPCTX(uc) ((unw_tdep_context_t *)(&uc->uc_mcontext.mc_spare)) ++#else + #define GET_FPCTX(uc) ((unw_fpsimd_context_t *)(&uc->uc_mcontext.__reserved)) ++#endif + + #endif /* unwind_i_h */ diff --git a/devel/libunwind/files/patch-include_libunwind-aarch64.h b/devel/libunwind/files/patch-include_libunwind-aarch64.h deleted file mode 100644 index b15e9f14f249..000000000000 --- a/devel/libunwind/files/patch-include_libunwind-aarch64.h +++ /dev/null @@ -1,28 +0,0 @@ ---- include/libunwind-aarch64.h.orig 2021-12-01 00:46:39 UTC -+++ include/libunwind-aarch64.h -@@ -226,15 +226,24 @@ typedef struct - #else - /* On AArch64, we can directly use ucontext_t as the unwind context. */ - typedef ucontext_t unw_tdep_context_t; -+#if defined(__FreeBSD__) -+typedef ucontext_t unw_fpsimd_context_t; - #endif -+#endif - - - #include "libunwind-common.h" - #include "libunwind-dynamic.h" - -+#if defined(__FreeBSD__) -+#define UNW_BASE register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.mc_gpregs.gp_x[0]; -+#else -+#define UNW_BASE register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.regs; -+#endif -+ - #define unw_tdep_getcontext(uc) ({ \ - unw_tdep_context_t *unw_ctx = (uc); \ -- register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.regs; \ -+ UNW_BASE \ - __asm__ __volatile__ ( \ - "stp x0, x1, [%[base], #0]\n" \ - "stp x2, x3, [%[base], #16]\n" \ diff --git a/devel/libunwind/files/patch-src_aarch64_Ginit.c b/devel/libunwind/files/patch-src_aarch64_Ginit.c deleted file mode 100644 index d4687b361b27..000000000000 --- a/devel/libunwind/files/patch-src_aarch64_Ginit.c +++ /dev/null @@ -1,20 +0,0 @@ ---- src/aarch64/Ginit.c.orig 2021-11-30 17:12:31 UTC -+++ src/aarch64/Ginit.c -@@ -47,9 +47,17 @@ static inline void * - uc_addr (unw_tdep_context_t *uc, int reg) - { - if (reg >= UNW_AARCH64_X0 && reg < UNW_AARCH64_V0) -+#if defined(__FreeBSD__) -+ return &uc->uc_mcontext.mc_gpregs.gp_x[reg]; -+#else - return &uc->uc_mcontext.regs[reg]; -+#endif - else if (reg >= UNW_AARCH64_V0 && reg <= UNW_AARCH64_V31) -+#if defined(__FreeBSD__) -+ return &GET_FPCTX(uc)->uc_mcontext.mc_fpregs.fp_q[reg - UNW_AARCH64_V0]; -+#else - return &GET_FPCTX(uc)->vregs[reg - UNW_AARCH64_V0]; -+#endif - else - return NULL; - } diff --git a/devel/libunwind/files/patch-src_aarch64_unwind__i.h b/devel/libunwind/files/patch-src_aarch64_unwind__i.h deleted file mode 100644 index aa1e8ccbc838..000000000000 --- a/devel/libunwind/files/patch-src_aarch64_unwind__i.h +++ /dev/null @@ -1,13 +0,0 @@ ---- src/aarch64/unwind_i.h.orig 2020-04-28 15:49:14 UTC -+++ src/aarch64/unwind_i.h -@@ -59,6 +59,10 @@ extern int aarch64_local_resume (unw_addr_space_t as, - } while (0) - #endif - -+#if defined(__FreeBSD__) -+#define GET_FPCTX(uc) ((unw_tdep_context_t *)(&uc->uc_mcontext.mc_spare)) -+#else - #define GET_FPCTX(uc) ((unw_fpsimd_context_t *)(&uc->uc_mcontext.__reserved)) -+#endif - - #endif /* unwind_i_h */