Module Name:    src
Committed By:   haad
Date:           Tue Oct  6 16:28:10 UTC 2009

Modified Files:
        src/external/cddl/osnet/lib/libzpool: Makefile

Log Message:
Enable build of 64 bit atomic ops in userspace for i386. This is needed for
all 32 bit archs which doesn't have a 64 atomic ops. This change enable MKZFS
build for a i386.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/lib/libzpool/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/lib/libzpool/Makefile
diff -u src/external/cddl/osnet/lib/libzpool/Makefile:1.1 src/external/cddl/osnet/lib/libzpool/Makefile:1.2
--- src/external/cddl/osnet/lib/libzpool/Makefile:1.1	Fri Aug  7 20:57:56 2009
+++ src/external/cddl/osnet/lib/libzpool/Makefile	Tue Oct  6 16:28:10 2009
@@ -1,6 +1,7 @@
-#	$NetBSD: Makefile,v 1.1 2009/08/07 20:57:56 haad Exp $
+#	$NetBSD: Makefile,v 1.2 2009/10/06 16:28:10 haad Exp $
 
 .include "${.CURDIR}/../../dist/uts/common/Makefile.files"
+.include "../../Makefile.zfs"
 
 .PATH: ${.CURDIR}/../../dist/common/zfs
 .PATH: ${.CURDIR}/../../dist/common/unicode
@@ -21,8 +22,15 @@
 SRCS+=		${ZFS_SHARED_OBJS:C/.o$/.c/}
 SRCS+=		taskq.c util.c list.o u8_textprep.o
 
+# Add opensolaris atomic functions and use fakedones if we do not support them
+.if ${MACHINE_ARCH} == "i386"
+CPPFLAGS+=	-D__HAVE_ATOMIC64_OPS	# add NetBSD 64 add operations on i386
+.PATH: ${NETBSDSRCDIR}/common/lib/libc/atomic
+SRCS+= atomic_add_64_cas.c atomic_add_64_nv_cas.c atomic_inc_64_add.c atomic_dec_64_add.c
+.endif
+
 print:
 	echo ${LIST_SRCS} ${LIST_OBJS}
 
-.include "../../Makefile.zfs"
+
 .include <bsd.lib.mk>

Reply via email to