diff options
author | Tobias Gruetzmacher <tobias-git@23.gs> | 2014-03-07 16:51:17 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2014-03-08 05:32:28 (GMT) |
commit | dfd0b8866255aac8d0e4fed14d1f2a810a0f94e8 (patch) | |
tree | 17d0bbe80afaf5a3defb14b9e67befeb9aeb9dbb | |
parent | a4df15a1346d62d9c07d34df59d9d6067ca57429 (diff) | |
download | mxe-dfd0b8866255aac8d0e4fed14d1f2a810a0f94e8.zip mxe-dfd0b8866255aac8d0e4fed14d1f2a810a0f94e8.tar.gz mxe-dfd0b8866255aac8d0e4fed14d1f2a810a0f94e8.tar.bz2 |
package pthreads-w32: fix for shared build
- Only patch header files to force static build when we are actually
running a static build.
- Install DLL into bin and stub .a into lib for shared.
-rw-r--r-- | src/pthreads-w32-1-fixes.patch | 62 | ||||
-rw-r--r-- | src/pthreads-w32.mk | 6 |
2 files changed, 4 insertions, 64 deletions
diff --git a/src/pthreads-w32-1-fixes.patch b/src/pthreads-w32-1-fixes.patch deleted file mode 100644 index ef99e5b..0000000 --- a/src/pthreads-w32-1-fixes.patch +++ /dev/null @@ -1,62 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From e951f784c852f4cd8298864190936fded1efceba Mon Sep 17 00:00:00 2001 -From: Mark Brand <mabrand@mabrand.nl> -Date: Sun, 27 May 2012 22:00:19 +0200 -Subject: [PATCH] force static for convenience - ---- - pthread.h | 4 ++++ - sched.h | 4 ++++ - semaphore.h | 4 ++++ - 3 files changed, 12 insertions(+) - -diff --git a/pthread.h b/pthread.h -index b4072f7..c88c886 100755 ---- a/pthread.h -+++ b/pthread.h -@@ -547,6 +547,10 @@ extern "C" - * do NOT define PTW32_BUILD, and then the variables/functions will - * be imported correctly. - */ -+ -+// MXE: Set this for convenience here since MXE only does static. -+#define PTW32_STATIC_LIB -+ - #if !defined(PTW32_STATIC_LIB) - # if defined(PTW32_BUILD) - # define PTW32_DLLPORT __declspec (dllexport) -diff --git a/sched.h b/sched.h -index f36a97a..1f4f401 100755 ---- a/sched.h -+++ b/sched.h -@@ -76,6 +76,10 @@ - * do NOT define PTW32_BUILD, and then the variables/functions will - * be imported correctly. - */ -+ -+// MXE: Set this for convenience here since MXE only does static. -+#define PTW32_STATIC_LIB -+ - #if !defined(PTW32_STATIC_LIB) - # if defined(PTW32_BUILD) - # define PTW32_DLLPORT __declspec (dllexport) -diff --git a/semaphore.h b/semaphore.h -index c6e9407..2b64173 100755 ---- a/semaphore.h -+++ b/semaphore.h -@@ -75,6 +75,10 @@ - * do NOT define PTW32_BUILD, and then the variables/functions will - * be imported correctly. - */ -+ -+// MXE: Set this for convenience here since MXE only does static. -+#define PTW32_STATIC_LIB -+ - #if !defined(PTW32_STATIC_LIB) - # if defined(PTW32_BUILD) - # define PTW32_DLLPORT __declspec (dllexport) --- -1.7.9.2 - diff --git a/src/pthreads-w32.mk b/src/pthreads-w32.mk index 1576df5..ba264e2 100644 --- a/src/pthreads-w32.mk +++ b/src/pthreads-w32.mk @@ -22,9 +22,11 @@ define $(PKG)_BUILD_i686-pc-mingw32 $(if $(BUILD_STATIC),GC-static,GC-inlined) \ CROSS='$(TARGET)-' $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' + # This is the DLL include lib on a shared build + $(INSTALL) -m644 '$(1)/libpthreadGC2.a' '$(PREFIX)/$(TARGET)/lib/libpthread.a' $(if $(BUILD_STATIC), \ - $(INSTALL) -m644 '$(1)/libpthreadGC2.a' '$(PREFIX)/$(TARGET)/lib/libpthread.a',\ - $(INSTALL) -m644 '$(1)/pthreadGC2.dll' '$(PREFIX)/$(TARGET)/lib/pthread.dll') + $(SED) -i 's/defined(PTW32_STATIC_LIB)/1/' '$(1)/pthread.h' '$(1)/sched.h' '$(1)/semaphore.h', + $(INSTALL) -m644 '$(1)/pthreadGC2.dll' '$(PREFIX)/$(TARGET)/bin/pthread.dll') $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' $(INSTALL) -m644 '$(1)/pthread.h' '$(PREFIX)/$(TARGET)/include/' $(INSTALL) -m644 '$(1)/sched.h' '$(PREFIX)/$(TARGET)/include/' |