summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/recipes-benchmark/tiobench
diff options
context:
space:
mode:
authorDave Cobbley <david.j.cobbley@linux.intel.com>2018-08-14 20:05:37 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-23 04:26:31 +0300
commiteb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch)
treede291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-oe/recipes-benchmark/tiobench
parent9c3cf826d853102535ead04cebc2d6023eff3032 (diff)
downloadopenbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-benchmark/tiobench')
-rw-r--r--meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Drop-inline-of-crc32-function-to-fix-build-using-GCC.patch30
-rw-r--r--meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Specify-printf-formats.patch49
-rw-r--r--meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/avoid-glibc-clashes.patch57
-rw-r--r--meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/tiobench-makefile.patch49
-rw-r--r--meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb30
5 files changed, 215 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Drop-inline-of-crc32-function-to-fix-build-using-GCC.patch b/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Drop-inline-of-crc32-function-to-fix-build-using-GCC.patch
new file mode 100644
index 0000000000..5aebb956c1
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Drop-inline-of-crc32-function-to-fix-build-using-GCC.patch
@@ -0,0 +1,30 @@
+From 5429ab90eb33eb243fa7b9cd247e0490d72b9da5 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Wed, 9 Sep 2015 15:04:45 +0000
+Subject: [PATCH] Drop 'inline' of crc32 function to fix build using GCC 5.2
+Organization: O.S. Systems Software LTDA.
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ crc32.h | 1 -
+ crc32.o | Bin 748 -> 2056 bytes
+ 2 files changed, 1 deletion(-)
+
+diff --git a/crc32.h b/crc32.h
+index 62b3433..8fc62b6 100644
+--- a/crc32.h
++++ b/crc32.h
+@@ -18,7 +18,6 @@
+ #ifndef CRC32_H
+ #define CRC32_H
+
+-inline
+ unsigned long crc32( const void* const buffer,
+ unsigned long length,
+ unsigned long crc);
+
+--
+2.1.4
+
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Specify-printf-formats.patch b/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Specify-printf-formats.patch
new file mode 100644
index 0000000000..cfd34f02a0
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/0001-Specify-printf-formats.patch
@@ -0,0 +1,49 @@
+From b08e61ef64eece23ce8ffa2784cd3c4f70b6169e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 08:08:56 -0700
+Subject: [PATCH] Specify printf formats
+
+Fixes
+tiotest.c:555:4: error: format not a string literal and no format arguments [-Werror=format-security]
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tiotest.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tiotest.c b/tiotest.c
+index 6b3d0c3..3e6166a 100644
+--- a/tiotest.c
++++ b/tiotest.c
+@@ -91,7 +91,7 @@ inline void checkIntZero(int value, char *mess)
+ {
+ if (value <= 0)
+ {
+- printf(mess);
++ printf("%s",mess);
+ printf("Try 'tiotest -h' for more information.\n");
+ exit(1);
+ }
+@@ -101,7 +101,7 @@ inline void checkLong(long value, char *mess)
+ {
+ if (value < 0)
+ {
+- printf(mess);
++ printf("%s", mess);
+ printf("Try 'tiotest -h' for more information\n");
+ exit(1);
+ }
+@@ -552,7 +552,7 @@ void do_test( ThreadTest *test, int testCase, int sequential,
+ if(args.debugLevel > 4)
+ {
+ printf("Created %d threads\n", i);
+- fprintf(stderr, debugMessage);
++ fprintf(stderr, "%s", debugMessage);
+ fflush(stderr);
+ }
+
+--
+2.13.1
+
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/avoid-glibc-clashes.patch b/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/avoid-glibc-clashes.patch
new file mode 100644
index 0000000000..321d299837
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/avoid-glibc-clashes.patch
@@ -0,0 +1,57 @@
+From: Otavio Salvador <otavio@ossystems.com.br>
+Subject: [PATCH] Avoid aligned allocation function name clashes
+
+glibc added new methods for aligned allocation and it clashes with the
+local version used by 'tiobench'. To fix it, we prefix the methods
+with '_'.
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ tiotest.c | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tiotest.c b/tiotest.c
+index 38f54e7..6b3d0c3 100644
+--- a/tiotest.c
++++ b/tiotest.c
+@@ -31,7 +31,7 @@ static const char* versionStr = "tiotest v0.3.3 (C) 1999-2000 Mika Kuoppala <mik
+ */
+ ArgumentOptions args;
+
+-static void * aligned_alloc(ssize_t size)
++static void * _aligned_alloc(ssize_t size)
+ {
+ caddr_t a;
+ a = mmap((caddr_t )0, size,
+@@ -41,7 +41,7 @@ static void * aligned_alloc(ssize_t size)
+ return a;
+ }
+
+-static int aligned_free(caddr_t a, ssize_t size)
++static int _aligned_free(caddr_t a, ssize_t size)
+ {
+ return munmap(a, size);
+ }
+@@ -281,7 +281,7 @@ void initialize_test( ThreadTest *d )
+ pthread_attr_setscope(&(d->threads[i].thread_attr),
+ PTHREAD_SCOPE_SYSTEM);
+
+- d->threads[i].buffer = aligned_alloc( d->threads[i].blockSize );
++ d->threads[i].buffer = _aligned_alloc( d->threads[i].blockSize );
+ if( d->threads[i].buffer == NULL )
+ {
+ perror("Error allocating memory");
+@@ -383,7 +383,7 @@ void cleanup_test( ThreadTest *d )
+ {
+ if (!args.rawDrives)
+ unlink(d->threads[i].fileName);
+- aligned_free( d->threads[i].buffer, d->threads[i].blockSize );
++ _aligned_free( d->threads[i].buffer, d->threads[i].blockSize );
+ d->threads[i].buffer = 0;
+
+ pthread_attr_destroy( &(d->threads[i].thread_attr) );
+--
+1.7.7
+
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/tiobench-makefile.patch b/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/tiobench-makefile.patch
new file mode 100644
index 0000000000..f820c7e337
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/tiobench-makefile.patch
@@ -0,0 +1,49 @@
+Adapt tiobench to OE
+Author: Ludovic Desroches <ludovic.desroches@atmel.com>
+
+Upstream-Status: Inappropriate [not author]
+
+Index: Makefile
+===================================================================
+--- a/Makefile 2011-05-26 07:48:46.341400974 +0200
++++ b/Makefile 2011-05-30 06:32:38.091401358 +0200
+@@ -1,8 +1,9 @@
+ # Makefile for tiotest
+
+-CC=gcc
++CC?=gcc
+ #CFLAGS=-O3 -fomit-frame-pointer -Wall
+ CFLAGS=-O2 -Wall
++LDFLAGS?=
+
+ #DEFINES=-DUSE_MMAP
+ #-DUSE_MADVISE
+@@ -14,16 +15,16 @@
+
+ #DEFINES=
+
+-LINK=gcc
++LINK?=$(CC)
+ EXE=tiotest
+ PROJECT=tiobench
+ # do it once instead of each time referenced
+ VERSION=$(shell egrep "tiotest v[0-9]+.[0-9]+" tiotest.c | cut -d " " -f 7 | sed "s/v//g")
+ DISTNAME=$(PROJECT)-$(VERSION)
+ INSTALL=install
+-PREFIX=/usr/local
++PREFIX?=/usr/local
+ BINDIR=$(PREFIX)/bin
+-DOCDIR=/usr/local/doc/$(DISTNAME)
++DOCDIR=$(PREFIX)/share/doc/$(DISTNAME)
+
+ all: $(EXE)
+
+@@ -34,7 +35,7 @@
+ $(CC) -c $(CFLAGS) $(DEFINES) tiotest.c -o tiotest.o
+
+ $(EXE): tiotest.o crc32.o
+- $(LINK) -o $(EXE) tiotest.o crc32.o -lpthread
++ $(LINK) -o $(EXE) tiotest.o crc32.o -lpthread $(LDFLAGS)
+ @echo
+ @echo "./tiobench.pl --help for usage options"
+ @echo
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb b/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb
new file mode 100644
index 0000000000..427ce67d61
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Threaded I/O tester"
+HOMEPAGE = "http://sourceforge.net/projects/tiobench/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
+
+PR = "r1"
+
+SRC_URI = "\
+ http://sourceforge.net/projects/tiobench/files/tiobench/${PV}/${BP}.tar.gz \
+ file://tiobench-makefile.patch \
+ file://avoid-glibc-clashes.patch \
+ file://0001-Drop-inline-of-crc32-function-to-fix-build-using-GCC.patch \
+ file://0001-Specify-printf-formats.patch \
+"
+SRC_URI[md5sum] = "bf485bf820e693c79e6bd2a38702a128"
+SRC_URI[sha256sum] = "8ad011059a35ac70cdb5e3d3999ceee44a8e8e9078926844b0685b7ea9db2bcc"
+
+EXTRA_OEMAKE = "PREFIX=${D}/usr"
+
+do_install() {
+ oe_runmake install
+}
+
+RDEPENDS_${PN} = "\
+ perl \
+ perl-module-exporter-heavy \
+ perl-module-getopt-long \
+ perl-module-overload \
+ perl-module-strict \
+"