components/gcc49/patches/002-omp-lock.h.patch
changeset 5205 eaff9ab86216
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/gcc49/patches/002-omp-lock.h.patch	Wed Dec 16 20:20:50 2015 -0800
@@ -0,0 +1,37 @@
+# Stefan Teleman <[email protected]>
+# Make sure these structs are always aligned on 8.
+# Internal patch. Submitted upstream. Status pending.
+--- libgomp/config/posix/omp-lock.h	2008-06-06 09:01:54.000000000 -0400
++++ libgomp/config/posix/omp-lock.h	2014-11-19 08:34:08.522303786 -0500
+@@ -11,13 +11,28 @@
+ #include <semaphore.h>
+ 
+ typedef pthread_mutex_t omp_lock_25_t;
+-typedef struct { pthread_mutex_t lock; int count; } omp_nest_lock_25_t;
++
++typedef struct {
++  pthread_mutex_t lock;
++  int count;
++} omp_nest_lock_25_t __attribute__((__aligned__(8)));
++
+ #ifdef HAVE_BROKEN_POSIX_SEMAPHORES
+ /* If we don't have working semaphores, we'll make all explicit tasks
+    tied to the creating thread.  */
+ typedef pthread_mutex_t omp_lock_t;
+-typedef struct { pthread_mutex_t lock; int count; void *owner; } omp_nest_lock_t;
++
++typedef struct {
++  pthread_mutex_t lock;
++  int count;
++  void *owner;
++} omp_nest_lock_t __attribute__((__aligned__(8)));
+ #else
+ typedef sem_t omp_lock_t;
+-typedef struct { sem_t lock; int count; void *owner; } omp_nest_lock_t;
++typedef struct {
++  sem_t lock;
++  int count;
++  void *owner;
++} omp_nest_lock_t __attribute__((__aligned__(8)));
+ #endif
++