mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
games-emulation/dolphin: xgetbv tweak for gcc-8
Package-Manager: Portage-2.3.43, Repoman-2.3.10
This commit is contained in:
@@ -70,7 +70,10 @@ DEPEND="${RDEPEND}
|
||||
sys-devel/gettext
|
||||
virtual/pkgconfig"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${P}-CHAR_WIDTH-collision.patch )
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-CHAR_WIDTH-collision.patch
|
||||
"${FILESDIR}"/${P}-xgetbv.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cmake-utils_src_prepare
|
||||
|
||||
24
games-emulation/dolphin/files/dolphin-5.0-xgetbv.patch
Normal file
24
games-emulation/dolphin/files/dolphin-5.0-xgetbv.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
Workaround collision of _xgetbv intrinsic redeclaration:
|
||||
|
||||
Source/Core/Common/x64CPUDetect.cpp:45:12: error: ambiguating new declaration of ‘u64 _xgetbv(u32)’
|
||||
static u64 _xgetbv(u32 index)
|
||||
^~~~~~~
|
||||
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/include/x86intrin.h:74,
|
||||
from Source/Core/Common/Intrinsics.h:12,
|
||||
from Source/Core/Common/x64CPUDetect.cpp:10:
|
||||
/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/include/xsaveintrin.h:60:1: note: old declaration ‘long long int _xgetbv(unsigned int)’
|
||||
_xgetbv (unsigned int __A)
|
||||
^~~~~~~
|
||||
|
||||
Upstream fied it in
|
||||
commit 823fdda30c38be953c3d425874f2adeabed2b5a8
|
||||
intrinsics: stop defining _xgetbv/_XCR_XFEATURE_ENABLED_MASK, which are reserved
|
||||
|
||||
--- a/Source/Core/Common/x64CPUDetect.cpp
|
||||
+++ b/Source/Core/Common/x64CPUDetect.cpp
|
||||
@@ -45 +45 @@ static inline void __cpuid(int info[4], int function_id)
|
||||
-static u64 _xgetbv(u32 index)
|
||||
+static u64 _xgetbv_dolphin(u32 index)
|
||||
@@ -137 +137 @@ void CPUInfo::Detect()
|
||||
- if ((_xgetbv(_XCR_XFEATURE_ENABLED_MASK) & 0x6) == 0x6)
|
||||
+ if ((_xgetbv_dolphin(_XCR_XFEATURE_ENABLED_MASK) & 0x6) == 0x6)
|
||||
Reference in New Issue
Block a user