svn commit: r212516 - in head/lib/libthr: . arch/amd64 arch/arm
arch/i386 arch/ia64 arch/mips arch/powerpc arch/sparc64 support
Warner Losh
imp at FreeBSD.org
Mon Sep 13 01:43:11 UTC 2010
Author: imp
Date: Mon Sep 13 01:43:10 2010
New Revision: 212516
URL: http://svn.freebsd.org/changeset/base/212516
Log:
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...
Modified:
head/lib/libthr/Makefile
head/lib/libthr/arch/amd64/Makefile.inc
head/lib/libthr/arch/arm/Makefile.inc
head/lib/libthr/arch/i386/Makefile.inc
head/lib/libthr/arch/ia64/Makefile.inc
head/lib/libthr/arch/mips/Makefile.inc
head/lib/libthr/arch/powerpc/Makefile.inc
head/lib/libthr/arch/sparc64/Makefile.inc
head/lib/libthr/support/Makefile.inc
Modified: head/lib/libthr/Makefile
==============================================================================
--- head/lib/libthr/Makefile Mon Sep 13 01:29:51 2010 (r212515)
+++ head/lib/libthr/Makefile Mon Sep 13 01:43:10 2010 (r212516)
@@ -22,7 +22,7 @@ CFLAGS+=-I${.CURDIR}/../libc/include -I$
CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include
CFLAGS+=-I${.CURDIR}/sys
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+=-Winline
LDFLAGS+=-Wl,-znodelete
@@ -38,6 +38,8 @@ CFLAGS+=-D_PTHREADS_INVARIANTS
PRECIOUSLIB=
+.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
+
.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc"
.include "${.CURDIR}/sys/Makefile.inc"
.include "${.CURDIR}/thread/Makefile.inc"
Modified: head/lib/libthr/arch/amd64/Makefile.inc
==============================================================================
--- head/lib/libthr/arch/amd64/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515)
+++ head/lib/libthr/arch/amd64/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516)
@@ -1,5 +1,3 @@
#$FreeBSD$
-.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
-
SRCS+= pthread_md.c _umtx_op_err.S
Modified: head/lib/libthr/arch/arm/Makefile.inc
==============================================================================
--- head/lib/libthr/arch/arm/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515)
+++ head/lib/libthr/arch/arm/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516)
@@ -1,5 +1,3 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
-
SRCS+= pthread_md.c
Modified: head/lib/libthr/arch/i386/Makefile.inc
==============================================================================
--- head/lib/libthr/arch/i386/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515)
+++ head/lib/libthr/arch/i386/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516)
@@ -1,5 +1,3 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
-
SRCS+= pthread_md.c _umtx_op_err.S
Modified: head/lib/libthr/arch/ia64/Makefile.inc
==============================================================================
--- head/lib/libthr/arch/ia64/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515)
+++ head/lib/libthr/arch/ia64/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516)
@@ -1,5 +1,3 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
-
SRCS+= _umtx_op_err.S pthread_md.c
Modified: head/lib/libthr/arch/mips/Makefile.inc
==============================================================================
--- head/lib/libthr/arch/mips/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515)
+++ head/lib/libthr/arch/mips/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516)
@@ -1,5 +1,3 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
-
SRCS+= pthread_md.c
Modified: head/lib/libthr/arch/powerpc/Makefile.inc
==============================================================================
--- head/lib/libthr/arch/powerpc/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515)
+++ head/lib/libthr/arch/powerpc/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516)
@@ -1,5 +1,3 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
-
SRCS+= pthread_md.c
Modified: head/lib/libthr/arch/sparc64/Makefile.inc
==============================================================================
--- head/lib/libthr/arch/sparc64/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515)
+++ head/lib/libthr/arch/sparc64/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516)
@@ -1,5 +1,3 @@
# $FreeBSD$
-.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
-
SRCS+= pthread_md.c
Modified: head/lib/libthr/support/Makefile.inc
==============================================================================
--- head/lib/libthr/support/Makefile.inc Mon Sep 13 01:29:51 2010 (r212515)
+++ head/lib/libthr/support/Makefile.inc Mon Sep 13 01:43:10 2010 (r212516)
@@ -1,9 +1,16 @@
# $FreeBSD$
.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}
+.else
+.PATH: ${.CURDIR}/../libc/${MACHINE_CPUARCH}/sys
+CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_CPUARCH}
+.endif
SYSCALLS= thr_new
More information about the svn-src-all
mailing list