diff options
author | marino <marino@pkgsrc.org> | 2011-11-24 20:40:12 +0000 |
---|---|---|
committer | marino <marino@pkgsrc.org> | 2011-11-24 20:40:12 +0000 |
commit | c514069b423347a3cf9354f6278c4cd0a8691191 (patch) | |
tree | 59db19e28fdd4e3d8e572c8a550ff2392199eeb8 | |
parent | d62b3d259a4f32c046afa81b5afee612185bdbb5 (diff) | |
download | pkgsrc-c514069b423347a3cf9354f6278c4cd0a8691191.tar.gz |
benchmarks/iozone: Really add DragonFly support
It appears that the authors of Iozone tried to add DragonFly support without
actually building it. The configuration was broken, and the iozone.c
was uncompilable. With the two modified patches, it will compile now, and a
quick check using "iozone -a" seemed to work as expected.
No PKGREVISION bump necessary.
-rw-r--r-- | benchmarks/iozone/distinfo | 6 | ||||
-rw-r--r-- | benchmarks/iozone/patches/patch-aa | 19 | ||||
-rw-r--r-- | benchmarks/iozone/patches/patch-ab | 75 |
3 files changed, 92 insertions, 8 deletions
diff --git a/benchmarks/iozone/distinfo b/benchmarks/iozone/distinfo index 54c30265f0a..3bc70e70fb1 100644 --- a/benchmarks/iozone/distinfo +++ b/benchmarks/iozone/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.16 2008/08/25 19:35:30 bjs Exp $ +$NetBSD: distinfo,v 1.17 2011/11/24 20:40:12 marino Exp $ SHA1 (iozone3_308.tar) = 7617d3d6db2f674cbd8e3a2dad3627e4dee7d821 RMD160 (iozone3_308.tar) = f0c55ed2e6ab8ac205d6a93f37c32db7f7707a64 Size (iozone3_308.tar) = 1556480 bytes -SHA1 (patch-aa) = 1cdc9b4d965c7ee07fe0e5c64d7a2150a5beb8af -SHA1 (patch-ab) = 34bf46dfe0c9c63e8151f835fdb9a9ceae00eb38 +SHA1 (patch-aa) = d4f1675067918241643d56a3bcb5f3b9adf38f0a +SHA1 (patch-ab) = 29f750bd4610956be9886137bbf5c158247a7db1 SHA1 (patch-ac) = a7df47dca37d33e2658b27c4888294ad541fd1b2 diff --git a/benchmarks/iozone/patches/patch-aa b/benchmarks/iozone/patches/patch-aa index caa1e12ee2e..61ae5e5c0f4 100644 --- a/benchmarks/iozone/patches/patch-aa +++ b/benchmarks/iozone/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.7 2005/10/19 15:27:19 adam Exp $ +$NetBSD: patch-aa,v 1.8 2011/11/24 20:40:12 marino Exp $ ---- makefile.orig 2005-09-13 17:26:54.000000000 +0000 +--- makefile.orig 2008-07-17 15:07:10.000000000 +0000 +++ makefile -@@ -69,6 +69,7 @@ all: +@@ -75,6 +75,7 @@ all: @echo " -> UWIN (32bit) <-" @echo " -> Windows (95/98/NT) (32bit) <-" @echo "" @@ -10,3 +10,16 @@ $NetBSD: patch-aa,v 1.7 2005/10/19 15:27:19 adam Exp $ clean: rm -f *.o iozone fileop +@@ -712,6 +713,12 @@ fileop_bsdi.o: fileop.c + @echo "" + $(CC) -c -O $(CFLAGS) fileop.c -o fileop_bsdi.o + ++fileop_dragonfly.o: fileop.c ++ @echo "" ++ @echo "Building fileop for DragonFly" ++ @echo "" ++ $(CC) -c -O $(CFLAGS) fileop.c -o fileop_dragonfly.o ++ + fileop_freebsd.o: fileop.c + @echo "" + @echo "Building fileop for FreeBSD" diff --git a/benchmarks/iozone/patches/patch-ab b/benchmarks/iozone/patches/patch-ab index 3d1eef02c3c..46f1b6b017c 100644 --- a/benchmarks/iozone/patches/patch-ab +++ b/benchmarks/iozone/patches/patch-ab @@ -1,7 +1,16 @@ -$NetBSD: patch-ab,v 1.7 2008/08/25 19:35:30 bjs Exp $ +$NetBSD: patch-ab,v 1.8 2011/11/24 20:40:12 marino Exp $ ---- iozone.c.orig 2008-07-17 11:07:10.000000000 -0400 +--- iozone.c.orig 2008-07-17 15:07:10.000000000 +0000 +++ iozone.c +@@ -57,7 +57,7 @@ + #include <Windows.h> + int errno; + #else +-#if defined(linux) ++#if defined(linux) || defined(__DragonFly__) + #include <errno.h> + #else + extern int errno; /* imported for errors */ @@ -263,7 +263,7 @@ THISVERSION, #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__APPLE__) && !defined(__DragonFly__) #include <malloc.h> @@ -11,3 +20,65 @@ $NetBSD: patch-ab,v 1.7 2008/08/25 19:35:30 bjs Exp $ #include <stdlib.h> #include <string.h> #endif +@@ -412,6 +412,9 @@ struct piovec piov[PVECMAX]; + struct iovec piov[PVECMAX]; + #define piov_base iov_base + #define piov_len iov_len ++#if defined (__DragonFly__) ++#define DFLY_VECTOR_OFFSET ++#endif + #endif + + #endif +@@ -6534,7 +6537,11 @@ long long *data2; + if(odsync) + file_flags |= O_DSYNC; + #endif +-#if defined(_HPUX_SOURCE) || defined(linux) || defined(freebsd) || defined(__DragonFly__) ++#if defined (__DragonFly__) ++ if(read_sync) ++ file_flags |= O_SYNC; ++#endif ++#if defined(_HPUX_SOURCE) || defined(linux) || defined(freebsd) + if(read_sync) + file_flags |=O_RSYNC|O_SYNC; + #endif +@@ -9652,7 +9659,11 @@ long long *data1, *data2; + open_flags |=O_DIRECTIO; + #endif + #endif +-#if defined(_HPUX_SOURCE) || defined(linux) || defined(freebsd) || defined(__DragonFly__) ++#if defined (__DragonFly__) ++ if(read_sync) ++ open_flags |= O_SYNC; ++#endif ++#if defined(_HPUX_SOURCE) || defined(linux) || defined(freebsd) + if(read_sync) + open_flags |=O_RSYNC|O_SYNC; + #endif +@@ -9865,6 +9876,7 @@ long long *data1,*data2; + off64_t filebytes64,i; + off64_t numrecs64; + int fd,ltest; ++ int wval; + #ifdef VXFS + int test_foo = 0; + #endif +@@ -10007,7 +10019,7 @@ long long *data1,*data2; + purgeit(piov[xx].piov_base,reclen); + } + if(pwritev(fd, piov,numvecs +-#ifdef PER_VECTOR_OFFSET ++#if defined(PER_VECTOR_OFFSET) || defined(DFLY_VECTOR_OFFSET) + , list_off[0] + #endif + ) != (reclen*numvecs)) +@@ -10310,7 +10322,7 @@ long long *data1,*data2; + purgeit(piov[xx].piov_base,reclen); + } + if(preadv(fd, piov, numvecs +-#ifdef PERVECTOR_OFFSET ++#if defined(PERVECTOR_OFFSET) || defined(DFLY_VECTOR_OFFSET) + , list_off[0] + #endif + ) != (numvecs * reclen)) |