svn commit: r212543 - in head/sys/modules: opensolaris zfs

Warner Losh imp at FreeBSD.org
Mon Sep 13 07:29:02 UTC 2010


Author: imp
Date: Mon Sep 13 07:29:02 2010
New Revision: 212543
URL: http://svn.freebsd.org/changeset/base/212543

Log:
  Simplify atomic selection

Modified:
  head/sys/modules/opensolaris/Makefile
  head/sys/modules/zfs/Makefile

Modified: head/sys/modules/opensolaris/Makefile
==============================================================================
--- head/sys/modules/opensolaris/Makefile	Mon Sep 13 07:27:03 2010	(r212542)
+++ head/sys/modules/opensolaris/Makefile	Mon Sep 13 07:29:02 2010	(r212543)
@@ -8,8 +8,12 @@ SRCS=		opensolaris.c		\
 		opensolaris_kmem.c	\
 		opensolaris_misc.c
 
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "powerpc64"
-.PATH:	${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}
+_A=${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic
+.if exists(${_A}/${MACHINE_CPUARCH}/opensolaris_atomic.S)
+.PATH:	${_A}/${MACHINE_CPUARCH}
+SRCS+=		opensolaris_atomic.S
+.elif exists(${_A}/${MACHINE_ARCH}/opensolaris_atomic.S)
+.PATH:	${_A}/${MACHINE_ARCH}
 SRCS+=		opensolaris_atomic.S
 .else
 SRCS+=		opensolaris_atomic.c

Modified: head/sys/modules/zfs/Makefile
==============================================================================
--- head/sys/modules/zfs/Makefile	Mon Sep 13 07:27:03 2010	(r212542)
+++ head/sys/modules/zfs/Makefile	Mon Sep 13 07:29:02 2010	(r212543)
@@ -27,12 +27,15 @@ SRCS+=	opensolaris_uio.c
 SRCS+=	opensolaris_vfs.c
 SRCS+=	opensolaris_zone.c
 
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "powerpc64"
-.PATH:	${SUNW}/common/atomic/${MACHINE_ARCH}
-SRCS+=	opensolaris_atomic.S
+_A=${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic
+.if exists(${_A}/${MACHINE_CPUARCH}/opensolaris_atomic.S)
+.PATH:	${_A}/${MACHINE_CPUARCH}
+SRCS+=		opensolaris_atomic.S
+.elif exists(${_A}/${MACHINE_ARCH}/opensolaris_atomic.S)
+.PATH:	${_A}/${MACHINE_ARCH}
+SRCS+=		opensolaris_atomic.S
 .else
-.PATH:	${.CURDIR}/../../cddl/compat/opensolaris/kern
-SRCS+=	opensolaris_atomic.c
+SRCS+=		opensolaris_atomic.c
 .endif
 
 .PATH:	${SUNW}/uts/common/fs


More information about the svn-src-head mailing list