commit:     1dec9f625b40e91fcf680d8bfd80f8d876ea8ee5
Author:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
AuthorDate: Tue May  5 16:55:39 2015 +0000
Commit:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Tue May  5 17:24:42 2015 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=1dec9f62

[qt4-build-multilib] Disable instruction set when the corresponding flag is 
present

This wasn't necessary until now because the user's flags were overriding
the additional -mfoo flag passed from configure to compile.test. However
we will soon stop substituting the flags directly in compile.test because
that doesn't work in the multilib case, and there is no other feasible way
to have the user's flags take precedence over the appended ones during
the configure tests.

Therefore we now detect if the user disabled one or more instruction sets,
and pass the corresponding -no-foo option to configure.

Credit to kensington for the idea.

 eclass/qt4-build-multilib.eclass | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/eclass/qt4-build-multilib.eclass b/eclass/qt4-build-multilib.eclass
index 9a758e4..2c4de88 100644
--- a/eclass/qt4-build-multilib.eclass
+++ b/eclass/qt4-build-multilib.eclass
@@ -339,6 +339,18 @@ qt4_multilib_src_configure() {
                -arch ${arch}
                -platform $(qt4_get_mkspec)
 
+               # instruction set support
+               $(is-flagq -mno-mmx     && echo -no-mmx)
+               $(is-flagq -mno-3dnow   && echo -no-3dnow)
+               $(is-flagq -mno-sse     && echo -no-sse)
+               $(is-flagq -mno-sse2    && echo -no-sse2)
+               $(is-flagq -mno-sse3    && echo -no-sse3)
+               $(is-flagq -mno-ssse3   && echo -no-ssse3)
+               $(is-flagq -mno-sse4.1  && echo -no-sse4.1)
+               $(is-flagq -mno-sse4.2  && echo -no-sse4.2)
+               $(is-flagq -mno-avx     && echo -no-avx)
+               $(is-flagq -mfpu=*      && ! is-flagq -mfpu=*neon* && echo 
-no-neon)
+
                # prefer system libraries
                -system-zlib
 

Reply via email to