aboutsummaryrefslogtreecommitdiff
path: root/pthreads
diff options
context:
space:
mode:
Diffstat (limited to 'pthreads')
-rw-r--r--pthreads/.gitignore3
-rwxr-xr-x[-rw-r--r--]pthreads/Makefile25
-rwxr-xr-xpthreads/common.mk13
-rw-r--r--[-rwxr-xr-x]pthreads/pthread_setaffinity.c0
-rw-r--r--[-rwxr-xr-x]pthreads/pthread_timedjoin_np.c0
-rw-r--r--[-rwxr-xr-x]pthreads/pthread_tryjoin_np.c0
-rw-r--r--[-rwxr-xr-x]pthreads/sched_setaffinity.c0
-rw-r--r--[-rwxr-xr-x]pthreads/tests/affinity1.c0
-rw-r--r--[-rwxr-xr-x]pthreads/tests/affinity2.c0
-rw-r--r--[-rwxr-xr-x]pthreads/tests/affinity3.c0
-rw-r--r--[-rwxr-xr-x]pthreads/tests/affinity4.c0
-rw-r--r--[-rwxr-xr-x]pthreads/tests/affinity5.c0
-rw-r--r--[-rwxr-xr-x]pthreads/tests/context2.c0
-rw-r--r--[-rwxr-xr-x]pthreads/tests/create3.c0
-rw-r--r--[-rwxr-xr-x]pthreads/tests/exception3_0.c0
-rw-r--r--[-rwxr-xr-x]pthreads/tests/join4.c0
16 files changed, 31 insertions, 10 deletions
diff --git a/pthreads/.gitignore b/pthreads/.gitignore
new file mode 100644
index 000000000..e258bf9d0
--- /dev/null
+++ b/pthreads/.gitignore
@@ -0,0 +1,3 @@
+pthreadVC2.inlined_static_stamp
+pthreadVC2d.inlined_static_stamp
+
diff --git a/pthreads/Makefile b/pthreads/Makefile
index e13341751..bd8e82662 100644..100755
--- a/pthreads/Makefile
+++ b/pthreads/Makefile
@@ -26,9 +26,10 @@ SMALL_STATIC_STAMPS = pthreadVCE$(DLL_VER).small_static_stamp pthreadVSE$(DLL_V
CC = cl
CPPFLAGS = /I. /DHAVE_CONFIG_H
-XCFLAGS = /W3 /MD /nologo
-CFLAGS = /O2 /Ob2 $(XCFLAGS)
-CFLAGSD = /Z7 $(XCFLAGS)
+XCFLAGS = /W3 /Zi /Gy /GF /nologo
+CFLAGS = /O2 /Ob2 /Oi /Ox /Oy /Ot /MD /GL $(XCFLAGS)
+CFLAGSD = /MDd $(XCFLAGS)
+
# Uncomment this if config.h defines RETAIN_WSALASTERROR
#XLIBS = wsock32.lib
@@ -50,7 +51,7 @@ VCFLAGSD = $(CPPFLAGS) $(CFLAGSD)
OBJEXT = obj
RESEXT = res
-
+
include common.mk
DLL_OBJS = $(DLL_OBJS) $(RESOURCE_OBJS)
@@ -176,7 +177,7 @@ VC-static:
@ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).inlined_static_stamp
VC-static-debug:
- @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).inlined_static_stamp
+ @ $(MAKE) /E /nologo DEBUG=1 EHFLAGS="$(VCFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).inlined_static_stamp
realclean: clean
@@ -219,19 +220,25 @@ install:
$(DLLS): $(DLL_OBJS)
$(CC) /LDd /Zi /nologo $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@
-$(INLINED_STATIC_STAMPS): $(DLL_OBJS)
+$(INLINED_STATIC_STAMPS): $(OUTDIR) $(DLL_OBJS)
if exist $*.lib del $*.lib
- lib $(DLL_OBJS) /out:$*.lib
+ lib /LTCG $(DLL_OBJS) /out:$*$(SUFFIX).lib
echo. >$@
-$(SMALL_STATIC_STAMPS): $(STATIC_OBJS)
+$(SMALL_STATIC_STAMPS): $(OUTDIR) $(STATIC_OBJS)
if exist $*.lib del $*.lib
- lib $(STATIC_OBJS) /out:$*.lib
+ lib /LTCG $(STATIC_OBJS) /out:$*$(SUFFIX).lib
echo. >$@
+$(OUTDIR):
+ mkdir $(OUTDIR)
+
.c.obj:
$(CC) $(EHFLAGS) /D$(CLEANUP) -c $<
+.c{$(OUTDIR)}.obj:
+ $(CC) $(EHFLAGS) /D$(CLEANUP) -Fo"$@" -c $<
+
# TARGET_CPU is an environment variable set by Visual Studio Command Prompt
# as provided by the SDK
.rc.res:
diff --git a/pthreads/common.mk b/pthreads/common.mk
index da26f719e..86ac3f706 100755
--- a/pthreads/common.mk
+++ b/pthreads/common.mk
@@ -1,11 +1,22 @@
# Common makefile definitions
+!ifdef IS64
+SUFFIX=64
+!else
+SUFFIX=
+!endif
+
+!ifdef DEBUG
+OUTDIR=obj$(SUFFIX)_d
+!else
+OUTDIR=obj$(SUFFIX)
+!endif
RESOURCE_OBJS = \
version.$(RESEXT)
# pthread.c aggregates all source into a single compilation unit for inlinability
DLL_OBJS = \
- pthread.$(OBJEXT)
+ $(OUTDIR)\pthread.$(OBJEXT)
# Separate modules for minimising the size of statically linked images
STATIC_OBJS = \
diff --git a/pthreads/pthread_setaffinity.c b/pthreads/pthread_setaffinity.c
index 62fc4945a..62fc4945a 100755..100644
--- a/pthreads/pthread_setaffinity.c
+++ b/pthreads/pthread_setaffinity.c
diff --git a/pthreads/pthread_timedjoin_np.c b/pthreads/pthread_timedjoin_np.c
index 827b6f675..827b6f675 100755..100644
--- a/pthreads/pthread_timedjoin_np.c
+++ b/pthreads/pthread_timedjoin_np.c
diff --git a/pthreads/pthread_tryjoin_np.c b/pthreads/pthread_tryjoin_np.c
index e9fe1dae6..e9fe1dae6 100755..100644
--- a/pthreads/pthread_tryjoin_np.c
+++ b/pthreads/pthread_tryjoin_np.c
diff --git a/pthreads/sched_setaffinity.c b/pthreads/sched_setaffinity.c
index 07b0fb4f4..07b0fb4f4 100755..100644
--- a/pthreads/sched_setaffinity.c
+++ b/pthreads/sched_setaffinity.c
diff --git a/pthreads/tests/affinity1.c b/pthreads/tests/affinity1.c
index 7014d8875..7014d8875 100755..100644
--- a/pthreads/tests/affinity1.c
+++ b/pthreads/tests/affinity1.c
diff --git a/pthreads/tests/affinity2.c b/pthreads/tests/affinity2.c
index 225840cf1..225840cf1 100755..100644
--- a/pthreads/tests/affinity2.c
+++ b/pthreads/tests/affinity2.c
diff --git a/pthreads/tests/affinity3.c b/pthreads/tests/affinity3.c
index 065dd21a4..065dd21a4 100755..100644
--- a/pthreads/tests/affinity3.c
+++ b/pthreads/tests/affinity3.c
diff --git a/pthreads/tests/affinity4.c b/pthreads/tests/affinity4.c
index 31aad46c2..31aad46c2 100755..100644
--- a/pthreads/tests/affinity4.c
+++ b/pthreads/tests/affinity4.c
diff --git a/pthreads/tests/affinity5.c b/pthreads/tests/affinity5.c
index 8957e28f0..8957e28f0 100755..100644
--- a/pthreads/tests/affinity5.c
+++ b/pthreads/tests/affinity5.c
diff --git a/pthreads/tests/context2.c b/pthreads/tests/context2.c
index 154948a4f..154948a4f 100755..100644
--- a/pthreads/tests/context2.c
+++ b/pthreads/tests/context2.c
diff --git a/pthreads/tests/create3.c b/pthreads/tests/create3.c
index 5063d0ba7..5063d0ba7 100755..100644
--- a/pthreads/tests/create3.c
+++ b/pthreads/tests/create3.c
diff --git a/pthreads/tests/exception3_0.c b/pthreads/tests/exception3_0.c
index bc06bf335..bc06bf335 100755..100644
--- a/pthreads/tests/exception3_0.c
+++ b/pthreads/tests/exception3_0.c
diff --git a/pthreads/tests/join4.c b/pthreads/tests/join4.c
index cbe96d29a..cbe96d29a 100755..100644
--- a/pthreads/tests/join4.c
+++ b/pthreads/tests/join4.c