From nobody Tue Apr 12 18:17:21 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 3967C1ACA114; Tue, 12 Apr 2022 18:17:22 +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 4KdDTY756Fz3Fqr; Tue, 12 Apr 2022 18:17:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649787442; 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=VlCnxhDA35ruBGE9T3zyejgo6BGP5pwXeb+fglD/LW4=; b=rH+3Xqn35vYlGJ6fzXlUkbEs9mq4a+tmaxECr8NZ7PY+Qw3RPm+ODr+SCZS5VmEri70LQa tEhR4EN3GnQ4HEcGudysiPnO3SPkZrIIv1XupN7jIV5ULWyXkmxrYsQ4ttHsIqKce27q15 ckUi5Sjw/qhUYPqUP3YxOUMe0uRYcVIOdDKXCIMMyz9JNa+Q6666teVfPH3NWuBKwIiYk7 nHD6uTR1ZXJ8xGwr5luaIsPtuqN1lTE0oPaBCiAoK5uNfUL+eHoovWyVnKJ5zBYb281CxL xYVjB6tKzhnBgSe7rIVI3o41y9dCKbLbnLe8EFa5mjB/Ck1Wzyr9XhgmCfpQIQ== 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 B56C01C37D; Tue, 12 Apr 2022 18:17:21 +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 23CIHLGq037844; Tue, 12 Apr 2022 18:17:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23CIHLdM037843; Tue, 12 Apr 2022 18:17:21 GMT (envelope-from git) Date: Tue, 12 Apr 2022 18:17:21 GMT Message-Id: <202204121817.23CIHLdM037843@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: 1e7b421ad523 - main - security/openssl-devel: fix build on powerpc* 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: pkubaj X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e7b421ad523a4026f0f76e57f12320637e09552 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649787442; 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=VlCnxhDA35ruBGE9T3zyejgo6BGP5pwXeb+fglD/LW4=; b=BHrCWX3r3tReZUW4ReUpkRftjtzio4HLp8uCG7kWTqFhcKXZuSYikUaf2gQ3vh2QXLZyye sxXyIJMMX9xB2Mgfw74OHpW1rmwMY2ZNsRUfhb5Y8wA3F1+Wj+csVawE2kqn/ewG+tnS9t a2ZVswSNtwojr1+ZF6YiLW3x1NXOD0MjZed5GF52W7PSXfcHx0j6J7NWEyyMqPDt9K7bfs V4R9L16h/KCSUCxeR4Lkbp2kbCKT/xFKCQM3Lui2YHZauRqBUvMYS59tIq2Ujb94MQVU1M KZs7KK5yWxbb9khiy2/fCAtQQ066Eqz9AlCOaid4LnyvTiCFZJyG7s0IUHASsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649787442; a=rsa-sha256; cv=none; b=TGciUSZAV0exUlI/nBB8z/XoS02BbyJ5Vnv4Fgk1Dtf1KW9QBCFJOZbkjShaiS2rNYl3xD ofPxezC0YhP9dWHKwPVBncYjoWPqysuz21kwYA7cnVVWhbdLIog/83whHzNwXmYZGlvZPy i0QWLmbe1T9p9lf+pvQNM63Dx4y+wbVWuh699wLuAM6/J2v6iz/bgXFpy7KpQSylytSaIy mDq6b3XWgeRgab/dHPIV1m42/I1EpbYAMFuOraTg1J66DgeqhkdLjPUN8YKeY4lZxHR1nB rebEyEqVucJZuR2dC8RT+sjkUak9KNnk99xzdLx6Id4Mq9PSLyRulUekNSO6Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=1e7b421ad523a4026f0f76e57f12320637e09552 commit 1e7b421ad523a4026f0f76e57f12320637e09552 Author: Piotr Kubaj AuthorDate: 2022-04-12 18:06:19 +0000 Commit: Piotr Kubaj CommitDate: 2022-04-12 18:06:19 +0000 security/openssl-devel: fix build on powerpc* Bring back the patches removed earlier. --- .../files/patch-Configurations_10-main.conf | 35 ++++++++++++++++++++++ security/openssl-devel/files/patch-Configure | 11 +++++++ security/openssl-devel/files/patch-crypto_ppccap.c | 34 +++++++++++++++++++++ .../files/patch-util_perl_OpenSSL_config.pm | 14 +++++++++ 4 files changed, 94 insertions(+) diff --git a/security/openssl-devel/files/patch-Configurations_10-main.conf b/security/openssl-devel/files/patch-Configurations_10-main.conf new file mode 100644 index 000000000000..82503c0ff90c --- /dev/null +++ b/security/openssl-devel/files/patch-Configurations_10-main.conf @@ -0,0 +1,35 @@ +--- Configurations/10-main.conf.orig 2022-04-12 16:29:42 UTC ++++ Configurations/10-main.conf +@@ -1069,6 +1069,32 @@ my %targets = ( + perlasm_scheme => "linux64", + }, + ++ "BSD-ppc" => { ++ inherit_from => [ "BSD-generic32" ], ++ asm_arch => 'ppc32', ++ perlasm_scheme => "linux32", ++ lib_cppflags => add("-DB_ENDIAN"), ++ }, ++ ++ "BSD-ppc64" => { ++ inherit_from => [ "BSD-generic64" ], ++ cflags => add("-m64"), ++ cxxflags => add("-m64"), ++ lib_cppflags => add("-DB_ENDIAN"), ++ asm_arch => 'ppc64', ++ perlasm_scheme => "linux64", ++ }, ++ ++ "BSD-ppc64le" => { ++ inherit_from => [ "BSD-generic64" ], ++ cflags => add("-m64"), ++ cxxflags => add("-m64"), ++ lib_cppflags => add("-DL_ENDIAN"), ++ asm_arch => 'ppc64', ++ perlasm_scheme => "linux64le", ++ }, ++ ++ + "bsdi-elf-gcc" => { + inherit_from => [ "BASE_unix" ], + CC => "gcc", diff --git a/security/openssl-devel/files/patch-Configure b/security/openssl-devel/files/patch-Configure new file mode 100644 index 000000000000..c26823c674f3 --- /dev/null +++ b/security/openssl-devel/files/patch-Configure @@ -0,0 +1,11 @@ +--- Configure.orig 2022-04-12 16:30:34 UTC ++++ Configure +@@ -1549,7 +1549,7 @@ my %predefined_CXX = $config{CXX} + + unless ($disabled{asm}) { + # big endian systems can use ELFv2 ABI +- if ($target eq "linux-ppc64") { ++ if ($target eq "linux-ppc64" || $target eq "BSD-ppc64") { + $target{perlasm_scheme} = "linux64v2" if ($predefined_C{_CALL_ELF} == 2); + } + } diff --git a/security/openssl-devel/files/patch-crypto_ppccap.c b/security/openssl-devel/files/patch-crypto_ppccap.c new file mode 100644 index 000000000000..14da11dedd4b --- /dev/null +++ b/security/openssl-devel/files/patch-crypto_ppccap.c @@ -0,0 +1,34 @@ +--- crypto/ppccap.c.orig 2022-04-12 16:31:27 UTC ++++ crypto/ppccap.c +@@ -117,14 +117,18 @@ static unsigned long getauxval(unsigned long key) + #endif + + /* I wish was universally available */ +-#define HWCAP 16 /* AT_HWCAP */ ++#ifndef AT_HWCAP ++# define AT_HWCAP 16 /* AT_HWCAP */ ++#endif + #define HWCAP_PPC64 (1U << 30) + #define HWCAP_ALTIVEC (1U << 28) + #define HWCAP_FPU (1U << 27) + #define HWCAP_POWER6_EXT (1U << 9) + #define HWCAP_VSX (1U << 7) + +-#define HWCAP2 26 /* AT_HWCAP2 */ ++#ifndef AT_HWCAP2 ++# define AT_HWCAP2 26 /* AT_HWCAP2 */ ++#endif + #define HWCAP_VEC_CRYPTO (1U << 25) + #define HWCAP_ARCH_3_00 (1U << 23) + +@@ -215,8 +219,8 @@ void OPENSSL_cpuid_setup(void) + + #ifdef OSSL_IMPLEMENT_GETAUXVAL + { +- unsigned long hwcap = getauxval(HWCAP); +- unsigned long hwcap2 = getauxval(HWCAP2); ++ unsigned long hwcap = getauxval(AT_HWCAP); ++ unsigned long hwcap2 = getauxval(AT_HWCAP2); + + if (hwcap & HWCAP_FPU) { + OPENSSL_ppccap_P |= PPC_FPU; diff --git a/security/openssl-devel/files/patch-util_perl_OpenSSL_config.pm b/security/openssl-devel/files/patch-util_perl_OpenSSL_config.pm new file mode 100644 index 000000000000..9c669372a4f1 --- /dev/null +++ b/security/openssl-devel/files/patch-util_perl_OpenSSL_config.pm @@ -0,0 +1,14 @@ +--- util/perl/OpenSSL/config.pm.orig 2022-04-12 16:34:06 UTC ++++ util/perl/OpenSSL/config.pm +@@ -747,8 +747,9 @@ EOF + disable => [ 'sse2' ] } ], + [ 'alpha.*-.*-.*bsd.*', { target => "BSD-generic64", + defines => [ 'L_ENDIAN' ] } ], +- [ 'powerpc64-.*-.*bsd.*', { target => "BSD-generic64", +- defines => [ 'B_ENDIAN' ] } ], ++ [ 'powerpc-.*-.*bsd.*', { target => "BSD-ppc" } ], ++ [ 'powerpc64-.*-.*bsd.*', { target => "BSD-ppc64" } ], ++ [ 'powerpc64le-.*-.*bsd.*', { target => "BSD-ppc64le" } ], + [ 'riscv64-.*-.*bsd.*', { target => "BSD-riscv64" } ], + [ 'sparc64-.*-.*bsd.*', { target => "BSD-sparc64" } ], + [ 'ia64-.*-.*bsd.*', { target => "BSD-ia64" } ],