winpthreads + gcc: disabled my debugging stuff
This commit is contained in:
@@ -25,7 +25,7 @@ makedepends=("${_mingw_suff}-${_realname}-ada=${pkgver}" "${_mingw_suff}-${_real
|
||||
optdepends=()
|
||||
replaces=()
|
||||
backup=()
|
||||
options=('!strip' 'debug' 'staticlibs' '!emptydirs') # '!buildflags'
|
||||
options=('strip' '!debug' 'staticlibs' '!emptydirs') # '!buildflags'
|
||||
source=("ftp://gcc.gnu.org/pub/gcc/releases/${_realname}-${pkgver}/${_realname}-${pkgver}.tar.bz2"
|
||||
'gcc-4.8-filename-output.patch'
|
||||
'gcc-4.8-lambda-ICE.patch'
|
||||
@@ -127,8 +127,10 @@ prepare() {
|
||||
# Build aextra tools for Ada
|
||||
patch -p1 -i ${srcdir}/build-more-gnattools.mingw.patch
|
||||
|
||||
# Expose some libgomp internals for debugging.
|
||||
patch -p1 -i ${srcdir}/libgomp-no-static.patch
|
||||
if check_option "debug" "y"; then
|
||||
# Expose some libgomp internals for debugging.
|
||||
patch -p1 -i ${srcdir}/libgomp-no-static.patch
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
124
mingw-w64-gcc/libgomp-no-static.patch
Normal file
124
mingw-w64-gcc/libgomp-no-static.patch
Normal file
@@ -0,0 +1,124 @@
|
||||
diff -urN a/libgomp/libgomp.h b/libgomp/libgomp.h
|
||||
--- a/libgomp/libgomp.h 2014-01-23 18:05:11.422031300 +0000
|
||||
+++ b/libgomp/libgomp.h 2014-01-23 18:30:38.766439100 +0000
|
||||
@@ -370,6 +370,7 @@
|
||||
|
||||
/* ... and here is that TLS data. */
|
||||
|
||||
+/*
|
||||
#ifdef HAVE_TLS
|
||||
extern __thread struct gomp_thread gomp_tls_data;
|
||||
static inline struct gomp_thread *gomp_thread (void)
|
||||
@@ -383,6 +384,8 @@
|
||||
return pthread_getspecific (gomp_tls_key);
|
||||
}
|
||||
#endif
|
||||
+*/
|
||||
+struct gomp_thread *gomp_thread (void);
|
||||
|
||||
extern struct gomp_task_icv *gomp_new_icv (void);
|
||||
|
||||
diff -urN a/libgomp/team.c b/libgomp/team.c
|
||||
--- a/libgomp/team.c 2014-01-23 18:05:11.435534000 +0000
|
||||
+++ b/libgomp/team.c 2014-01-23 18:09:27.515239700 +0000
|
||||
@@ -60,7 +60,7 @@
|
||||
/* This function is a pthread_create entry point. This contains the idle
|
||||
loop in which a thread waits to be called up to become part of a team. */
|
||||
|
||||
-static void *
|
||||
+/*static */void *
|
||||
gomp_thread_start (void *xdata)
|
||||
{
|
||||
struct gomp_thread_start_data *data = xdata;
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
/* Free a team data structure. */
|
||||
|
||||
-static void
|
||||
+/*static */void
|
||||
free_team (struct gomp_team *team)
|
||||
{
|
||||
gomp_barrier_destroy (&team->barrier);
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
/* Allocate and initialize a thread pool. */
|
||||
|
||||
-static struct gomp_thread_pool *gomp_new_thread_pool (void)
|
||||
+/*static */struct gomp_thread_pool *gomp_new_thread_pool (void)
|
||||
{
|
||||
struct gomp_thread_pool *pool
|
||||
= gomp_malloc (sizeof(struct gomp_thread_pool));
|
||||
@@ -196,7 +196,7 @@
|
||||
return pool;
|
||||
}
|
||||
|
||||
-static void
|
||||
+/*static */void
|
||||
gomp_free_pool_helper (void *thread_pool)
|
||||
{
|
||||
struct gomp_thread_pool *pool
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
/* Free a thread pool and release its threads. */
|
||||
|
||||
-static void
|
||||
+/*static */void
|
||||
gomp_free_thread (void *arg __attribute__((unused)))
|
||||
{
|
||||
struct gomp_thread *thr = gomp_thread ();
|
||||
@@ -529,7 +529,7 @@
|
||||
|
||||
/* Constructors for this file. */
|
||||
|
||||
-static void __attribute__((constructor))
|
||||
+/*static */void __attribute__((constructor))
|
||||
initialize_team (void)
|
||||
{
|
||||
struct gomp_thread *thr;
|
||||
@@ -552,7 +552,7 @@
|
||||
gomp_sem_init (&thr->release, 0);
|
||||
}
|
||||
|
||||
-static void __attribute__((destructor))
|
||||
+/*static */void __attribute__((destructor))
|
||||
team_destructor (void)
|
||||
{
|
||||
/* Without this dlclose on libgomp could lead to subsequent
|
||||
@@ -570,3 +570,16 @@
|
||||
pthread_setspecific (gomp_thread_destructor, thr);
|
||||
return &task->icv;
|
||||
}
|
||||
+
|
||||
+#ifdef HAVE_TLS
|
||||
+struct gomp_thread *gomp_thread (void)
|
||||
+{
|
||||
+ return &gomp_tls_data;
|
||||
+}
|
||||
+#else
|
||||
+struct gomp_thread *gomp_thread (void)
|
||||
+{
|
||||
+ return pthread_getspecific (gomp_tls_key);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
diff -urN a/libgomp/work.c b/libgomp/work.c
|
||||
--- a/libgomp/work.c 2014-01-23 18:05:11.734093700 +0000
|
||||
+++ b/libgomp/work.c 2014-01-23 18:09:44.161568300 +0000
|
||||
@@ -34,7 +34,7 @@
|
||||
/* Allocate a new work share structure, preferably from current team's
|
||||
free gomp_work_share cache. */
|
||||
|
||||
-static struct gomp_work_share *
|
||||
+/*static */struct gomp_work_share *
|
||||
alloc_work_share (struct gomp_team *team)
|
||||
{
|
||||
struct gomp_work_share *ws;
|
||||
@@ -132,7 +132,7 @@
|
||||
/* Free a work share struct, if not orphaned, put it into current
|
||||
team's free gomp_work_share cache. */
|
||||
|
||||
-static inline void
|
||||
+/*static */inline void
|
||||
free_work_share (struct gomp_team *team, struct gomp_work_share *ws)
|
||||
{
|
||||
gomp_fini_work_share (ws);
|
||||
@@ -12,7 +12,7 @@ url="http://mingw-w64.sourceforge.net"
|
||||
license=('custom')
|
||||
groups=("${_mingw_suff}-toolchain" "${_mingw_suff}")
|
||||
makedepends=("subversion" "${_mingw_suff}-gcc" "${_mingw_suff}-binutils" "${_mingw_suff}-crt-svn" "${_mingw_suff}-headers-svn")
|
||||
options=('!strip' '!buildflags' 'staticlibs' '!emptydirs' 'debug')
|
||||
options=('strip' '!buildflags' 'staticlibs' '!emptydirs' '!debug')
|
||||
source=("${_realname}"::"svn+svn://svn.code.sf.net/p/mingw-w64/code/trunk/mingw-w64-libraries/winpthreads")
|
||||
md5sums=('SKIP')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user