Edit

IABSD.fr/src/lib/librthread/Makefile

Branch :

  • Show log

    Commit

  • Author : deraadt
    Date : 2025-07-17 02:21:44
    Hash : baaefa1c
    Message : Oops! Two files missing from pthread gmon diff: This thread-aware profiling support diff comes from Yuichiro NAITO. At runtime, profiling data is stored per-thread. Upon termination, the per-thread profiling data pools are merged into a into a single record, which is then written out (using the new kernel-assisted system). I think the original gmon merging parts may have come from or been inspired by someone at NetBSD. This has been delayed because there were concerns about adding a TLS object which would require other library cranks, so this rides all the major cranks today. ok kettenis tb claudio sthen etc etc etc

  • lib/librthread/Makefile
  • #	$OpenBSD: Makefile,v 1.57 2025/07/17 02:21:44 deraadt Exp $
    
    LIB=pthread
    LIBCSRCDIR=	${.CURDIR}/../libc
    
    CFLAGS+=-Wall -g -Werror -Wshadow
    CFLAGS+=-Werror-implicit-function-declaration
    CFLAGS+=-Wsign-compare
    CFLAGS+=-I${.CURDIR} -include namespace.h \
    	-I${LIBCSRCDIR}/arch/${MACHINE_CPU} -I${LIBCSRCDIR}/include
    CDIAGFLAGS=
    LDADD = -Wl,-znodelete
    PFLAGS= -D__PROFIL_SRC__
    
    .if defined(NOPIC)
    CFLAGS+=-DNO_PIC
    .endif
    
    VERSION_SCRIPT= ${.CURDIR}/Symbols.map
    
    .PATH: ${.CURDIR}/arch/${MACHINE_CPU}
    SRCS=	rthread.c \
    	rthread_attr.c \
    	rthread_barrier.c \
    	rthread_barrier_attr.c \
    	rthread_fork.c \
    	rthread_getcpuclockid.c \
    	rthread_mutex_prio.c \
    	rthread_mutexattr.c \
    	rthread_np.c \
    	rthread_rwlockattr.c \
    	rthread_sched.c \
    	rthread_stack.c \
    	rthread_spin_lock.c \
    	sched_prio.c
    
    # Architectures without atomics
    .if ${MACHINE_ARCH} == "hppa" || ${MACHINE_ARCH} == "m88k" || \
        ${MACHINE_ARCH} == "sh"
    SRCS+=	rthread_sem_compat.c \
    	rthread_rwlock_compat.c
    .else
    CFLAGS+= -DFUTEX
    SRCS+=	rthread_sem.c \
    	rthread_rwlock.c
    .endif
    
    SRCDIR= ${.CURDIR}/../libpthread
    .include "${SRCDIR}/man/Makefile.inc"
    .include <bsd.lib.mk>
    
    ${OBJS} ${GOBJS} ${POBJS} ${SOBJS} ${DOBJS}: ${.CURDIR}/namespace.h