From owner-dev-commits-ports-all@freebsd.org Sun Apr 18 22:37:00 2021 Return-Path: Delivered-To: dev-commits-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 2975C5D8C1F; Sun, 18 Apr 2021 22:37:00 +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 4FNlDr0g6Hz4ckG; Sun, 18 Apr 2021 22:37:00 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 04F5214515; Sun, 18 Apr 2021 22:37:00 +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 13IMax6X046646; Sun, 18 Apr 2021 22:36:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13IMaxjN046645; Sun, 18 Apr 2021 22:36:59 GMT (envelope-from git) Date: Sun, 18 Apr 2021 22:36:59 GMT Message-Id: <202104182236.13IMaxjN046645@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Piotr Kubaj Subject: git: 9b429b80e033 - main - security/nettle: fix runtime issues on powerpc64 elfv2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b429b80e033ec7dabf0c87a76df372e3de36f2a Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 22:37:00 -0000 The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=9b429b80e033ec7dabf0c87a76df372e3de36f2a commit 9b429b80e033ec7dabf0c87a76df372e3de36f2a Author: Piotr Kubaj AuthorDate: 2021-04-18 22:36:56 +0000 Commit: Piotr Kubaj CommitDate: 2021-04-18 22:36:56 +0000 security/nettle: fix runtime issues on powerpc64 elfv2 nettle is compiled for elfv1 on powerpc64, which causes runtime crashes. Submitted by: jhibbits --- security/nettle/Makefile | 6 +++- .../nettle/files/extra-patch-powerpc64_machine.m4 | 32 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/security/nettle/Makefile b/security/nettle/Makefile index e28ec8166e04..694353749c2c 100644 --- a/security/nettle/Makefile +++ b/security/nettle/Makefile @@ -2,7 +2,7 @@ PORTNAME= nettle PORTVERSION= 3.7.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MASTER_SITES= GNU \ https://www.lysator.liu.se/~nisse/archive/ @@ -39,6 +39,10 @@ EXAMPLES_USES= ssl CONFIGURE_ENV+= CCPIC=-fPIC .endif +.if defined(PPC_ABI) && ${PPC_ABI} == ELFv2 +EXTRA_PATCHES= ${FILESDIR}/extra-patch-powerpc64_machine.m4 +.endif + post-patch: @${REINPLACE_CMD} -e '/libdir=/ s|lib32|lib|' ${WRKSRC}/configure .if ${ARCH} == "mips64" diff --git a/security/nettle/files/extra-patch-powerpc64_machine.m4 b/security/nettle/files/extra-patch-powerpc64_machine.m4 new file mode 100644 index 000000000000..e0bcdbd34fd2 --- /dev/null +++ b/security/nettle/files/extra-patch-powerpc64_machine.m4 @@ -0,0 +1,32 @@ +--- powerpc64/machine.m4.old 2021-04-18 10:51:29.072176000 -0500 ++++ powerpc64/machine.m4 2021-04-18 11:45:30.583315000 -0500 +@@ -1,26 +1,15 @@ + define(`PROLOGUE', + `.globl C_NAME($1) + DECLARE_FUNC(C_NAME($1)) +-ifelse(WORDS_BIGENDIAN,no, +-`ifdef(`FUNC_ALIGN',`.align FUNC_ALIGN') ++ifdef(`FUNC_ALIGN',`.align FUNC_ALIGN') + C_NAME($1): + addis 2,12,(.TOC.-C_NAME($1))@ha + addi 2,2,(.TOC.-C_NAME($1))@l +-.localentry C_NAME($1), .-C_NAME($1)', +-`.section ".opd","aw" +-.align 3 +-C_NAME($1): +-.quad .C_NAME($1),.TOC.@tocbase,0 +-.previous +-ifdef(`FUNC_ALIGN',`.align FUNC_ALIGN') +-.C_NAME($1):') ++.localentry C_NAME($1), .-C_NAME($1) + undefine(`FUNC_ALIGN')') + + define(`EPILOGUE', +-`ifelse(WORDS_BIGENDIAN,no, +-`.size C_NAME($1), . - C_NAME($1)', +-`.size .C_NAME($1), . - .C_NAME($1) +-.size C_NAME($1), . - .C_NAME($1)')') ++`.size C_NAME($1), . - C_NAME($1)') + + C Get vector-scalar register from vector register + C VSR(VR)