From owner-svn-src-all@FreeBSD.ORG Mon Nov 1 17:34:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EEFA1065755; Mon, 1 Nov 2010 17:34:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C5328FC0A; Mon, 1 Nov 2010 17:34:04 +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 oA1HY48c076953; Mon, 1 Nov 2010 17:34:04 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oA1HY4fp076949; Mon, 1 Nov 2010 17:34:04 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011011734.oA1HY4fp076949@svn.freebsd.org> From: John Baldwin Date: Mon, 1 Nov 2010 17:34:04 +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: r214629 - in head: include sys/conf sys/x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Nov 2010 17:34:04 -0000 Author: jhb Date: Mon Nov 1 17:34:04 2010 New Revision: 214629 URL: http://svn.freebsd.org/changeset/base/214629 Log: Add an x86/include directory to the kernel to hold headers that are common to amd64, i386, and pc98. The headers are installed to /usr/include/x86 during an installworld, and an 'x86' symlink is created for kernel builds similar to 'machine' so that the headers can be included as . Reviewed by: imp Added: head/sys/x86/include/ Modified: head/include/Makefile head/sys/conf/kern.post.mk head/sys/conf/kmod.mk Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Mon Nov 1 17:27:09 2010 (r214628) +++ head/include/Makefile Mon Nov 1 17:34:04 2010 (r214629) @@ -116,7 +116,10 @@ INCSLINKS+= sys/$i ${INCLUDEDIR}/$i .endfor .if ${MACHINE} != ${MACHINE_CPUARCH} -_MARCH=${MACHINE_CPUARCH} +_MARCHS= ${MACHINE_CPUARCH} +.endif +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +_MARCHS+= x86 .endif .include @@ -126,7 +129,7 @@ ${SHARED}: compat # Take care of stale directory-level symlinks. compat: -.for i in ${LDIRS} ${LSUBDIRS} machine ${_MARCH} crypto +.for i in ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} crypto if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \ rm -f ${DESTDIR}${INCLUDEDIR}/$i; \ fi @@ -142,7 +145,7 @@ compat: copies: .for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} altq crypto machine machine/pc \ - ${_MARCH} + ${_MARCHS} .if exists(${DESTDIR}${INCLUDEDIR}/$i) cd ${DESTDIR}${INCLUDEDIR}/$i; \ for h in *.h; do \ @@ -189,7 +192,8 @@ copies: ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/machine/pc .endif -.if defined(_MARCH) && exists(${.CURDIR}/../sys/${_MARCH}/include) +.for _MARCH in ${_MARCHS} +.if exists(${.CURDIR}/../sys/${_MARCH}/include) ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ cd ${.CURDIR}/../sys/${_MARCH}/include; \ @@ -203,6 +207,7 @@ copies: ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc .endif .endif +.endfor cd ${.CURDIR}/../sys/rpc; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 types.h \ ${DESTDIR}${INCLUDEDIR}/rpc @@ -276,7 +281,8 @@ symlinks: ${DESTDIR}${INCLUDEDIR}/machine/pc; \ done .endif -.if defined(_MARCH) && exists(${.CURDIR}/../sys/${_MARCH}/include) +.for _MARCH in ${_MARCHS} +.if exists(${.CURDIR}/../sys/${_MARCH}/include) ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ cd ${.CURDIR}/../sys/${_MARCH}/include; \ @@ -294,6 +300,7 @@ symlinks: done .endif .endif +.endfor cd ${.CURDIR}/../sys/fs/cd9660; \ for h in *.h; do \ ln -fs ../../../../sys/fs/cd9660/$$h \ Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Mon Nov 1 17:27:09 2010 (r214628) +++ head/sys/conf/kern.post.mk Mon Nov 1 17:34:04 2010 (r214629) @@ -169,6 +169,9 @@ _ILINKS= machine .if ${MACHINE} != ${MACHINE_CPUARCH} _ILINKS+= ${MACHINE_CPUARCH} .endif +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +_ILINKS+= x86 +.endif # Ensure that the link exists without depending on it when it exists. .for _link in ${_ILINKS} @@ -181,8 +184,8 @@ ${_ILINKS}: @case ${.TARGET} in \ machine) \ path=${S}/${MACHINE}/include ;; \ - ${MACHINE_CPUARCH}) \ - path=${S}/${MACHINE_CPUARCH}/include ;; \ + *) \ + path=${S}/${.TARGET}/include ;; \ esac ; \ ${ECHO} ${.TARGET} "->" $$path ; \ ln -s $$path ${.TARGET} Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Mon Nov 1 17:27:09 2010 (r214628) +++ head/sys/conf/kmod.mk Mon Nov 1 17:34:04 2010 (r214629) @@ -238,6 +238,9 @@ _ILINKS=@ machine .if ${MACHINE} != ${MACHINE_CPUARCH} _ILINKS+=${MACHINE_CPUARCH} .endif +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +_ILINKS+=x86 +.endif all: objwarn ${PROG} @@ -263,12 +266,12 @@ SYSDIR= ${_dir} ${_ILINKS}: @case ${.TARGET} in \ - ${MACHINE_CPUARCH}) \ - path=${SYSDIR}/${MACHINE_CPUARCH}/include ;; \ machine) \ path=${SYSDIR}/${MACHINE}/include ;; \ @) \ path=${SYSDIR} ;; \ + *) \ + path=${SYSDIR}/${.TARGET}/include ;; \ esac ; \ path=`(cd $$path && /bin/pwd)` ; \ ${ECHO} ${.TARGET} "->" $$path ; \