summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-benchmark/libhugetlbfs
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
commit1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch)
treea21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-benchmark/libhugetlbfs
downloadmeta-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/libhugetlbfs')
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Extend-arm32-support-to-include-BE-variants.patch38
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Makefile-Recognize-all-ix86-arches.patch32
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-cross-compilation.patch34
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-install-perl-lib-to-directory-perl-instead-of-perl5.patch39
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch57
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch29
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch43
-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/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.patch23
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch17
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb67
12 files changed, 553 insertions, 0 deletions
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Extend-arm32-support-to-include-BE-variants.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Extend-arm32-support-to-include-BE-variants.patch
new file mode 100644
index 000000000..f6147cbf3
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Extend-arm32-support-to-include-BE-variants.patch
@@ -0,0 +1,38 @@
1From 5af6dec8764375ca4f13bd9fed96af090228351a Mon Sep 17 00:00:00 2001
2From: "Gary S. Robertson" <gary.robertson@linaro.org>
3Date: Mon, 11 Aug 2014 11:06:04 -0500
4Subject: [libhugetlbfs][PATCH] Extend arm32 support to include BE variants
5
6This patch applies the same technique used by Koen Kool in the following patch
7which was accepted by the libhugetlbfs project:
8
9[0a4f6] Add aarch64_be_support 2014-03-31 10:52:37
10
11It modifies the libhugetlbfs Makefile to mark all 32-bit arm architectures
12as supported by the libhugetlbfs build. Builds and successful functional
13tests have been performed for armv7a LE and BE runtime platforms.
14
15This patch replaces and renders obsolete the following patch:
16arm32-support.patch submitted by: Chunrong Guo <B40290@freescale.com>
17
18Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
19---
20 Makefile | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/Makefile b/Makefile
24index 91502e1..ba79607 100644
25--- a/Makefile
26+++ b/Makefile
27@@ -59,7 +59,7 @@ ELF32 = elf32ppclinux
28 TMPLIB32 = lib
29 CPPFLAGS += -DPPC_NO_SEGMENTS
30 else
31-ifeq ($(ARCH),armv7l)
32+ifneq (,$(findstring arm,$(ARCH)))
33 CC32 = $(CC)
34 TMPLIB32 = lib
35 ELF32 += armelf_linux_eabi
36--
371.7.9.5
38
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Makefile-Recognize-all-ix86-arches.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Makefile-Recognize-all-ix86-arches.patch
new file mode 100644
index 000000000..271827511
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Makefile-Recognize-all-ix86-arches.patch
@@ -0,0 +1,32 @@
1From a0166583ba5f7b6a6d2de434f633126fb12c9d29 Mon Sep 17 00:00:00 2001
2From: "Gary S. Robertson" <gary.robertson@linaro.org>
3Date: Wed, 24 Sep 2014 15:27:31 -0500
4Subject: [PATCH] Makefile: Recognize all ix86 arches
5
6In a non-native build scenario, the makefile
7only recognized i386 or x86_64 arches. Added support
8to recognize i486, i586, i686.
9
10Upstream Status: Accepted by libhugetlbfs project
11
12Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
13---
14 Makefile | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/Makefile b/Makefile
18index 91502e1..0bfaee8 100644
19--- a/Makefile
20+++ b/Makefile
21@@ -71,7 +71,7 @@ ELF64 = aarch64elf
22 TMPLIB64 = lib64
23 CUSTOM_LDSCRIPTS = no
24 else
25-ifeq ($(ARCH),i386)
26+ifneq (,$(filter i386 i486 i586 i686,$(ARCH)))
27 CC32 = $(CC)
28 ELF32 = elf_i386
29 TMPLIB32 = lib
30--
311.7.9.5
32
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-cross-compilation.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-cross-compilation.patch
new file mode 100644
index 000000000..215ae728d
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-cross-compilation.patch
@@ -0,0 +1,34 @@
1Subject: [PATCH] aarch64: fix cross compilation
2
3This patch allow to override CC and use it for aarch64 case like
4the other architectures.
5
6Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
7
8Upstream-Status: Submitted
9---
10 Makefile | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/Makefile b/Makefile
14index 91502e1..5aa1e12 100644
15--- a/Makefile
16+++ b/Makefile
17@@ -33,7 +33,7 @@ CFLAGS += -Wall -fPIC
18 CPPFLAGS += -D__LIBHUGETLBFS__
19
20 ARCH = $(shell uname -m | sed -e s/i.86/i386/)
21-CC = gcc
22+CC ?= gcc
23
24 CUSTOM_LDSCRIPTS = yes
25
26@@ -66,7 +66,7 @@ ELF32 += armelf_linux_eabi
27 CUSTOM_LDSCRIPTS = no
28 else
29 ifneq (,$(findstring aarch64,$(ARCH)))
30-CC64 = gcc
31+CC64 = $(CC)
32 ELF64 = aarch64elf
33 TMPLIB64 = lib64
34 CUSTOM_LDSCRIPTS = no
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-install-perl-lib-to-directory-perl-instead-of-perl5.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-install-perl-lib-to-directory-perl-instead-of-perl5.patch
new file mode 100644
index 000000000..0b8d0e4d5
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-install-perl-lib-to-directory-perl-instead-of-perl5.patch
@@ -0,0 +1,39 @@
1Upstream-Status: Inappropriate [oe-core specific]
2
3libhugetlbfs depends on perl, and perl installs a directory 'perl'
4and make a symlink 'perl5' to it. So just install perl libs in
5libhugetlbfs to directory 'perl' instead of 'perl5'. This can avoid
6the following error:
7| CalledProcessError: Command 'tar -cf - -C .../perl/5.14.3-r1/sysroot-destdir
8| -ps . | tar -xf - -C .../tmp/sysroots/t4240qds'
9| returned non-zero exit status 2 with output
10| tar: ./usr/lib/perl5: Cannot create symlink to `perl': File exists
11| tar: Exiting with failure status due to previous errors
12
13
14Signed-off-by: Ting Liu <b28495@freescale.com>
15
16--- a/Makefileold 2013-10-11 23:07:31.759421318 -0500
17+++ b/Makefile 2013-10-11 23:08:01.935571122 -0500
18@@ -173,17 +173,17 @@
19 DOCDIR = $(PREFIX)/share/doc/libhugetlbfs
20
21 ifdef CC32
22-PMDIR = $(PREFIX)/lib/perl5/TLBC
23+PMDIR = $(PREFIX)/lib/perl/TLBC
24 endif
25
26 ifdef CC64
27 ifeq ($(ARCH),x86_64)
28-PMDIR = $(PREFIX)/lib/perl5/TLBC
29+PMDIR = $(PREFIX)/lib/perl/TLBC
30 else
31 ifeq ($(ARCH),aarch64)
32-PMDIR = $(PREFIX)/lib/perl5/TLBC
33+PMDIR = $(PREFIX)/lib/perl/TLBC
34 else
35-PMDIR = $(PREFIX)/lib64/perl5/TLBC
36+PMDIR = $(PREFIX)/lib64/perl/TLBC
37 endif
38 endif
39 endif
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch
new file mode 100644
index 000000000..4e5b7bbbb
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch
@@ -0,0 +1,57 @@
1From 1ab6f7f9b34fc745451140fc21db6763dffc5785 Mon Sep 17 00:00:00 2001
2From: "Gary S. Robertson" <gary.robertson@linaro.org>
3Date: Thu, 25 Sep 2014 14:57:06 -0500
4Subject: [PATCH] ld.hugetlbfs: arm arches - fix page size and text offset
5 setup
6
7There's 3 issues fixed:
8* typo on MB variable (MB -> $MB)
9* some linker variants are missing (linux and big endian)
10 - armelfb_linux_eabi
11 - aarch64elfb
12 - aarch64linux
13 - aarch64linuxb
14* text segment offset was not specified for armv7 BE
15
16NOTE: This patch replaces and makes obsolete the following previously
17 submitted patch:
18
19 aarch64: fix page size not properly computed
20 by: Fathi Boudra <fathi.boudra@linaro.org>
21
22Upstream Status: Accepted at libhugetlbfs project
23
24Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
25---
26 ld.hugetlbfs | 8 ++++----
27 1 file changed, 4 insertions(+), 4 deletions(-)
28
29diff --git a/ld.hugetlbfs b/ld.hugetlbfs
30index df446dd..4417442 100755
31--- a/ld.hugetlbfs
32+++ b/ld.hugetlbfs
33@@ -87,7 +87,7 @@ elf32ppclinux|elf64ppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;;
34 elf64lppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;;
35 elf_i386|elf_x86_64) HPAGE_SIZE=$((4*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
36 elf_s390|elf64_s390) HPAGE_SIZE=$((1*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
37-armelf_linux_eabi|aarch64elf) HPAGE_SIZE=$((2*MB)) SLICE_SIZE=$HPAGE_SIZE ;;
38+armelf*_linux_eabi|aarch64elf*|aarch64linux*) HPAGE_SIZE=$((2*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
39 esac
40
41 if [ "$HTLB_ALIGN" == "slice" ]; then
42@@ -96,9 +96,9 @@ if [ "$HTLB_ALIGN" == "slice" ]; then
43
44 # targeting the ARM platform one needs to explicitly set the text segment offset
45 # otherwise it will be NULL.
46- if [ "$EMU" == "armelf_linux_eabi" ]; then
47- HTLBOPTS="$HTLBOPTS -Ttext-segment=$SLICE_SIZE"
48- fi
49+ case "$EMU" in
50+ armelf*_linux_eabi) HTLBOPTS="$HTLBOPTS -Ttext-segment=$SLICE_SIZE" ;;
51+ esac
52 fi
53
54 ${LD} "${args[@]}" ${HTLBOPTS}
55--
561.7.9.5
57
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch
new file mode 100644
index 000000000..9e2a5e58d
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch
@@ -0,0 +1,29 @@
1Subject: [PATCH 1/1] Replace lib/lib64 hardcoded values by LIBDIR32/LIBDIR64
2 variables
3
4Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
5
6Upstream-Status: Submitted
7---
8 Makefile | 4 ++--
9 1 file changed, 2 insertions(+), 2 deletions(-)
10
11diff --git a/Makefile b/Makefile
12index 91502e1..682c0db 100644
13--- a/Makefile
14+++ b/Makefile
15@@ -181,9 +181,9 @@ BINDIR = $(PREFIX)/share/libhugetlbfs
16 EXEDIR = $(PREFIX)/bin
17 DOCDIR = $(PREFIX)/share/doc/libhugetlbfs
18 ifdef CC32
19-PMDIR = $(PREFIX)/lib/perl5/TLBC
20+PMDIR = $(LIBDIR32)/perl5/TLBC
21 else
22-PMDIR = $(PREFIX)/lib64/perl5/TLBC
23+PMDIR = $(LIBDIR64)/perl5/TLBC
24 endif
25 MANDIR1 = $(PREFIX)/share/man/man1
26 MANDIR3 = $(PREFIX)/share/man/man3
27--
281.9.2
29
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch
new file mode 100644
index 000000000..3082d7ef5
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch
@@ -0,0 +1,43 @@
1From a85fc43243f8bfad12d306a4a0e230fb8b3e828a Mon Sep 17 00:00:00 2001
2From: Ting Liu <b28495@freescale.com>
3Date: Wed, 21 Aug 2013 15:44:57 +0800
4Subject: [PATCH] run_test.py: not use hard coded path ../obj/hugeadm
5
6Hard coded path makes the script impossible to run out of source tree.
7After 'make install', we can use hugeadm utility under DESTDIR.
8
9Upstream-Status: Submitted
10
11Signed-off-by: Ting Liu <b28495@freescale.com>
12---
13 tests/run_tests.py | 12 +++++++++++-
14 1 files changed, 11 insertions(+), 1 deletions(-)
15
16diff --git a/tests/run_tests.py b/tests/run_tests.py
17index d9a6b35..a9bab8f 100755
18--- a/tests/run_tests.py
19+++ b/tests/run_tests.py
20@@ -232,9 +232,19 @@ def get_pagesizes():
21 Use libhugetlbfs' hugeadm utility to get a list of page sizes that have
22 active mount points and at least one huge page allocated to the pool.
23 """
24+ local_env = os.environ.copy()
25+ local_env["PATH"] = "../obj:%s" % local_env.get("PATH", "")
26 sizes = set()
27 out = ""
28- (rc, out) = bash("../obj/hugeadm --page-sizes")
29+ try:
30+ p = subprocess.Popen("hugeadm --page-sizes", shell=True, env=local_env, stdout=subprocess.PIPE)
31+ rc = p.wait()
32+ except KeyboardInterrupt:
33+ return sizes
34+ except OSError:
35+ return sizes
36+ out = p.stdout.read().strip()
37+
38 if rc != 0 or out == "": return sizes
39
40 for size in out.split("\n"): sizes.add(int(size))
41--
421.7.3.4
43
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..676fa8a7a
--- /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
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/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..07a99719b
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch
@@ -0,0 +1,23 @@
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
6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Ting Liu <b28495@freescale.com>
8---
9
10diff --git a/Makefile b/Makefile
11index 91502e1..bfb3414 100644
12--- a/Makefile
13+++ b/Makefile
14@@ -167,7 +167,6 @@ REALLIB32 = $(realpath $(PREFIX)/$(LIB32))
15 REALLIB64 = $(realpath $(PREFIX)/$(LIB64))
16 ifneq ($(realpath $(PREFIX)),)
17 ifeq ($(REALLIB32),$(REALLIB64))
18-$(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)
19 endif
20 endif
21
22--
231.9.2
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch
new file mode 100644
index 000000000..249f6e1e2
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Submitted
2
3TESTS_64 is empty, install will fail due to missing file operand
4
5Signed-off-by: Ting Liu <b28495@freescale.com>
6
7--- a/tests/Makefileold 2013-10-12 02:32:55.262391998 -0500
8+++ b/tests/Makefile 2013-10-12 02:33:45.929394722 -0500
9@@ -292,7 +292,7 @@
10 $(INSTALL) -m 755 wrapper-utils.sh $(DESTDIR)$(INST_TESTSDIR64)/obj64
11 $(INSTALL) -m 755 $(HELPERS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64
12 $(INSTALL) -m 755 $(HELPER_LIBS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64
13- $(INSTALL) -m 755 $(TESTS_64:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64
14+ $(INSTALL) -m 755 $(TESTS_64_STATIC:%=obj64/%_static) $(DESTDIR)$(INST_TESTSDIR64)/obj64
15 $(INSTALL) -m 755 run_tests.py $(DESTDIR)$(INST_TESTSDIR64)
16
17 install: $(OBJDIRS:%=%/install)
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..4ce6a1901
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
@@ -0,0 +1,67 @@
1SUMMARY = "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} += "bash perl python python-io python-lang python-subprocess python-resource"
7RDEPENDS_${PN}-tests += "bash"
8
9PV = "2.18"
10PE = "1"
11
12SRCREV = "ea3f6b273f535aab38cefae30030774457bbbfe6"
13SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \
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://tests-Makefile-install-static-4G-edge-testcases.patch \
17 file://0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch \
18 file://0001-aarch64-fix-cross-compilation.patch \
19 file://0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch \
20 file://0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch \
21 file://0001-Extend-arm32-support-to-include-BE-variants.patch \
22 file://0001-Makefile-Recognize-all-ix86-arches.patch \
23"
24
25S = "${WORKDIR}/git"
26
27COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
28
29LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
30LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
31LIBHUGETLBFS_ARCH_powerpc = "ppc"
32LIBHUGETLBFS_ARCH_powerpc64 = "ppc64"
33EXTRA_OEMAKE = "'ARCH=${LIBHUGETLBFS_ARCH}' 'OPT=${CFLAGS}' 'CC=${CC}' ${LIBARGS} BUILDTYPE=NATIVEONLY V=2"
34PARALLEL_MAKE = ""
35CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0"
36
37TARGET_CC_ARCH += "${LDFLAGS}"
38
39#The CUSTOM_LDSCRIPTS doesn't work with the gold linker
40do_configure() {
41 if [ "${@base_contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then
42 sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile
43 fi
44
45 # fixup perl module directory hardcoded to perl5
46 sed -i 's/perl5/perl/g' Makefile
47}
48
49do_install() {
50 oe_runmake PREFIX=${prefix} DESTDIR=${D} \
51 INST_TESTSDIR32=${libdir}/libhugetlbfs/tests \
52 INST_TESTSDIR64=${libdir}/libhugetlbfs/tests \
53 install-tests
54}
55
56
57PACKAGES =+ "${PN}-perl ${PN}-tests "
58FILES_${PN} += "${libdir}/*.so"
59FILES_${PN}-dev = "${includedir}"
60FILES_${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug"
61FILES_${PN}-perl = "${libdir}/perl"
62FILES_${PN}-tests += "${libdir}/libhugetlbfs/tests"
63
64INSANE_SKIP_${PN} = "dev-so"
65
66INHIBIT_PACKAGE_STRIP = "1"
67INHIBIT_PACKAGE_DEBUG_SPLIT = "1"