media-libs/vulkan-loader: Fix building x86 with clang
authorPeter Levine <plevine457@gmail.com>
Mon, 21 Oct 2019 02:24:55 +0000 (22:24 -0400)
committerNick Sarnie <sarnex@gentoo.org>
Mon, 21 Oct 2019 22:48:19 +0000 (18:48 -0400)
Append -fno-integrated-as to CFLAGS when building with clang and when
ABI is x86 to prevent breakage.

Closes: https://bugs.gentoo.org/698164
Package-Manager: Portage-2.3.77, Repoman-2.3.17
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
media-libs/vulkan-loader/vulkan-loader-9999.ebuild

index 3de83b75dd7369ea2d63aaa99f3e2c8e862789a2..7b03900c566681758cd3af7b456057dc3e71e722 100644 (file)
@@ -21,7 +21,7 @@ else
        S="${WORKDIR}"/${MY_P}
 fi
 
-inherit python-any-r1 cmake-multilib
+inherit toolchain-funcs python-any-r1 cmake-multilib
 
 DESCRIPTION="Vulkan Installable Client Driver (ICD) Loader"
 HOMEPAGE="https://github.com/KhronosGroup/Vulkan-Loader"
@@ -40,6 +40,11 @@ DEPEND="${PYTHON_DEPS}
        )"
 
 multilib_src_configure() {
+       # Integrated clang assembler doesn't work with x86 - Bug #698164
+       if [[ tc-is-clang && ${ABI} == x86 ]]; then
+               append-cflags -fno-integrated-as
+       fi
+
        local mycmakeargs=(
                -DCMAKE_SKIP_RPATH=True
                -DBUILD_TESTS=False