Merge from tbemd, with a small amount of rework:

For all libthr contexts, use ${MACHINE_CPUARCH}
for all libc contexts, use ${MACHINE_ARCH} if it exists, otherwise use
${MACHINE_CPUARCH}
Move some common code up a layer (the .PATH statement was the same in
all the arch submakefiles).

# Hope she hasn't busted powerpc64 with this...
This commit is contained in:
imp 2010-09-13 01:43:10 +00:00
parent 681e259e01
commit 6a8c774078
9 changed files with 11 additions and 16 deletions

View File

@ -22,7 +22,7 @@ CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \
CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include
CFLAGS+=-I${.CURDIR}/sys CFLAGS+=-I${.CURDIR}/sys
CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf
CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_ARCH} CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH}
CFLAGS+=-I${.CURDIR}/../libthread_db CFLAGS+=-I${.CURDIR}/../libthread_db
CFLAGS+=-Winline CFLAGS+=-Winline
LDFLAGS+=-Wl,-znodelete LDFLAGS+=-Wl,-znodelete
@ -38,6 +38,8 @@ CFLAGS+=-D_PTHREADS_INVARIANTS
PRECIOUSLIB= PRECIOUSLIB=
.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc"
.include "${.CURDIR}/sys/Makefile.inc" .include "${.CURDIR}/sys/Makefile.inc"
.include "${.CURDIR}/thread/Makefile.inc" .include "${.CURDIR}/thread/Makefile.inc"

View File

@ -1,5 +1,3 @@
#$FreeBSD$ #$FreeBSD$
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
SRCS+= pthread_md.c _umtx_op_err.S SRCS+= pthread_md.c _umtx_op_err.S

View File

@ -1,5 +1,3 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
SRCS+= pthread_md.c SRCS+= pthread_md.c

View File

@ -1,5 +1,3 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
SRCS+= pthread_md.c _umtx_op_err.S SRCS+= pthread_md.c _umtx_op_err.S

View File

@ -1,5 +1,3 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
SRCS+= _umtx_op_err.S pthread_md.c SRCS+= _umtx_op_err.S pthread_md.c

View File

@ -1,5 +1,3 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
SRCS+= pthread_md.c SRCS+= pthread_md.c

View File

@ -1,5 +1,3 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
SRCS+= pthread_md.c SRCS+= pthread_md.c

View File

@ -1,5 +1,3 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
SRCS+= pthread_md.c SRCS+= pthread_md.c

View File

@ -1,9 +1,16 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string .PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string
.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys
# libc must search machine_arch, then machine_cpuarch, but libthr has all its
# code implemented in machine_cpuarch. Cope.
.if exists(${.CURDIR}/../libc/${MACHINE_ARCH}/sys)
.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys
CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH} CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH}
.else
.PATH: ${.CURDIR}/../libc/${MACHINE_CPUARCH}/sys
CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_CPUARCH}
.endif
SYSCALLS= thr_new SYSCALLS= thr_new