summaryrefslogtreecommitdiffstats
path: root/sys/modules
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2010-09-13 07:29:02 +0000
committerimp <imp@FreeBSD.org>2010-09-13 07:29:02 +0000
commit367de98e5d9d394f52863740e29b736e24310244 (patch)
tree44c00f31e8b5fc6df9abf770e79caceeff5422c1 /sys/modules
parenta235626c3cb68c9a624c0bc9962cf5c0d59b535f (diff)
downloadFreeBSD-src-367de98e5d9d394f52863740e29b736e24310244.zip
FreeBSD-src-367de98e5d9d394f52863740e29b736e24310244.tar.gz
Simplify atomic selection
Diffstat (limited to 'sys/modules')
-rw-r--r--sys/modules/opensolaris/Makefile8
-rw-r--r--sys/modules/zfs/Makefile13
2 files changed, 14 insertions, 7 deletions
diff --git a/sys/modules/opensolaris/Makefile b/sys/modules/opensolaris/Makefile
index eef8ffd..ca4f12a 100644
--- a/sys/modules/opensolaris/Makefile
+++ b/sys/modules/opensolaris/Makefile
@@ -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
diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile
index e4cf297..d0a6f44 100644
--- a/sys/modules/zfs/Makefile
+++ b/sys/modules/zfs/Makefile
@@ -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
OpenPOWER on IntegriCloud