2 # Make a few alignment adjustments for sparc. This has not been
3 # submitted upstream yet.
5 --- gcc-5.3.0/libgomp/config/posix/omp-lock.h 2008-06-06 09:01:54.000000000 -0400
6 +++ gcc-5.3.0/libgomp/config/posix/omp-lock.h 2014-11-19 08:34:08.522303786 -0500
10 typedef pthread_mutex_t omp_lock_25_t;
11 -typedef struct { pthread_mutex_t lock; int count; } omp_nest_lock_25_t;
14 + pthread_mutex_t lock;
16 +} omp_nest_lock_25_t __attribute__((__aligned__(8)));
18 #ifdef HAVE_BROKEN_POSIX_SEMAPHORES
19 /* If we don't have working semaphores, we'll make all explicit tasks
20 tied to the creating thread. */
21 typedef pthread_mutex_t omp_lock_t;
22 -typedef struct { pthread_mutex_t lock; int count; void *owner; } omp_nest_lock_t;
25 + pthread_mutex_t lock;
28 +} omp_nest_lock_t __attribute__((__aligned__(8)));
30 typedef sem_t omp_lock_t;
31 -typedef struct { sem_t lock; int count; void *owner; } omp_nest_lock_t;
36 +} omp_nest_lock_t __attribute__((__aligned__(8)));
39 --- gcc-5.3.0/libgomp/omp.h.in 2014-01-02 17:25:54.000000000 -0500
40 +++ gcc-5.3.0/libgomp/omp.h.in 2014-11-19 08:31:53.354302270 -0500
42 reflect the shape of the two types. Their internals are private
45 +#if defined(__x86_64__) || defined(__amd64) || defined(__sparc)
46 +#define OMP_LOCK_ALIGN 8
47 +#define OMP_NEST_LOCK_ALIGN 8
49 +#define OMP_LOCK_ALIGN 4
50 +#define OMP_NEST_LOCK_ALIGN 4
55 unsigned char _x[@OMP_LOCK_SIZE@]
56 - __attribute__((__aligned__(@OMP_LOCK_ALIGN@)));
57 + __attribute__((__aligned__(OMP_LOCK_ALIGN)));
62 unsigned char _x[@OMP_NEST_LOCK_SIZE@]
63 - __attribute__((__aligned__(@OMP_NEST_LOCK_ALIGN@)));
64 + __attribute__((__aligned__(OMP_NEST_LOCK_ALIGN)));
68 --- gcc-5.3.0/libgomp/config/posix/ptrlock.h 2014-01-02 17:25:54.000000000 -0500
69 +++ gcc-5.3.0/libgomp/config/posix/ptrlock.h 2014-11-19 08:35:00.554310487 -0500
71 #ifndef GOMP_PTRLOCK_H
72 #define GOMP_PTRLOCK_H 1
74 -typedef struct { void *ptr; gomp_mutex_t lock; } gomp_ptrlock_t;
78 +} gomp_ptrlock_t __attribute__((__aligned__(8)));
80 static inline void gomp_ptrlock_init (gomp_ptrlock_t *ptrlock, void *ptr)
82 --- gcc-5.3.0/libgomp/config/posix/sem.h 2014-01-02 17:25:54.000000000 -0500
83 +++ gcc-5.3.0/libgomp/config/posix/sem.h 2014-11-19 08:35:29.670306230 -0500
88 - pthread_mutex_t mutex;
89 - pthread_cond_t cond;
90 + pthread_mutex_t mutex __attribute__((__aligned__(8)));
91 + pthread_cond_t cond __attribute__((__aligned__(8)));
95 #--- gcc-5.3.0/libgomp/config/posix/lock.c 2015-01-10 11:10:37.000000000 -0800
96 #+++ gcc-5.3.0/libgomp/config/posix/lock.c 2015-08-02 20:30:05.513685199 -0700
99 # /* We need UNIX98/XPG5 extensions to get recursive locks. Request XPG6 since
100 # Solaris requires this for C99 and later. */
101 #+#ifndef _XOPEN_SOURCE
102 # #define _XOPEN_SOURCE 600
105 #+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE < 600)
106 #+#undef _XOPEN_SOURCE
107 #+#define _XOPEN_SOURCE 600
110 # #include "libgomp.h"