diff options
author | maya <maya@pkgsrc.org> | 2018-06-01 10:55:52 +0000 |
---|---|---|
committer | maya <maya@pkgsrc.org> | 2018-06-01 10:55:52 +0000 |
commit | 1cdd0a3b58b4f08d0d88051c4a4d802cf7f8847f (patch) | |
tree | cb7daf6fa9b7e8b57dc2f8296b13f57d5f4352f4 /benchmarks | |
parent | 76389f7724b16fcd1545ac6de737b5675d08cf7c (diff) | |
download | pkgsrc-1cdd0a3b58b4f08d0d88051c4a4d802cf7f8847f.tar.gz |
bonnie++: assume large file support exists on NetBSD, handle
fallout from it.
NetBSD has large file support without O_LARGEFILE/open64/lseek64.
Not tested on other operating systems, but hopefully a non-functional
change for them.
This is the equivalent of removing the checks for large file support
and using O_LARGEFILE to test for the availability of different functions
for 64bit.
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/bonnie++/Makefile | 5 | ||||
-rw-r--r-- | benchmarks/bonnie++/distinfo | 6 | ||||
-rw-r--r-- | benchmarks/bonnie++/patches/patch-ab | 10 | ||||
-rw-r--r-- | benchmarks/bonnie++/patches/patch-bon__io.cpp | 17 | ||||
-rw-r--r-- | benchmarks/bonnie++/patches/patch-port.h.in | 29 |
5 files changed, 61 insertions, 6 deletions
diff --git a/benchmarks/bonnie++/Makefile b/benchmarks/bonnie++/Makefile index 18feb4523a7..12673857064 100644 --- a/benchmarks/bonnie++/Makefile +++ b/benchmarks/bonnie++/Makefile @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.33 2017/08/22 18:51:44 bsiegert Exp $ +# $NetBSD: Makefile,v 1.34 2018/06/01 10:55:52 maya Exp $ # DISTNAME= bonnie++-1.97.3 CATEGORIES= benchmarks +PKGREVISION= 1 MASTER_SITES= http://www.coker.com.au/bonnie++/experimental/ EXTRACT_SUFX= .tgz @@ -17,6 +18,8 @@ REPLACE_PERL+= bon_csv2txt.in bon_csv2html.in INSTALLATION_DIRS= bin share/doc/bonnie++ ${PKGMANDIR}/man1 ${PKGMANDIR}/man8 +CFLAGS.NetBSD+= -D_LARGEFILE64_SOURCE=1 + # todo: patch bonnie++.8 to point to correct path to readme.html post-install: ${INSTALL_DATA} ${WRKSRC}/readme.html ${DESTDIR}${PREFIX}/share/doc/bonnie++/ diff --git a/benchmarks/bonnie++/distinfo b/benchmarks/bonnie++/distinfo index c8c2bcebda3..97ce21329f7 100644 --- a/benchmarks/bonnie++/distinfo +++ b/benchmarks/bonnie++/distinfo @@ -1,7 +1,9 @@ -$NetBSD: distinfo,v 1.11 2017/08/22 18:51:44 bsiegert Exp $ +$NetBSD: distinfo,v 1.12 2018/06/01 10:55:52 maya Exp $ SHA1 (bonnie++-1.97.3.tgz) = 47ce25f21146a63bb007ba94e26adb49c4c15de7 RMD160 (bonnie++-1.97.3.tgz) = 227f0e6b8e643bdd120e013c4f9f35426b3a7475 SHA512 (bonnie++-1.97.3.tgz) = 44de20b5e46aeaf7f7214766b3c555b8799138f6fd92f87fe9b7dfa6f19815c629d6122c2ef4e4d98a5528dbfcd4c70b3b850eeba05739f6dd20251bf8d7c893 Size (bonnie++-1.97.3.tgz) = 100166 bytes -SHA1 (patch-ab) = ff04e53fb456be781f4e0751ab5776bf8c1b5c0d +SHA1 (patch-ab) = 18756a4f3efaf8d478c3edc5be424c099c47e374 +SHA1 (patch-bon__io.cpp) = 2ce4504424c8fbf88ee5d1eb21e3556f541a05f4 +SHA1 (patch-port.h.in) = 089d93456efab27a91d5574ed6b8f5956a734620 diff --git a/benchmarks/bonnie++/patches/patch-ab b/benchmarks/bonnie++/patches/patch-ab index 7cfb0daad34..51f8ce482a9 100644 --- a/benchmarks/bonnie++/patches/patch-ab +++ b/benchmarks/bonnie++/patches/patch-ab @@ -1,9 +1,13 @@ -$NetBSD: patch-ab,v 1.5 2017/08/22 18:51:44 bsiegert Exp $ +$NetBSD: patch-ab,v 1.6 2018/06/01 10:55:52 maya Exp $ --- Makefile.in.orig 2008-12-30 21:04:25.000000000 +0000 +++ Makefile.in -@@ -12,7 +12,7 @@ WFLAGS=-Wall -W -Wshadow -Wpointer-arith - CFLAGS=-O2 @debug@ -DNDEBUG $(WFLAGS) $(MORECFLAGS) +@@ -9,10 +9,10 @@ prefix=@prefix@ + eprefix=@exec_prefix@ + #MORE_WARNINGS=-Weffc++ + WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-arith -Wwrite-strings -Wformat-security -Wswitch-enum -Winit-self $(MORE_WARNINGS) +-CFLAGS=-O2 @debug@ -DNDEBUG $(WFLAGS) $(MORECFLAGS) ++CFLAGS+=-O2 @debug@ -DNDEBUG $(WFLAGS) $(MORECFLAGS) CXX=@CXX@ $(CFLAGS) LINK=@CXX@ -THREAD_LFLAGS=@thread_ldflags@ diff --git a/benchmarks/bonnie++/patches/patch-bon__io.cpp b/benchmarks/bonnie++/patches/patch-bon__io.cpp new file mode 100644 index 00000000000..7f3629f3e36 --- /dev/null +++ b/benchmarks/bonnie++/patches/patch-bon__io.cpp @@ -0,0 +1,17 @@ +$NetBSD: patch-bon__io.cpp,v 1.1 2018/06/01 10:55:52 maya Exp $ + +Test specifically for O_LARGEFILE, instead of tying all +of the largefile support for the LFS functions +(not available on NetBSD) + +--- bon_io.cpp.orig 2009-07-03 02:26:00.000000000 +0000 ++++ bon_io.cpp +@@ -291,7 +291,7 @@ int CFileOp::m_open(CPCCHAR base_name, b + else + { + flags = O_RDWR; +-#ifdef _LARGEFILE64_SOURCE ++#ifdef O_LARGEFILE + flags |= O_LARGEFILE; + #endif + } diff --git a/benchmarks/bonnie++/patches/patch-port.h.in b/benchmarks/bonnie++/patches/patch-port.h.in new file mode 100644 index 00000000000..23eb97837e4 --- /dev/null +++ b/benchmarks/bonnie++/patches/patch-port.h.in @@ -0,0 +1,29 @@ +$NetBSD: patch-port.h.in,v 1.1 2018/06/01 10:55:52 maya Exp $ + +Undo the hack of -D_LARGEFILE64_SOURCE=1 in this spot. + +e.g. NetBSD does large file support without open64/lseek64/... +we want the rest of the code to work with large files, but +can't use this code. + +O_LARGEFILE should be available wherever open64 and such are. + +--- port.h.in.orig 2016-06-30 09:40:52.000000000 +0000 ++++ port.h.in +@@ -1,6 +1,7 @@ + #ifndef PORT_UNIX_H + #define PORT_UNIX_H + ++#include <unistd.h> + #include "conf.h" + + @semun@ +@@ -23,7 +24,7 @@ + // UNIX here + typedef struct timeval TIMEVAL_TYPE; + +-#ifdef _LARGEFILE64_SOURCE ++#ifdef O_LARGEFILE + #define OFF_TYPE off64_t + #define file_lseek lseek64 + #define file_creat creat64 |