/[gentoo-x86]/app-office/libreoffice/files/libreoffice-check-for-avx.patch
Gentoo

Contents of /app-office/libreoffice/files/libreoffice-check-for-avx.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Apr 26 11:53:14 2012 UTC (23 months, 3 weeks ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +0 -0 lines
FILE REMOVED
Stable on ppc wrt bug#411449. Cleanup.

(Portage version: 2.2.0_alpha101/cvs/Linux x86_64)

1 diff --git a/configure.in b/configure.in
2 index 65813cb..bfa612c 100755
3 --- a/configure.in
4 +++ b/configure.in
5 @@ -1984,6 +1984,41 @@ if test "$GCC" = "yes"; then
6 fi
7 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
8
9 +dnl Check for AVX
10 +dnl ===================================================================
11 +AS_IF([test "x$AVX_CFLAGS" = "x"], [
12 + AS_IF([test "x$SUNCC" = "xyes" && test "x$AMD64_ABI" = "xno"], [
13 + AVX_CFLAGS="-xarch=avx"
14 + ])
15 +], [
16 + AVX_CFLAGS="-mavx -Winline"
17 +])
18 +
19 +have_avx_intrinsics=no
20 +AC_MSG_CHECKING(whether to use AVX intrinsics)
21 +avx_save_CFLAGS=$CFLAGS
22 +CFLAGS="$AVX_CFLAGS $CFLAGS"
23 +AC_COMPILE_IFELSE([
24 +#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5))
25 +# if !defined(__amd64__) && !defined(__x86_64__)
26 +# error "Need GCC >= 4.5 for AVX intrinsics on x86"
27 +# endif
28 +#endif
29 +#include <immintrin.h>
30 +int main () {
31 + __m256i a = _mm256_set1_epi32 (0), b = _mm256_set1_epi32 (0), c;
32 + c = _mm256_permute2f128_si256 (a, b, 0);
33 + return 0;
34 +}], have_avx_intrinsics=yes)
35 +CFLAGS=$avx_save_CFLAGS
36 +AC_MSG_RESULT([$have_avx_intrinsics])
37 +AS_IF([test "x$have_avx_intrinsics" = "xyes"], [
38 + HAVE_GCC_AVX=TRUE
39 +], [
40 + HAVE_GCC_AVX=FALSE
41 +])
42 +AC_SUBST(HAVE_GCC_AVX)
43 +
44 dnl ===================================================================
45 dnl Set the ENABLE_PCH variable. (Activate --enable-pch)
46 dnl ===================================================================
47 diff --git a/set_soenv.in b/set_soenv.in
48 index 4c047b6..a2b1b43 100755
49 --- a/set_soenv.in
50 +++ b/set_soenv.in
51 @@ -1841,6 +1841,7 @@ ToFile( "JAVAHOME", $JAVAHOME, "e" );
52 ToFile( "CC", $CC, "e" );
53 ToFile( "HAVE_GCC_VISIBILITY_FEATURE",
54 "@HAVE_GCC_VISIBILITY_FEATURE@", "e" );
55 +ToFile( "HAVE_GCC_AVX", "@HAVE_GCC_AVX@", "e" );
56 ToFile( "HAVE_GCC_VISIBILITY_BROKEN",
57 "@HAVE_GCC_VISIBILITY_BROKEN@", "e" );
58 ToFile( "HAVE_LD_HASH_STYLE","@HAVE_LD_HASH_STYLE@","e" );

  ViewVC Help
Powered by ViewVC 1.1.20