From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CE0C01581EC for ; Sat, 23 Nov 2024 16:54:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C35CDE082F; Sat, 23 Nov 2024 16:54:47 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A8474E0824 for ; Sat, 23 Nov 2024 16:54:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EA249341707 for ; Sat, 23 Nov 2024 16:54:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 895321E74 for ; Sat, 23 Nov 2024 16:54:45 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1732380844.035bae314b847add8934886e11a4df62b9c7f16d.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-board/stockfish/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-board/stockfish/stockfish-16-r1.ebuild games-board/stockfish/stockfish-16.1.ebuild games-board/stockfish/stockfish-16.ebuild games-board/stockfish/stockfish-17.ebuild X-VCS-Directories: games-board/stockfish/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 035bae314b847add8934886e11a4df62b9c7f16d X-VCS-Branch: master Date: Sat, 23 Nov 2024 16:54:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 601d3c04-bddf-4425-a245-35ec9d9f879c X-Archives-Hash: a9e3def26a1693356c9c4ff3d9aabe15 commit: 035bae314b847add8934886e11a4df62b9c7f16d Author: Sv. Lockal gmail com> AuthorDate: Sat Jul 13 14:40:56 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sat Nov 23 16:54:04 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=035bae31 games-board/stockfish: fix clang build failure COMP should be a fixed string like clang/gcc to set tools for PGO. Possible values are described in https://disservin.github.io/stockfish-docs/stockfish-wiki/Compiling-from-source.html#compilers Note that even though COMP points to C compiler, stockfish calls only C++ compile provided in COMPILER parameter. Closes: https://bugs.gentoo.org/919781 Signed-off-by: Sv. Lockal gmail.com> Closes: https://github.com/gentoo/gentoo/pull/37542 Signed-off-by: Sam James gentoo.org> games-board/stockfish/stockfish-16-r1.ebuild | 13 ++++++++++++- games-board/stockfish/stockfish-16.1.ebuild | 13 ++++++++++++- games-board/stockfish/stockfish-16.ebuild | 13 ++++++++++++- games-board/stockfish/stockfish-17.ebuild | 13 ++++++++++++- 4 files changed, 48 insertions(+), 4 deletions(-) diff --git a/games-board/stockfish/stockfish-16-r1.ebuild b/games-board/stockfish/stockfish-16-r1.ebuild index 87fef36d749c..ff7e0ac8d26a 100644 --- a/games-board/stockfish/stockfish-16-r1.ebuild +++ b/games-board/stockfish/stockfish-16-r1.ebuild @@ -22,6 +22,12 @@ DEPEND="|| ( app-arch/unzip app-arch/zip )" S="${WORKDIR}/Stockfish-sf_${PV}/src" +pkg_setup() { + if ! tc-is-clang && ! tc-is-gcc; then + die "Unsupported compiler: $(tc-getCC)" + fi +} + src_prepare() { default @@ -66,11 +72,16 @@ src_compile() { use ppc && my_arch=ppc use ppc64 && my_arch=ppc64 + # Bug 919781: COMP is a fixed string like clang/gcc to set tools for PGO + local comp + tc-is-gcc && comp="gcc" + tc-is-clang && comp="clang" + # There's a nice hack in the Makefile that overrides the value of CXX with # COMPILER to support Travis CI and we abuse it to make sure that we # build with our compiler of choice. emake profile-build ARCH="${my_arch}" \ - COMP="$(tc-getCXX)" \ + COMP="${comp}" \ COMPILER="$(tc-getCXX)" \ debug=$(usex debug "yes" "no") \ optimize=$(usex optimize "yes" "no") diff --git a/games-board/stockfish/stockfish-16.1.ebuild b/games-board/stockfish/stockfish-16.1.ebuild index 8d66d9cfa7cf..4cc6280b6b5d 100644 --- a/games-board/stockfish/stockfish-16.1.ebuild +++ b/games-board/stockfish/stockfish-16.1.ebuild @@ -26,6 +26,12 @@ DEPEND="|| ( app-arch/unzip app-arch/zip )" S="${WORKDIR}/Stockfish-sf_${PV}/src" +pkg_setup() { + if ! tc-is-clang && ! tc-is-gcc; then + die "Unsupported compiler: $(tc-getCC)" + fi +} + src_prepare() { default @@ -72,11 +78,16 @@ src_compile() { use ppc && my_arch=ppc use ppc64 && my_arch=ppc64 + # Bug 919781: COMP is a fixed string like clang/gcc to set tools for PGO + local comp + tc-is-gcc && comp="gcc" + tc-is-clang && comp="clang" + # There's a nice hack in the Makefile that overrides the value of CXX with # COMPILER to support Travis CI and we abuse it to make sure that we # build with our compiler of choice. emake profile-build ARCH="${my_arch}" \ - COMP="$(tc-getCXX)" \ + COMP="${comp}" \ COMPILER="$(tc-getCXX)" \ debug=$(usex debug "yes" "no") \ optimize=$(usex optimize "yes" "no") diff --git a/games-board/stockfish/stockfish-16.ebuild b/games-board/stockfish/stockfish-16.ebuild index 4cabca417965..9103928f0daa 100644 --- a/games-board/stockfish/stockfish-16.ebuild +++ b/games-board/stockfish/stockfish-16.ebuild @@ -22,6 +22,12 @@ DEPEND="|| ( app-arch/unzip app-arch/zip )" S="${WORKDIR}/Stockfish-sf_${PV}/src" +pkg_setup() { + if ! tc-is-clang && ! tc-is-gcc; then + die "Unsupported compiler: $(tc-getCC)" + fi +} + src_prepare() { default @@ -61,11 +67,16 @@ src_compile() { use ppc && my_arch=ppc use ppc64 && my_arch=ppc64 + # Bug 919781: COMP is a fixed string like clang/gcc to set tools for PGO + local comp + tc-is-gcc && comp="gcc" + tc-is-clang && comp="clang" + # There's a nice hack in the Makefile that overrides the value of CXX with # COMPILER to support Travis CI and we abuse it to make sure that we # build with our compiler of choice. emake profile-build ARCH="${my_arch}" \ - COMP="$(tc-getCXX)" \ + COMP="${comp}" \ COMPILER="$(tc-getCXX)" \ debug=$(usex debug "yes" "no") \ optimize=$(usex optimize "yes" "no") diff --git a/games-board/stockfish/stockfish-17.ebuild b/games-board/stockfish/stockfish-17.ebuild index bbc0c90cbf73..b535bb5e9f54 100644 --- a/games-board/stockfish/stockfish-17.ebuild +++ b/games-board/stockfish/stockfish-17.ebuild @@ -26,6 +26,12 @@ DEPEND="|| ( app-arch/unzip app-arch/zip )" S="${WORKDIR}/Stockfish-sf_${PV}/src" +pkg_setup() { + if ! tc-is-clang && ! tc-is-gcc; then + die "Unsupported compiler: $(tc-getCC)" + fi +} + src_prepare() { default @@ -72,11 +78,16 @@ src_compile() { use ppc && my_arch=ppc use ppc64 && my_arch=ppc64 + # Bug 919781: COMP is a fixed string like clang/gcc to set tools for PGO + local comp + tc-is-gcc && comp="gcc" + tc-is-clang && comp="clang" + # There's a nice hack in the Makefile that overrides the value of CXX with # COMPILER to support Travis CI and we abuse it to make sure that we # build with our compiler of choice. emake profile-build ARCH="${my_arch}" \ - COMP="$(tc-getCXX)" \ + COMP="${comp}" \ COMPILER="$(tc-getCXX)" \ debug=$(usex debug "yes" "no") \ optimize=$(usex optimize "yes" "no")