rhill       14/05/15 03:41:04

  Modified:             48_all_x86_pr53113_libitm-avx.patch README.history
  Log:
  Backport proper fix for bug #417271.

Revision  Changes    Path
1.2                  
src/patchsets/gcc/4.8.2/gentoo/48_all_x86_pr53113_libitm-avx.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.2/gentoo/48_all_x86_pr53113_libitm-avx.patch?rev=1.2&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.2/gentoo/48_all_x86_pr53113_libitm-avx.patch?rev=1.2&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.2/gentoo/48_all_x86_pr53113_libitm-avx.patch?r1=1.1&r2=1.2

Index: 48_all_x86_pr53113_libitm-avx.patch
===================================================================
RCS file: 
/var/cvsroot/gentoo/src/patchsets/gcc/4.8.2/gentoo/48_all_x86_pr53113_libitm-avx.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 48_all_x86_pr53113_libitm-avx.patch 10 Nov 2013 20:05:25 -0000      1.1
+++ 48_all_x86_pr53113_libitm-avx.patch 15 May 2014 03:41:04 -0000      1.2
@@ -1,28 +1,58 @@
-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.
+Force -mavx and -msse when needed.
 
 https://bugs.gentoo.org/417271
-http://gcc.gnu.org/PR53113
+https://gcc.gnu.org/PR53113
+https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=206587
 
+commit 7986635822d172ab35a858b02fcd822afa41f628
+Author: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date:   Mon Jan 13 19:36:17 2014 +0000
 
---- a/libitm/config/x86/x86_avx.cc
-+++ b/libitm/config/x86/x86_avx.cc
-@@ -29,7 +29,7 @@
+    Make sure that -msse/-mavx are appended at the end
+    
+       PR libitm/53113
+       * Makefile.am (x86_sse.lo): Append -msse to CXXFLAGS.
+       (x86_avx.lo): Append -mavx to CXXFLAGS.
+       * Makefile.in: Regenerate.
+    
+    
+    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206587 
138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libitm/ChangeLog   | 7 +++++++
+ libitm/Makefile.am | 6 ++++--
+ libitm/Makefile.in | 6 ++++--
+ 3 files changed, 15 insertions(+), 4 deletions(-)
+
+
+--- a/libitm/Makefile.am
++++ b/libitm/Makefile.am
+@@ -67,10 +67,12 @@ libitm_la_SOURCES += hwcap.cc
+ endif
+ if ARCH_X86
+ libitm_la_SOURCES += x86_sse.cc x86_avx.cc
+-x86_sse.lo : XCFLAGS += -msse
++# Make sure -msse is appended at the end.
++x86_sse.lo : override CXXFLAGS += -msse
+ endif
+ if ARCH_X86_AVX
+-x86_avx.lo : XCFLAGS += -mavx
++# Make sure -mavx is appended at the end.
++x86_avx.lo : override CXXFLAGS += -mavx
+ endif
  
- extern "C" {
+ if ARCH_FUTEX
+--- a/libitm/Makefile.in
++++ b/libitm/Makefile.in
+@@ -1050,8 +1050,10 @@ vpath % $(strip $(search_path))
+ @LIBITM_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBITM_BUILD_VERSIONED_SHLIB_TRUE@    
 `echo $(libitm_la_LIBADD) | \
+ @LIBITM_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBITM_BUILD_VERSIONED_SHLIB_TRUE@    
    sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
+ @LIBITM_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBITM_BUILD_VERSIONED_SHLIB_TRUE@    
 > $@ || (rm -f $@ ; exit 1)
+-@ARCH_X86_TRUE@x86_sse.lo : XCFLAGS += -msse
+-@ARCH_X86_AVX_TRUE@x86_avx.lo : XCFLAGS += -mavx
++# Make sure -msse is appended at the end.
++@ARCH_X86_TRUE@x86_sse.lo : override CXXFLAGS += -msse
++# Make sure -mavx is appended at the end.
++@ARCH_X86_AVX_TRUE@x86_avx.lo : override CXXFLAGS += -mavx
  
--#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.
+ all-local: $(STAMP_GENINSRC)
  
--#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



1.17                 src/patchsets/gcc/4.8.2/gentoo/README.history

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.2/gentoo/README.history?rev=1.17&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.2/gentoo/README.history?rev=1.17&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.2/gentoo/README.history?r1=1.16&r2=1.17

Index: README.history
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/gcc/4.8.2/gentoo/README.history,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- README.history      15 May 2014 01:06:52 -0000      1.16
+++ README.history      15 May 2014 03:41:04 -0000      1.17
@@ -1,4 +1,5 @@
 1.5            (pending)
+       U 48_all_x86_pr53113_libitm-avx.patch
        + 95_all_pr60960-wrong-code.patch
        + 96_all_pr59952-avx2-no-rtm.patch
 




Reply via email to