Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/lib/libzpool Enable build of 64 bit atom...



details:   https://anonhg.NetBSD.org/src/rev/8e3e7a9c7b1c
branches:  trunk
changeset: 747948:8e3e7a9c7b1c
user:      haad <haad%NetBSD.org@localhost>
date:      Tue Oct 06 16:28:10 2009 +0000

description:
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.

diffstat:

 external/cddl/osnet/lib/libzpool/Makefile |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 0e08b8c34978 -r 8e3e7a9c7b1c external/cddl/osnet/lib/libzpool/Makefile
--- a/external/cddl/osnet/lib/libzpool/Makefile Tue Oct 06 16:23:03 2009 +0000
+++ b/external/cddl/osnet/lib/libzpool/Makefile Tue Oct 06 16:28:10 2009 +0000
@@ -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>



Home | Main Index | Thread Index | Old Index