summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2012-08-03 18:43:00 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2012-08-07 12:21:24 +0200
commit5d9de465ca73850bea3f0b76de3d74d6ab6f9b4b (patch)
tree51d14b5a0f2432aac933c25e0af28fd71baadf15
parent71781e217a873bade740bc726fb7f5fe3000b633 (diff)
downloadmeta-openembedded-5d9de465ca73850bea3f0b76de3d74d6ab6f9b4b.tar.gz
tiobench: fix aligned allocation method clash with newer glibc
glibc 2.16 added aligned allocation support to stdlib and those function clashes with the local implementation done in tiobench. We fix it using a '_' prefix on those. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-rw-r--r--meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/avoid-glibc-clashes.patch57
-rw-r--r--meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb3
2 files changed, 60 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 0000000000..321d299837
--- /dev/null
+++ b/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/avoid-glibc-clashes.patch
@@ -0,0 +1,57 @@
1From: Otavio Salvador <otavio@ossystems.com.br>
2Subject: [PATCH] Avoid aligned allocation function name clashes
3
4glibc added new methods for aligned allocation and it clashes with the
5local version used by 'tiobench'. To fix it, we prefix the methods
6with '_'.
7
8Upstream-Status: Pending
9
10Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11---
12 tiotest.c | 8 ++++----
13 1 files changed, 4 insertions(+), 4 deletions(-)
14
15diff --git a/tiotest.c b/tiotest.c
16index 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--
561.7.7
57
diff --git a/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb b/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb
index 3b77b38c20..5b95ac0c94 100644
--- a/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb
+++ b/meta-oe/recipes-benchmark/tiobench/tiobench_0.3.3.bb
@@ -3,9 +3,12 @@ HOMEPAGE = "http://sourceforge.net/projects/tiobench/"
3LICENSE = "GPLv2" 3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b" 4LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
5 5
6PR = "r1"
7
6SRC_URI = "\ 8SRC_URI = "\
7 http://sourceforge.net/projects/tiobench/files/tiobench/${PV}/${P}.tar.gz \ 9 http://sourceforge.net/projects/tiobench/files/tiobench/${PV}/${P}.tar.gz \
8 file://tiobench-makefile.patch \ 10 file://tiobench-makefile.patch \
11 file://avoid-glibc-clashes.patch \
9 " 12 "
10SRC_URI[md5sum] = "bf485bf820e693c79e6bd2a38702a128" 13SRC_URI[md5sum] = "bf485bf820e693c79e6bd2a38702a128"
11SRC_URI[sha256sum] = "8ad011059a35ac70cdb5e3d3999ceee44a8e8e9078926844b0685b7ea9db2bcc" 14SRC_URI[sha256sum] = "8ad011059a35ac70cdb5e3d3999ceee44a8e8e9078926844b0685b7ea9db2bcc"