games-emulation/pcsx2: append -mxsave compiler flag with gcc >= 8.2
authorYuri Konotopov <ykonotopov@gnome.org>
Mon, 6 May 2019 11:34:41 +0000 (15:34 +0400)
committerAndreas Sturmlechner <asturm@gentoo.org>
Wed, 8 May 2019 17:03:36 +0000 (19:03 +0200)
Closes: https://bugs.gentoo.org/685156
Closes: https://github.com/gentoo/gentoo/pull/11915

Signed-off-by: Yuri Konotopov <ykonotopov@gnome.org>
Closes: https://github.com/gentoo/gentoo/pull/11915
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
games-emulation/pcsx2/pcsx2-9999.ebuild

index 8a2a3fc4c02492fd57837c4ec99ef9ca0fb2baa6..f287474f50598c2c658a571143ba81af7c7c3c8b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -45,6 +45,12 @@ pkg_setup() {
                if [[ $(gcc-major-version) -lt 4 || $(gcc-major-version) == 4 && $(gcc-minor-version) -lt 8 ]] ; then
                        die "${PN} does not compile with gcc less than 4.8"
                fi
+
+               # -mxsave flag is needed when GCC >= 8.2 is used
+               # https://bugs.gentoo.org/685156
+               if [[ $(gcc-major-version) -gt 8 || $(gcc-major-version) == 8 && $(gcc-minor-version) -ge 2 ]]; then
+                       append-flags -mxsave
+               fi
        fi
 }