From nobody Mon Mar 21 02:21:01 2022 X-Original-To: dev-commits-ports-all@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 158641A34486; Mon, 21 Mar 2022 02:21:02 +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 4KMJJG075Mz3Fl0; Mon, 21 Mar 2022 02:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647829262; 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=A/vvQeN3do/ok73sUE5ISACuRZX9Nl2RqvbhwRYWtd4=; b=l5n4O0eGUYpr7wUrywkv7lsiWm7zGygkT7MoLWj3SLvo89UEqdwkOJGMB4g0y8Tp8oi4Gj tmQPjQUYjasY06Q4FeQ1GKtGlxio3/19Y8utr3/A3DXzxg39ZMTlNtW7+9w1y8RWGCGAdz 8kAhWbJLGBCn38zrgcnp+4351zGAqzWgkReGfWmHNLbsQDe/MCFriHfVG2jWCbxkY3BW8k qOrcMdmnYzG+lxoe9fx5ETzefwNpC9AGc/lOQbXN+81eJVmnSYujB4dmxUNFwVFJPSYZXa +1KBMsnRPM559R2Qq18hlMzHe6rKPVsp5NYgfXGlKSaBJgRYjAuweuVLIfVcHA== 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 D97D212C6A; Mon, 21 Mar 2022 02:21:01 +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 22L2L16Z023757; Mon, 21 Mar 2022 02:21:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22L2L1OL023756; Mon, 21 Mar 2022 02:21:01 GMT (envelope-from git) Date: Mon, 21 Mar 2022 02:21:01 GMT Message-Id: <202203210221.22L2L1OL023756@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: 73341bbefa72 - main - graphics/opencv: fix build with LLVM 13 on powerpc64le List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@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: 73341bbefa7237dc8c430400d72b376b2378f0ea Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647829262; 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=A/vvQeN3do/ok73sUE5ISACuRZX9Nl2RqvbhwRYWtd4=; b=eeFcUlG5ByDJL3e1zdX+jJbQAo+EVTAtrQcWixobXj6NwymGvUbVWllRsBLDGK8iRxrCLK WYD1kr2JCxVTpWXo0gU6WGvNeBgWKs9ADPAMTfVTfgE1tlBjgrI/P9SQKeUeiPrxgAD3xZ GgkEjeRnmqmDVEwhMj/efokiFVdzYDNZI7hK3fPty1aK07KyQ4O7BSsKiZdC4lXMAha8D6 RX9SFEVo/ugb6nl8QvLUmpceMLKqcuyPa59CBwtjjj6G6b2yZBySft1Pkr+W1iTkxxy050 DhtCnlTjLoRXCftYMPOCvpN/nKOOP6Dtr7Ny15ZTnL2kJ4EZ+nHAHHkQLAQFjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647829262; a=rsa-sha256; cv=none; b=GYxMTe5+m6iDm21DDL0e9FDuneBa4htVc+4TVXinQ8JJLlNCnkYC0i8WFsHprMmsX1mep6 3gKiVTxx40uane1qXgMFOMVlwoTr4SGhxAhRZBDMUjsnUZNhCwt/81ZF0NxSOLFi7lfcx1 fYLYsa6aR0kjpTZrUBOdfA5ZGvBhNQSmbBxLD2A4BRhul3xUJNzqw7Kp9EOwFjlnipEg1T bwO83yf/ErMfgrMLIQ3SZ6593spoyLbv7zNZ6vcrOms0wpe0/xCrGxbBqc2RsL6fXT6VKT ok5hv0SrtRi+v1/NEFpWPxXHuAYclA541U/owvG4QUhCm0ENbqpgdx4GjH1qTQ== 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=73341bbefa7237dc8c430400d72b376b2378f0ea commit 73341bbefa7237dc8c430400d72b376b2378f0ea Author: Piotr Kubaj AuthorDate: 2022-03-21 02:17:46 +0000 Commit: Piotr Kubaj CommitDate: 2022-03-21 02:17:46 +0000 graphics/opencv: fix build with LLVM 13 on powerpc64le /wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:352:12: warning: 'vec_permi' macro redefined [-Wmacro-redefined] ^ /usr/lib/clang/13.0.0/include/altivec.h:13077:9: note: previous definition is here ^ /wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:370:25: error: redefinition of 'vec_promote' VSX_FINLINE(vec_dword2) vec_promote(long long a, int b) ^ /usr/lib/clang/13.0.0/include/altivec.h:14604:1: note: previous definition is here vec_promote(signed long long __a, int __b) { ^ /wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:377:26: error: redefinition of 'vec_promote' VSX_FINLINE(vec_udword2) vec_promote(unsigned long long a, int b) ^ /usr/lib/clang/13.0.0/include/altivec.h:14611:1: note: previous definition is here vec_promote(unsigned long long __a, int __b) { ^ /wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:1045:22: error: call to 'vec_rsqrt' is ambiguous { return v_float32x4(vec_rsqrt(x.val)); } ^~~~~~~~~ /usr/lib/clang/13.0.0/include/altivec.h:8472:34: note: candidate function static vector float __ATTRS_o_ai vec_rsqrt(vector float __a) { ^ /wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:362:29: note: candidate function VSX_FINLINE(vec_float4) vec_rsqrt(const vec_float4& a) ^ /wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:1047:22: error: call to 'vec_rsqrt' is ambiguous { return v_float64x2(vec_rsqrt(x.val)); } ^~~~~~~~~ /usr/lib/clang/13.0.0/include/altivec.h:8477:35: note: candidate function static vector double __ATTRS_o_ai vec_rsqrt(vector double __a) { ^ /wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:365:30: note: candidate function VSX_FINLINE(vec_double2) vec_rsqrt(const vec_double2& a) ^ 1 warning and 4 errors generated. --- ...odules_core_include_opencv2_core_vsx__utils.hpp | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/graphics/opencv/files/patch-modules_core_include_opencv2_core_vsx__utils.hpp b/graphics/opencv/files/patch-modules_core_include_opencv2_core_vsx__utils.hpp new file mode 100644 index 000000000000..4802cdfb7ec5 --- /dev/null +++ b/graphics/opencv/files/patch-modules_core_include_opencv2_core_vsx__utils.hpp @@ -0,0 +1,33 @@ +--- modules/core/include/opencv2/core/vsx_utils.hpp.orig 2022-03-21 01:40:15 UTC ++++ modules/core/include/opencv2/core/vsx_utils.hpp +@@ -324,6 +324,7 @@ VSX_IMPL_1RG(vec_udword2, vec_float4, xvcvspuxds, vec + #define VSX_IMPL_CONVERT(rt, rg, fnm) \ + VSX_FINLINE(rt) fnm(const rg& a) { return __builtin_convertvector(a, rt); } + ++#ifndef vec_permi + #if __clang_major__ < 5 + // implement vec_permi in a dirty way + # define VSX_IMPL_CLANG_4_PERMI(Tvec) \ +@@ -351,12 +352,14 @@ VSX_FINLINE(rt) fnm(const rg& a) { return __builtin_co + // vec_xxpermdi is missing little-endian supports in clang 4 just like gcc4 + # define vec_permi(a, b, c) vec_xxpermdi(b, a, (3 ^ (((c) & 1) << 1 | (c) >> 1))) + #endif // __clang_major__ < 5 ++#endif // vec_permi + + // shift left double by word immediate + #ifndef vec_sldw + # define vec_sldw vec_xxsldwi + #endif + ++#if __clang_major__ < 13 + // Implement vec_rsqrt since clang only supports vec_rsqrte + #ifndef vec_rsqrt + VSX_FINLINE(vec_float4) vec_rsqrt(const vec_float4& a) +@@ -380,6 +383,7 @@ VSX_FINLINE(vec_udword2) vec_promote(unsigned long lon + ret[b & 1] = a; + return ret; + } ++#endif + + // vec_popcnt should return unsigned but clang has different thought just like gcc in vec_vpopcnt + #define VSX_IMPL_POPCNTU(Tvec, Tvec2, ucast) \