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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 82FA2138334 for ; Mon, 23 Jul 2018 06:17:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E084EE03EC; Mon, 23 Jul 2018 06:17:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 35DCAE03EC for ; Mon, 23 Jul 2018 06:17:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5AD4F335D11 for ; Mon, 23 Jul 2018 06:17:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 08E6C380 for ; Mon, 23 Jul 2018 06:17:15 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1532326629.2125b084cea6e23fc24d07e748dc0a3b5521c8f9.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/pcsx2/files/, games-emulation/pcsx2/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-emulation/pcsx2/files/pcsx2-1.4.0-xgetbv.patch games-emulation/pcsx2/pcsx2-1.4.0.ebuild X-VCS-Directories: games-emulation/pcsx2/files/ games-emulation/pcsx2/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 2125b084cea6e23fc24d07e748dc0a3b5521c8f9 X-VCS-Branch: master Date: Mon, 23 Jul 2018 06:17:15 +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-Archives-Salt: 79afae47-7fd8-48fe-8540-01031fbe9667 X-Archives-Hash: 8ce0b81c7f4c2cc94a073eeae60df95f commit: 2125b084cea6e23fc24d07e748dc0a3b5521c8f9 Author: Sergei Trofimovich gentoo org> AuthorDate: Mon Jul 23 06:16:50 2018 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Mon Jul 23 06:17:09 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2125b084 games-emulation/pcsx2: tweak for gcc-8 It's a backport of upstream commit 171e7f016dc9e132f9faf40a22f0312d45d356a5 "common: Work around GCC8 _xgetbv bug" Bug: https://gcc.gnu.org/PR85684 Package-Manager: Portage-2.3.43, Repoman-2.3.10 .../pcsx2/files/pcsx2-1.4.0-xgetbv.patch | 26 ++++++++++++++++++++++ games-emulation/pcsx2/pcsx2-1.4.0.ebuild | 7 ++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/games-emulation/pcsx2/files/pcsx2-1.4.0-xgetbv.patch b/games-emulation/pcsx2/files/pcsx2-1.4.0-xgetbv.patch new file mode 100644 index 00000000000..e90b0df9b6e --- /dev/null +++ b/games-emulation/pcsx2/files/pcsx2-1.4.0-xgetbv.patch @@ -0,0 +1,26 @@ +From 171e7f016dc9e132f9faf40a22f0312d45d356a5 Mon Sep 17 00:00:00 2001 +From: Jonathan Li +Date: Fri, 11 May 2018 01:42:27 +0100 +Subject: [PATCH] common: Work around GCC8 _xgetbv bug + +clang and earlier GCC versions do not provide the _xgetbv intrinsic. +GCC8 does, but unfortunately it's broken. +(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85684). + +Re-use our _xgetbv implementation to avoid the bug, but rename it to +avoid compilation errors as well. +--- + common/include/x86emitter/x86_intrin.h | 7 ++++--- + common/src/x86emitter/cpudetect.cpp | 2 +- + 2 files changed, 5 insertions(+), 4 deletions(-) + +--- a/common/include/intrin_x86.h ++++ b/common/include/intrin_x86.h +@@ -107 +107 @@ static __inline__ __attribute__((always_inline)) void __cpuidex(int CPUInfo[], c +-static __inline__ __attribute__((always_inline)) unsigned long long _xgetbv(unsigned int index) ++static __inline__ __attribute__((always_inline)) unsigned long long _xgetbv_pcsx2(unsigned int index) +--- a/common/src/x86emitter/cpudetect.cpp ++++ b/common/src/x86emitter/cpudetect.cpp +@@ -273 +276 @@ void x86capabilities::Identify() +- if((_xgetbv(0) & 6) == 6) // XFEATURE_ENABLED_MASK[2:1] = '11b' (XMM state and YMM state are enabled by OS). ++ if((_xgetbv_pcsx2(0) & 6) == 6) // XFEATURE_ENABLED_MASK[2:1] = '11b' (XMM state and YMM state are enabled by OS). diff --git a/games-emulation/pcsx2/pcsx2-1.4.0.ebuild b/games-emulation/pcsx2/pcsx2-1.4.0.ebuild index cfd1606f91a..ac18cbd565e 100644 --- a/games-emulation/pcsx2/pcsx2-1.4.0.ebuild +++ b/games-emulation/pcsx2/pcsx2-1.4.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=5 @@ -43,7 +43,10 @@ DEPEND="${RDEPEND} S="${WORKDIR}/${PN}-${MY_PV}" -PATCHES=( "${FILESDIR}"/${P}-gcc5.patch ) +PATCHES=( + "${FILESDIR}"/${P}-gcc5.patch + "${FILESDIR}"/${P}-xgetbv.patch +) clean_locale() { rm -R "${S}"/locales/"${1}" || die