diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
commit | 1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch) | |
tree | a21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-benchmark/tiobench | |
download | meta-openembedded-1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-benchmark/tiobench')
3 files changed, 134 insertions, 0 deletions
diff --git a/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/avoid-glibc-clashes.patch b/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/avoid-glibc-clashes.patch new file mode 100644 index 000000000..321d29983 --- /dev/null +++ b/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/avoid-glibc-clashes.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From: Otavio Salvador <otavio@ossystems.com.br> | ||
2 | Subject: [PATCH] Avoid aligned allocation function name clashes | ||
3 | |||
4 | glibc added new methods for aligned allocation and it clashes with the | ||
5 | local version used by 'tiobench'. To fix it, we prefix the methods | ||
6 | with '_'. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
11 | --- | ||
12 | tiotest.c | 8 ++++---- | ||
13 | 1 files changed, 4 insertions(+), 4 deletions(-) | ||
14 | |||
15 | diff --git a/tiotest.c b/tiotest.c | ||
16 | index 38f54e7..6b3d0c3 100644 | ||
17 | --- a/tiotest.c | ||
18 | +++ b/tiotest.c | ||
19 | @@ -31,7 +31,7 @@ static const char* versionStr = "tiotest v0.3.3 (C) 1999-2000 Mika Kuoppala <mik | ||
20 | */ | ||
21 | ArgumentOptions args; | ||
22 | |||
23 | -static void * aligned_alloc(ssize_t size) | ||
24 | +static void * _aligned_alloc(ssize_t size) | ||
25 | { | ||
26 | caddr_t a; | ||
27 | a = mmap((caddr_t )0, size, | ||
28 | @@ -41,7 +41,7 @@ static void * aligned_alloc(ssize_t size) | ||
29 | return a; | ||
30 | } | ||
31 | |||
32 | -static int aligned_free(caddr_t a, ssize_t size) | ||
33 | +static int _aligned_free(caddr_t a, ssize_t size) | ||
34 | { | ||
35 | return munmap(a, size); | ||
36 | } | ||
37 | @@ -281,7 +281,7 @@ void initialize_test( ThreadTest *d ) | ||
38 | pthread_attr_setscope(&(d->threads[i].thread_attr), | ||
39 | PTHREAD_SCOPE_SYSTEM); | ||
40 | |||
41 | - d->threads[i].buffer = aligned_alloc( d->threads[i].blockSize ); | ||
42 | + d->threads[i].buffer = _aligned_alloc( d->threads[i].blockSize ); | ||
43 | if( d->threads[i].buffer == NULL ) | ||
44 | { | ||
45 | perror("Error allocating memory"); | ||
46 | @@ -383,7 +383,7 @@ void cleanup_test( ThreadTest *d ) | ||
47 | { | ||
48 | if (!args.rawDrives) | ||
49 | unlink(d->threads[i].fileName); | ||
50 | - aligned_free( d->threads[i].buffer, d->threads[i].blockSize ); | ||
51 | + _aligned_free( d->threads[i].buffer, d->threads[i].blockSize ); | ||
52 | d->threads[i].buffer = 0; | ||
53 | |||
54 | pthread_attr_destroy( &(d->threads[i].thread_attr) ); | ||
55 | -- | ||
56 | 1.7.7 | ||
57 | |||
diff --git a/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/tiobench-makefile.patch b/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/tiobench-makefile.patch new file mode 100644 index 000000000..f820c7e33 --- /dev/null +++ b/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/tiobench-makefile.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | Adapt tiobench to OE | ||
2 | Author: Ludovic Desroches <ludovic.desroches@atmel.com> | ||
3 | |||
4 | Upstream-Status: Inappropriate [not author] | ||
5 | |||
6 | Index: Makefile | ||
7 | =================================================================== | ||
8 | --- a/Makefile 2011-05-26 07:48:46.341400974 +0200 | ||
9 | +++ b/Makefile 2011-05-30 06:32:38.091401358 +0200 | ||
10 | @@ -1,8 +1,9 @@ | ||
11 | # Makefile for tiotest | ||
12 | |||
13 | -CC=gcc | ||
14 | +CC?=gcc | ||
15 | #CFLAGS=-O3 -fomit-frame-pointer -Wall | ||
16 | CFLAGS=-O2 -Wall | ||
17 | +LDFLAGS?= | ||
18 | |||
19 | #DEFINES=-DUSE_MMAP | ||
20 | #-DUSE_MADVISE | ||
21 | @@ -14,16 +15,16 @@ | ||
22 | |||
23 | #DEFINES= | ||
24 | |||
25 | -LINK=gcc | ||
26 | +LINK?=$(CC) | ||
27 | EXE=tiotest | ||
28 | PROJECT=tiobench | ||
29 | # do it once instead of each time referenced | ||
30 | VERSION=$(shell egrep "tiotest v[0-9]+.[0-9]+" tiotest.c | cut -d " " -f 7 | sed "s/v//g") | ||
31 | DISTNAME=$(PROJECT)-$(VERSION) | ||
32 | INSTALL=install | ||
33 | -PREFIX=/usr/local | ||
34 | +PREFIX?=/usr/local | ||
35 | BINDIR=$(PREFIX)/bin | ||
36 | -DOCDIR=/usr/local/doc/$(DISTNAME) | ||
37 | +DOCDIR=$(PREFIX)/share/doc/$(DISTNAME) | ||
38 | |||
39 | all: $(EXE) | ||
40 | |||
41 | @@ -34,7 +35,7 @@ | ||
42 | $(CC) -c $(CFLAGS) $(DEFINES) tiotest.c -o tiotest.o | ||
43 | |||
44 | $(EXE): tiotest.o crc32.o | ||
45 | - $(LINK) -o $(EXE) tiotest.o crc32.o -lpthread | ||
46 | + $(LINK) -o $(EXE) tiotest.o crc32.o -lpthread $(LDFLAGS) | ||
47 | @echo | ||
48 | @echo "./tiobench.pl --help for usage options" | ||
49 | @echo | ||
diff --git a/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb b/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb new file mode 100644 index 000000000..3267de2a0 --- /dev/null +++ b/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Threaded I/O tester" | ||
2 | HOMEPAGE = "http://sourceforge.net/projects/tiobench/" | ||
3 | LICENSE = "GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b" | ||
5 | |||
6 | PR = "r1" | ||
7 | |||
8 | SRC_URI = "\ | ||
9 | http://sourceforge.net/projects/tiobench/files/tiobench/${PV}/${BP}.tar.gz \ | ||
10 | file://tiobench-makefile.patch \ | ||
11 | file://avoid-glibc-clashes.patch \ | ||
12 | " | ||
13 | SRC_URI[md5sum] = "bf485bf820e693c79e6bd2a38702a128" | ||
14 | SRC_URI[sha256sum] = "8ad011059a35ac70cdb5e3d3999ceee44a8e8e9078926844b0685b7ea9db2bcc" | ||
15 | |||
16 | EXTRA_OEMAKE = "PREFIX=${D}/usr" | ||
17 | |||
18 | do_install() { | ||
19 | oe_runmake install | ||
20 | } | ||
21 | |||
22 | RDEPENDS_${PN} = "\ | ||
23 | perl \ | ||
24 | perl-module-exporter-heavy \ | ||
25 | perl-module-getopt-long \ | ||
26 | perl-module-overload \ | ||
27 | perl-module-strict \ | ||
28 | " | ||