enable static linking of pthreads even when <sched.h> is included without <pthread.h>

This commit is contained in:
Volker Grabsch 2010-04-22 01:09:36 +02:00
parent 99edab778a
commit 40d75a2ee1
1 changed files with 2 additions and 0 deletions

View File

@ -61,6 +61,8 @@ define $(PKG)_BUILD
# unpack and build pthreads (needed by libgomp)
cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-pthreads)
$(SED) -i '35i\#define PTW32_STATIC_LIB' '$(1)/$(gcc-pthreads_SUBDIR)/pthread.h'
$(SED) -i '41i\#define PTW32_STATIC_LIB' '$(1)/$(gcc-pthreads_SUBDIR)/sched.h'
$(SED) -i '41i\#define PTW32_STATIC_LIB' '$(1)/$(gcc-pthreads_SUBDIR)/semaphore.h'
$(SED) -i 's,#include "config.h",,' '$(1)/$(gcc-pthreads_SUBDIR)/pthread.h'
$(MAKE) -C '$(1)/$(gcc-pthreads_SUBDIR)' -j 1 GC-static CROSS='$(TARGET)-'
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'