commit:     ba018ae41ad2ef5b0bc78ad9a93d1dc982522be0
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 26 23:33:35 2018 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sat Jan 27 03:29:20 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba018ae4

media-libs/gst-plugins-base: filter out -mno-sse* flags that break 
introspection build

People who copy-paste the whole -march=native meaning out in full detail from 
the
various commands that give the equivalent face issues with the build here, 
because
the build system adds -msse4.1 and other flags explicitly itself to build 
runtime
tested SSE accelerated code, which doesn't get used if the runtime CPU doesn't
support them. Because of CFLAGS ordering of -mno-sse4.1 from make.conf and 
-msse4.1
from gst-plugins-base configure, and apparently slightly different flags used 
for
introspection generation, this ends up with introspection build thinking the SSE
specific symbols are there, while they actually aren't.

People who do this copy-pasting, really shouldn't be copying it all over 
verbatim,
especially the -mno-* flags, which are redundant in the usual situation (the
specific -march= probably doesn't enable them, so no need to -mno them), but 
causes
issues for such specific runtime checked optimizations.
Because we have a concrete list of instruction set flags in configure.ac that 
we'd
hit the issue with when the opposite -mno is present in CFLAGS, be nice to these
users by explicitly filtering out these redundant flags.
I think there's still something to fix in an upstream patch instead (the 
different
flags between library and introspection build?) , hence leaving the bug open for
the time being still.

Bug: https://bugs.gentoo.org/610340
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 media-libs/gst-plugins-base/gst-plugins-base-1.12.4.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/media-libs/gst-plugins-base/gst-plugins-base-1.12.4.ebuild 
b/media-libs/gst-plugins-base/gst-plugins-base-1.12.4.ebuild
index 56e9e237fd9..15e6288957d 100644
--- a/media-libs/gst-plugins-base/gst-plugins-base-1.12.4.ebuild
+++ b/media-libs/gst-plugins-base/gst-plugins-base-1.12.4.ebuild
@@ -4,7 +4,7 @@
 EAPI=6
 GST_ORG_MODULE="gst-plugins-base"
 
-inherit ltprune gstreamer
+inherit flag-o-matic ltprune gstreamer
 
 DESCRIPTION="Basepack of plugins for gstreamer"
 HOMEPAGE="https://gstreamer.freedesktop.org/";
@@ -47,6 +47,8 @@ DEPEND="${RDEPEND}
 RDEPEND+="!<media-libs/gst-plugins-bad-1.11.90:1.0" # rawparse move
 
 multilib_src_configure() {
+       filter-flags -mno-sse -mno-sse2 -mno-sse4.1 #610340
+
        gstreamer_multilib_src_configure \
                $(use_enable alsa) \
                $(multilib_native_use_enable introspection) \

Reply via email to