]> git.saurik.com Git - apple/libc.git/blobdiff - pthreads/Makefile.inc
Libc-594.9.1.tar.gz
[apple/libc.git] / pthreads / Makefile.inc
index 447cf68c2f2ae11bd4b45ed1e00f69e7fc416420..f1ed6640b7fe0d86694b4a4619a55d5736ef06c1 100644 (file)
@@ -1,8 +1,4 @@
-.ifnmake autopatch
-.if exists(${.CURDIR}/${MACHINE_ARCH}/pthreads/Makefile.inc)
-.include "${.CURDIR}/${MACHINE_ARCH}/pthreads/Makefile.inc"
-.endif
-.endif # !autopatch
+.sinclude "${.CURDIR}/${MACHINE_ARCH}/pthreads/Makefile.inc"
 
 .PATH: ${.CURDIR}/pthreads
 
@@ -11,13 +7,15 @@ CFLAGS += -I${.CURDIR}/pthreads
 MISRCS += pthread_cancelable.c pthread_cond.c pthread_tsd.c pthread.c \
         pthread_mutex.c    thread_setup.c   stack.s pthread_rwlock.c
 
-${SYMROOT}/plockstat.h: ${.CURDIR}/pthreads/plockstat.d
-       dtrace -o ${.TARGET} -C -h -s ${.ALLSRC}
+.ifdef FEATURE_PLOCKSTAT
+${SYMROOTINC}/plockstat.h: ${.CURDIR}/pthreads/plockstat.d
+       ${MKDIR} ${SYMROOTINC}
+       ${DTRACE} -o ${.TARGET} -C -h -s ${.ALLSRC}
 
 .for _src in pthread_cond.c pthread_mutex.c pthread_rwlock.c
-CFLAGS-${_src} += -I${SYMROOT}
-${_src:R}.So ${_src:R}.po ${_src:R}.do ${_src:R}.o: ${SYMROOT}/plockstat.h
+${_src:R}.${OBJSUFFIX}: ${SYMROOTINC}/plockstat.h
 .endfor
+.endif # FEATURE_PLOCKSTAT
 
 PTHREADS_INSTHDRS += pthread.h pthread_impl.h sched.h
 PTHREADS_INSTHDRS := ${PTHREADS_INSTHDRS:S/^/${.CURDIR}\/pthreads\//}
@@ -43,6 +41,15 @@ CFLAGS-pthread_cond.c += -DLIBC_ALIAS_PTHREAD_COND_INIT
 CFLAGS-pthread_mutex.c += -DLIBC_ALIAS_PTHREAD_MUTEXATTR_DESTROY
 CFLAGS-pthread_rwlock.c += -DLIBC_ALIAS_PTHREAD_RWLOCK_DESTROY -DLIBC_ALIAS_PTHREAD_RWLOCK_INIT -DLIBC_ALIAS_PTHREAD_RWLOCK_RDLOCK -DLIBC_ALIAS_PTHREAD_RWLOCK_TRYRDLOCK -DLIBC_ALIAS_PTHREAD_RWLOCK_TRYWRLOCK -DLIBC_ALIAS_PTHREAD_RWLOCK_UNLOCK -DLIBC_ALIAS_PTHREAD_RWLOCK_WRLOCK
 
+.if defined(CCARCH) && ${CCARCH} == armv6
+CFLAGS-pthread.c += -mno-thumb
+CFLAGS-pthread_cancelable.c += -mno-thumb
+CFLAGS-pthread_cond.c += -mno-thumb
+CFLAGS-pthread_mutex.c += -mno-thumb
+CFLAGS-pthread_rwlock.c += -mno-thumb
+CFLAGS-pthread_tsd.c += -mno-thumb
+.endif
+
 STRIP_HDRS += pthread.h
 
 .if ${LIB} == "c"