aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Hill <rhill@gentoo.org>2013-06-04 05:21:14 +0000
committerRyan Hill <rhill@gentoo.org>2013-06-04 05:21:14 +0000
commit07f0f3dd2921767c94f853ab68814fb11f7acd45 (patch)
treec92272981263d8e4e0b9affed1a3c8872eef7106 /4.8.1/gentoo/48_all_x86_pr53113_libitm-avx.patch
parentAdd gcc 4.8.1 piepatchset (diff)
downloadgcc-patches-07f0f3dd2921767c94f853ab68814fb11f7acd45.tar.gz
gcc-patches-07f0f3dd2921767c94f853ab68814fb11f7acd45.tar.bz2
gcc-patches-07f0f3dd2921767c94f853ab68814fb11f7acd45.zip
Initial 4.8.1 patchset based of latest 4.8.0 patchset.
Diffstat (limited to '4.8.1/gentoo/48_all_x86_pr53113_libitm-avx.patch')
-rw-r--r--4.8.1/gentoo/48_all_x86_pr53113_libitm-avx.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/4.8.1/gentoo/48_all_x86_pr53113_libitm-avx.patch b/4.8.1/gentoo/48_all_x86_pr53113_libitm-avx.patch
new file mode 100644
index 0000000..b176530
--- /dev/null
+++ b/4.8.1/gentoo/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