aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/48_all_x86_pr53113_libitm-avx.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-07-12 15:56:45 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-07-12 15:56:45 +0000
commit3e800bf8214c23fd8ebce936f9f846949750034e (patch)
tree057e4560c6198189f98f6c2829a1549a7fb45c16 /main/gcc/48_all_x86_pr53113_libitm-avx.patch
parent0a61db5bf5537be193aada0990fcdd355ebc264d (diff)
downloadaports-3e800bf8214c23fd8ebce936f9f846949750034e.tar.bz2
aports-3e800bf8214c23fd8ebce936f9f846949750034e.tar.xz
main/gcc: upgrade to 4.8.1
TODO: fix gcc-go
Diffstat (limited to 'main/gcc/48_all_x86_pr53113_libitm-avx.patch')
-rw-r--r--main/gcc/48_all_x86_pr53113_libitm-avx.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/gcc/48_all_x86_pr53113_libitm-avx.patch b/main/gcc/48_all_x86_pr53113_libitm-avx.patch
new file mode 100644
index 000000000..b17653023
--- /dev/null
+++ b/main/gcc/48_all_x86_pr53113_libitm-avx.patch
@@ -0,0 +1,28 @@
+libitm checks for AVX support in the assembler and adds -mavx to x86_avx.cc
+which defines the needed typedefs. User CFLAGS can override -mavx however,
+so also use the fallback typedef if __AVX__ isn't defined.
+
+https://bugs.gentoo.org/417271
+http://gcc.gnu.org/PR53113
+
+
+--- a/libitm/config/x86/x86_avx.cc
++++ b/libitm/config/x86/x86_avx.cc
+@@ -29,7 +29,7 @@
+
+ extern "C" {
+
+-#ifndef HAVE_AS_AVX
++#if !defined (HAVE_AS_AVX) || !defined(__AVX__)
+ // If we don't have an AVX capable assembler, we didn't set -mavx on the
+ // command-line either, which means that libitm.h defined neither this type
+ // nor the functions in this file. Define the type and unconditionally
+@@ -40,7 +40,7 @@ typedef float _ITM_TYPE_M256 __attribute__((vector_size(32), may_alias));
+ // Re-define the memcpy implementations so that we can frob the
+ // interface to deal with possibly missing AVX instruction set support.
+
+-#ifdef HAVE_AS_AVX
++#if defined(HAVE_AS_AVX) && defined(__AVX__)
+ #define RETURN(X) return X
+ #define STORE(X,Y) X = Y
+ #define OUTPUT(T) _ITM_TYPE_##T