summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChunrong Guo <B40290@freescale.com>2013-09-23 08:00:55 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2013-10-05 12:36:24 +0200
commitfd9f63aad15ef0bd7b13361c8399f360d4d518ec (patch)
tree3359c6bdfa4d3a4d27263b086cdf61ca2569c4e7
parentf73a8d62659fac2245f6dcb991940741afce44c7 (diff)
downloadmeta-openembedded-fd9f63aad15ef0bd7b13361c8399f360d4d518ec.tar.gz
libhugetlbfs: add recipe
Signed-off-by: Chunrong Guo <B40290@freescale.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-support.patch88
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch62
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch38
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/fix-lib64-can-not-be-shiped-in-64bit-target.patch75
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/install64-fix.patch20
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch99
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch48
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb51
8 files changed, 481 insertions, 0 deletions
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-support.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-support.patch
new file mode 100644
index 000000000..ceac6b428
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-support.patch
@@ -0,0 +1,88 @@
1Upstream-Status: Pending
2
3From 52b8430eb4f03e35721f29862de33041fe9c9768 Mon Sep 17 00:00:00 2001
4From: Steve Capper <steve.capper@linaro.org>
5Date: Wed, 10 Apr 2013 14:51:12 +0100
6Subject: [PATCH] Aarch64 support.
7
8This patch adds support for Aarch64.
9
10As with ARMv7, We do not add the xBT/xBDT style linker scripts as
11these have been deprecated in favour of adjusting the page sizes
12via command line parameter to ld.
13
14Signed-off-by: Steve Capper <steve.capper@linaro.org>
15---
16 Makefile | 7 +++++++
17 sys-aarch64elf_linux.S | 34 ++++++++++++++++++++++++++++++++++
18 2 files changed, 41 insertions(+)
19 create mode 100644 sys-aarch64elf_linux.S
20
21diff --git a/Makefile b/Makefile
22index 48205af..28ceade 100644
23--- a/Makefile
24+++ b/Makefile
25@@ -57,6 +57,12 @@ TMPLIB32 = lib
26 ELF32 += armelf_linux_eabi
27 CUSTOM_LDSCRIPTS = no
28 else
29+ifeq ($(ARCH),aarch64)
30+CC64 = gcc
31+ELF64 = aarch64elf_linux
32+TMPLIB64 = lib64
33+CUSTOM_LDSCRIPTS = no
34+else
35 ifeq ($(ARCH),i386)
36 CC32 = gcc
37 ELF32 = elf_i386
38@@ -100,6 +106,7 @@ endif
39 endif
40 endif
41 endif
42+endif
43
44 ifdef CC32
45 OBJDIRS += obj32
46diff --git a/sys-aarch64elf_linux.S b/sys-aarch64elf_linux.S
47new file mode 100644
48index 0000000..699ff4c
49--- /dev/null
50+++ b/sys-aarch64elf_linux.S
51@@ -0,0 +1,34 @@
52+/*
53+ * libhugetlbfs - Easy use of Linux hugepages
54+ * Copyright (C) 2013 Linaro Ltd.
55+ *
56+ * This library is free software; you can redistribute it and/or
57+ * modify it under the terms of the GNU Lesser General Public License
58+ * version 2.1 as published by the Free Software Foundation.
59+ *
60+ * This library is distributed in the hope that it will be useful, but
61+ * WITHOUT ANY WARRANTY; without even the implied warranty of
62+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
63+ * Lesser General Public License for more details.
64+ *
65+ * You should have received a copy of the GNU Lesser General Public
66+ * License along with this library; if not, write to the Free Software
67+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
68+ */
69+
70+ .text
71+
72+ .globl direct_syscall
73+
74+
75+direct_syscall:
76+ uxtw x8, w0
77+ mov x0, x1
78+ mov x1, x2
79+ mov x2, x3
80+ mov x3, x4
81+ mov x4, x5
82+ mov x5, x6
83+ mov x6, x7
84+ svc 0x0
85+ RET
86--
871.7.9.5
88
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch
new file mode 100644
index 000000000..0b6fd8a30
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch
@@ -0,0 +1,62 @@
1Upstream-Status: Pending
2
3From 9bb940bd6a86f09280bdcd48a7177a835d72a25c Mon Sep 17 00:00:00 2001
4From: Steve Capper <steve.capper@linaro.org>
5Date: Wed, 10 Apr 2013 15:52:46 +0100
6Subject: [PATCH] Aarch64 unit test fixes.
7
8On Aarch64, zero bytes are illegal instructions, this is added to
9the icache-hygiene test.
10
11In mremap-expand-slice-collision, if __LP64__ is defined then
12mappings are attempted at 1TB boundaries which are outside the
13allowable mmap region for Aarch64. For __aarch64__ we change this
14mapping back to 256MB slices.
15
16Signed-off-by: Steve Capper <steve.capper@linaro.org>
17---
18 tests/icache-hygiene.c | 7 ++++---
19 tests/mremap-expand-slice-collision.c | 2 +-
20 2 files changed, 5 insertions(+), 4 deletions(-)
21
22diff --git a/tests/icache-hygiene.c b/tests/icache-hygiene.c
23index 51792b3..876ce10 100644
24--- a/tests/icache-hygiene.c
25+++ b/tests/icache-hygiene.c
26@@ -54,7 +54,7 @@ static void cacheflush(void *p)
27 {
28 #if defined(__powerpc__)
29 asm volatile("dcbst 0,%0; sync; icbi 0,%0; isync" : : "r"(p));
30-#elif defined(__arm__)
31+#elif defined(__arm__) || defined(__aarch64__)
32 __clear_cache(p, p + COPY_SIZE);
33 #endif
34 }
35@@ -87,8 +87,9 @@ static void *sig_expected;
36 static void sig_handler(int signum, siginfo_t *si, void *uc)
37 {
38 #if defined(__powerpc__) || defined(__powerpc64__) || defined(__ia64__) || \
39- defined(__s390__) || defined(__s390x__) || defined(__sparc__)
40- /* On powerpc and ia64 and s390, 0 bytes are an illegal
41+ defined(__s390__) || defined(__s390x__) || defined(__sparc__) || \
42+ defined(__aarch64__)
43+ /* On powerpc, ia64, s390 and Aarch64, 0 bytes are an illegal
44 * instruction, so, if the icache is cleared properly, we SIGILL
45 * as soon as we jump into the cleared page */
46 if (signum == SIGILL) {
47diff --git a/tests/mremap-expand-slice-collision.c b/tests/mremap-expand-slice-collision.c
48index c25f4c6..853f3c3 100644
49--- a/tests/mremap-expand-slice-collision.c
50+++ b/tests/mremap-expand-slice-collision.c
51@@ -38,7 +38,7 @@ void init_slice_boundary(int fd)
52 unsigned long slice_size;
53 void *p1, *p2, *heap;
54 int slices_ok, i, rc;
55-#ifdef __LP64__
56+#if defined(__LP64__) && !defined(__aarch64__)
57 /* powerpc: 1TB slices starting at 1 TB */
58 slice_boundary = 0x10000000000;
59 slice_size = 0x10000000000;
60--
611.7.9.5
62
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch
new file mode 100644
index 000000000..673f2046d
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch
@@ -0,0 +1,38 @@
1Upstream-Status: Pending
2
3From c7fcb7270bb510d7271a1c0cea095a4dbea49420 Mon Sep 17 00:00:00 2001
4From: Steve Capper <steve.capper@linaro.org>
5Date: Mon, 3 Jun 2013 17:00:45 +0100
6Subject: [PATCH] Add PROT_NONE to the mprotect test.
7
8The mprotect unit test checks PROT_READ and PROT_READ | PROT_WRITE
9protections. We recently found that PROT_NONE wasn't properly
10supported in our huge page kernel code.
11
12This patch adds PROT_NONE tests to mprotect. The expected behaviour
13is that neither reads nor writes should succeed.
14
15Signed-off-by: Steve Capper <steve.capper@linaro.org>
16---
17 tests/mprotect.c | 6 ++++++
18 1 file changed, 6 insertions(+)
19
20diff --git a/tests/mprotect.c b/tests/mprotect.c
21index aa4673e..db6a662 100644
22--- a/tests/mprotect.c
23+++ b/tests/mprotect.c
24@@ -213,5 +213,11 @@ int main(int argc, char *argv[])
25 test_mprotect(fd, "RW->R 1/2", 2*hpage_size, PROT_READ|PROT_WRITE,
26 hpage_size, PROT_READ);
27
28+ /* PROT_NONE tests */
29+ test_mprotect(fd, "NONE->R", hpage_size, PROT_NONE,
30+ hpage_size, PROT_READ);
31+ test_mprotect(fd, "NONE->RW", hpage_size, PROT_NONE,
32+ hpage_size, PROT_READ|PROT_WRITE);
33+
34 PASS();
35 }
36--
371.7.9.5
38
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/fix-lib64-can-not-be-shiped-in-64bit-target.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/fix-lib64-can-not-be-shiped-in-64bit-target.patch
new file mode 100644
index 000000000..1ab461c49
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/fix-lib64-can-not-be-shiped-in-64bit-target.patch
@@ -0,0 +1,75 @@
1Upstream-Status: Inappropriate [oe-core specific]
2
3
4fix the below error:
5 ERROR: QA Issue: libhugetlbfs: Files/directories were installed but not shipped
6 /usr/lib64
7 /usr/lib64/libhugetlbfs.so
8 /usr/lib64/libhugetlbfs.a
9 /usr/lib64/libhugetlbfs_privutils.so
10 /usr/lib64/perl5
11 /usr/lib64/perl5/TLBC
12 /usr/lib64/perl5/TLBC/PerfCollect.pm
13 /usr/lib64/perl5/TLBC/Report.pm
14 /usr/lib64/perl5/TLBC/DataCollect.pm
15 /usr/lib64/perl5/TLBC/OpCollect.pm
16$<50>ERROR: QA run found fatal errors. Please consider fixing them.
17
18
19Signed-off-by: Guo Chunrong <B40290@freescale.com>
20
21--- a/Makefile 2013-09-23 02:28:57.340566998 -0500
22+++ b/Makefile 2013-09-23 02:31:05.344569896 -0500
23@@ -33,7 +33,6 @@
24 CPPFLAGS += -D__LIBHUGETLBFS__ -DPPC_NO_SEGMENTS
25
26 ARCH = $(shell uname -m | sed -e s/i.86/i386/)
27-CC = gcc
28
29 CUSTOM_LDSCRIPTS = yes
30
31@@ -59,9 +58,9 @@
32 CUSTOM_LDSCRIPTS = no
33 else
34 ifeq ($(ARCH),aarch64)
35-CC64 = gcc
36+CC64 = $(CC)
37 ELF64 = aarch64elf_linux
38-TMPLIB64 = lib64
39+TMPLIB64 = lib
40 CUSTOM_LDSCRIPTS = no
41 else
42 ifeq ($(ARCH),i386)
43@@ -72,7 +71,7 @@
44 ifeq ($(ARCH),x86_64)
45 CC64 = $(CC) -m64
46 ELF64 = elf_x86_64
47-TMPLIB64 = lib64
48+TMPLIB64 = lib
49 TMPLIB32 = lib
50 ifneq ($(BUILDTYPE),NATIVEONLY)
51 CC32 = $(CC) -m32
52@@ -172,11 +171,23 @@
53 BINDIR = $(PREFIX)/share/libhugetlbfs
54 EXEDIR = $(PREFIX)/bin
55 DOCDIR = $(PREFIX)/share/doc/libhugetlbfs
56+
57 ifdef CC32
58 PMDIR = $(PREFIX)/lib/perl5/TLBC
59+endif
60+
61+ifdef CC64
62+ifeq ($(ARCH),x86_64)
63+PMDIR = $(PREFIX)/lib/perl5/TLBC
64+else
65+ifeq ($(ARCH),aarch64)
66+PMDIR = $(PREFIX)/lib/perl5/TLBC
67 else
68 PMDIR = $(PREFIX)/lib64/perl5/TLBC
69 endif
70+endif
71+endif
72+
73 MANDIR1 = $(PREFIX)/share/man/man1
74 MANDIR3 = $(PREFIX)/share/man/man3
75 MANDIR7 = $(PREFIX)/share/man/man7
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/install64-fix.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/install64-fix.patch
new file mode 100644
index 000000000..9652c3deb
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/install64-fix.patch
@@ -0,0 +1,20 @@
1Upstream-Status: Inappropriate [oe-core specific]
2
3TESTS_64 is empty, install will fail due to missing file operand
4
5
6Signed-off-by: Chunrong Guo <B40290@freescale.com>
7
8Index: git/tests/Makefile
9===================================================================
10--- git.orig/tests/Makefile
11+++ git/tests/Makefile
12@@ -292,7 +292,7 @@ obj64/install:
13 $(INSTALL) -m 755 wrapper-utils.sh $(DESTDIR)$(INST_TESTSDIR64)/obj64
14 $(INSTALL) -m 755 $(HELPERS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64
15 $(INSTALL) -m 755 $(HELPER_LIBS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64
16- $(INSTALL) -m 755 $(TESTS_64:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64
17+# $(INSTALL) -m 755 $(TESTS_64:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64
18 $(INSTALL) -m 755 run_tests.py $(DESTDIR)$(INST_TESTSDIR64)
19
20 install: $(OBJDIRS:%=%/install)
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch
new file mode 100644
index 000000000..b3fd84312
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch
@@ -0,0 +1,99 @@
1From 0a2877400a086e9d6ddd32a80462b7a931921dc2 Mon Sep 17 00:00:00 2001
2From: Chunrong Guo <B40290@freescale.com>
3Date: Sun, 8 Sep 2013 23:21:49 -0500
4Subject: [PATCH] libhugetlbfs: avoid search host library path for cross
5 compilation
6
7Upstream-Status: Inappropriate [oe-core specific]
8
9Signed-off-by: Chunrong Guo <B40290@freescale.com>
10---
11 ldscripts/elf32ppclinux.xB | 2 +-
12 ldscripts/elf32ppclinux.xBDT | 2 +-
13 ldscripts/elf64ppc.xB | 2 +-
14 ldscripts/elf64ppc.xBDT | 2 +-
15 ldscripts/elf_x86_64.xB | 2 +-
16 ldscripts/elf_x86_64.xBDT | 2 +-
17 6 files changed, 6 insertions(+), 6 deletions(-)
18
19diff --git a/ldscripts/elf32ppclinux.xB b/ldscripts/elf32ppclinux.xB
20index 28ad88d..33d482d 100644
21--- a/ldscripts/elf32ppclinux.xB
22+++ b/ldscripts/elf32ppclinux.xB
23@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
24 "elf32-powerpc")
25 OUTPUT_ARCH(powerpc:common)
26 ENTRY(_start)
27-SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
28+/*SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/
29 INPUT(-lhugetlbfs);
30 PHDRS
31 {
32diff --git a/ldscripts/elf32ppclinux.xBDT b/ldscripts/elf32ppclinux.xBDT
33index 497882b..823475e 100644
34--- a/ldscripts/elf32ppclinux.xBDT
35+++ b/ldscripts/elf32ppclinux.xBDT
36@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
37 "elf32-powerpc")
38 OUTPUT_ARCH(powerpc:common)
39 ENTRY(_start)
40-SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
41+/*SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/
42 INPUT(-lhugetlbfs);
43 PHDRS
44 {
45diff --git a/ldscripts/elf64ppc.xB b/ldscripts/elf64ppc.xB
46index 1a9c1ab..8cc557d 100644
47--- a/ldscripts/elf64ppc.xB
48+++ b/ldscripts/elf64ppc.xB
49@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc",
50 "elf64-powerpc")
51 OUTPUT_ARCH(powerpc:common64)
52 ENTRY(_start)
53-SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
54+/*SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/
55 INPUT(-lhugetlbfs);
56 PHDRS
57 {
58diff --git a/ldscripts/elf64ppc.xBDT b/ldscripts/elf64ppc.xBDT
59index 5477294..53e0749 100644
60--- a/ldscripts/elf64ppc.xBDT
61+++ b/ldscripts/elf64ppc.xBDT
62@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc",
63 "elf64-powerpc")
64 OUTPUT_ARCH(powerpc:common64)
65 ENTRY(_start)
66-SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
67+/*SEARCH_DIR("/usr/powerpc64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/powerpc64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/
68 INPUT( -lhugetlbfs );
69 PHDRS
70 {
71diff --git a/ldscripts/elf_x86_64.xB b/ldscripts/elf_x86_64.xB
72index ed21a2c..ba50e9f 100644
73--- a/ldscripts/elf_x86_64.xB
74+++ b/ldscripts/elf_x86_64.xB
75@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
76 "elf64-x86-64")
77 OUTPUT_ARCH(i386:x86-64)
78 ENTRY(_start)
79-SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
80+/*SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/
81 INPUT(-lhugetlbfs);
82 /* Do we need any of these for elf?
83 __DYNAMIC = 0; */
84diff --git a/ldscripts/elf_x86_64.xBDT b/ldscripts/elf_x86_64.xBDT
85index 1855202..c62d245 100644
86--- a/ldscripts/elf_x86_64.xBDT
87+++ b/ldscripts/elf_x86_64.xBDT
88@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
89 "elf64-x86-64")
90 OUTPUT_ARCH(i386:x86-64)
91 ENTRY(_start)
92-SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
93+/*SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/
94 INPUT(-lhugetlbfs);
95 /* Do we need any of these for elf?
96 __DYNAMIC = 0; */
97--
981.7.9.7
99
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch
new file mode 100644
index 000000000..329637604
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch
@@ -0,0 +1,48 @@
1From 355c014573de7f95202cc7c819f81f0f230e4a1a Mon Sep 17 00:00:00 2001
2From: Ting Liu <b28495@freescale.com>
3Date: Mon, 18 Jun 2012 16:37:05 +0800
4Subject: [PATCH] skip checking LIB32 and LIB64 if they point to the same place
5
6
7Upstream-Status: Inappropriate [oe-core specific]
8Signed-off-by: Ting Liu <b28495@freescale.com>
9---
10 Makefile | 22 +++++++++++-----------
11 1 files changed, 11 insertions(+), 11 deletions(-)
12
13diff --git a/Makefile b/Makefile
14index 1017950..bac5f01 100644
15--- a/Makefile
16+++ b/Makefile
17@@ -131,17 +131,17 @@ endif
18
19 # If TMPLIB64 is set, then sure we are not resolving LIB32 and LIB64 to the
20 # same place
21-ifdef TMPLIB64
22-
23-REALLIB32 = $(realpath $(PREFIX)/$(LIB32))
24-REALLIB64 = $(realpath $(PREFIX)/$(LIB64))
25-ifneq ($(realpath $(PREFIX)),)
26-ifeq ($(REALLIB32),$(REALLIB64))
27-$(error LIB32 ($(PREFIX)/$(LIB32) to $(REALLIB32)) and LIB64 ($(PREFIX)/$(LIB64) to $(REALLIB64)) are resolving to the same place. Manually specify LIB32 and LIB64. e.g. make PREFIX=$(PREFIX) LIB32=lib32 LIB64=lib64)
28-endif
29-endif
30-
31-endif
32+#ifdef TMPLIB64
33+#
34+#REALLIB32 = $(realpath $(PREFIX)/$(LIB32))
35+#REALLIB64 = $(realpath $(PREFIX)/$(LIB64))
36+#ifneq ($(realpath $(PREFIX)),)
37+#ifeq ($(REALLIB32),$(REALLIB64))
38+#$(error LIB32 ($(PREFIX)/$(LIB32) to $(REALLIB32)) and LIB64 ($(PREFIX)/$(LIB64) to $(REALLIB64)) are resolving to the same place. Manually specify LIB32 and LIB64. e.g. make PREFIX=$(PREFIX) LIB32=lib32 LIB64=lib64)
39+#endif
40+#endif
41+#
42+#endif
43
44 HEADERDIR = $(PREFIX)/include
45 LIBDIR32 = $(PREFIX)/$(LIB32)
46--
471.7.0.4
48
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
new file mode 100644
index 000000000..783530079
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
@@ -0,0 +1,51 @@
1DESCRIPTION = "A library which provides easy access to huge pages of memory"
2LICENSE = "LGPLv2.1"
3LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1"
4
5DEPENDS = "sysfsutils perl"
6RDEPENDS_${PN} += "python python-io python-lang python-subprocess python-resource"
7
8SRCREV = "49fedbe172343b3f7b39dc81bd2d81a18a34eb2f"
9SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
10 file://aarch64-support.patch \
11 file://aarch64-unit-test-fixes.patch \
12 file://add-PROT-NONE-to-the-mprotest-test.patch \
13 file://install64-fix.patch \
14 file://skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch \
15 file://libhugetlbfs-avoid-search-host-library-path-for-cros.patch \
16 file://fix-lib64-can-not-be-shiped-in-64bit-target.patch \
17"
18
19S = "${WORKDIR}/git"
20
21COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64).*-linux*"
22
23
24EXTRA_OEMAKE = "'ARCH=${TARGET_ARCH}' 'OPT=${CFLAGS}' 'CC=${CC}' BUILDTYPE=NATIVEONLY ${LIBARGS}"
25CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0"
26
27TARGET_CC_ARCH += "${LDFLAGS}"
28
29#The CUSTOM_LDSCRIPTS doesn't work with the gold linker
30do_configure() {
31 if [ "${@base_contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then
32 sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile
33 fi
34}
35
36do_install() {
37 oe_runmake PREFIX=${prefix} DESTDIR=${D} \
38 INST_TESTSDIR32=/opt/libhugetlbfs/tests \
39 INST_TESTSDIR64=/opt/libhugetlbfs/tests \
40 install-tests
41}
42
43PARALLEL_MAKE_pn-${PN} = ""
44
45PACKAGES =+ "${PN}-perl ${PN}-tests ${PN}-perl5"
46FILES_${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug"
47FILES_${PN}-perl = "${libdir}/perl"
48FILES_${PN}-perl5 = "${libdir}/perl5 "
49FILES_${PN}-tests += "/opt/libhugetlbfs/tests"
50
51INHIBIT_PACKAGE_DEBUG_SPLIT = "1"