From owner-svn-src-head@FreeBSD.ORG Mon Sep 13 01:43:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1ECA5106564A; Mon, 13 Sep 2010 01:43:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C2F48FC08; Mon, 13 Sep 2010 01:43:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D1hAYG045131; Mon, 13 Sep 2010 01:43:10 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D1hAiU045121; Mon, 13 Sep 2010 01:43:10 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201009130143.o8D1hAiU045121@svn.freebsd.org> From: Warner Losh Date: Mon, 13 Sep 2010 01:43:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212516 - in head/lib/libthr: . arch/amd64 arch/arm arch/i386 arch/ia64 arch/mips arch/powerpc arch/sparc64 support X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 01:43:11 -0000 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