aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-benchmark/libhugetlbfs
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-benchmark/libhugetlbfs')
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch210
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-huge_page_setup_helper-use-python3-interpreter.patch29
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch25
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch24
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-makefile-Append-CPPFLAGS-rather-then-override.patch31
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch39
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch48
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch30
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch33
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch42
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/Force-text-segment-alignment-to-0x08000000-for-i386-.patch92
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch20
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch13
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch11
-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.bb55
16 files changed, 567 insertions, 152 deletions
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch
new file mode 100644
index 0000000000..0787ef27d2
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch
@@ -0,0 +1,210 @@
+From 0a163f60b4a316c4b6f1726a71c84755f3bd85e7 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <martin.jansa@lge.com>
+Date: Wed, 16 Sep 2020 04:36:04 -0700
+Subject: [PATCH] Revert "ld.hugetlbfs: fix -Ttext-segment argument on AArch64"
+
+This reverts commit 852dcc963ce44861ed7c4e225aa92ff2b5b43579.
+
+* works around
+ ERROR: libhugetlbfs-1_2.23-r0 do_populate_sysroot: Fatal errors occurred in subprocesses:
+ Command '['arm-oe-linux-gnueabi-strip', '--remove-section=.comment', '--remove-section=.note', 'libhugetlbfs/1_2.23-r0/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/linkhuge_rw']' returned non-zero exit status 1.
+ Subprocess output:arm-oe-linux-gnueabi-strip:
+ libhugetlbfs/1_2.23-r0/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/stmuFa58: error: PHDR segment not covered by LOAD segment
+ arm-oe-linux-gnueabi-strip: libhugetlbfs/1_2.23-r0/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/stmuFa58[.interp]: file format not recognized
+
+I don't see anything suspicious in the build (the same cmdline as in 2.22
+version), but it uses
+
+libhugetlbfs/1_2.22-r0-old/temp/log.do_compile:arm-oe-linux-gnueabi-gcc
+ -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -Wl,-O1
+-Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now
+-fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
+-Werror=format-security -Werror=return-type
+--sysroot=/jenkins/mjansa/build/ros/oe-melodic-gatesgarth/libhugetlbfs/1_2.22-r0/recipe-sysroot
+-I.. -O2 -Wall -g -o obj32/linkhuge_rw.o -c linkhuge_rw.c
+libhugetlbfs/1_2.22-r0-old/temp/log.do_compile:arm-oe-linux-gnueabi-gcc
+ -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -Wl,-O1
+-Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now
+-fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
+-Werror=format-security -Werror=return-type
+--sysroot=/jenkins/mjansa/build/ros/oe-melodic-gatesgarth/libhugetlbfs/1_2.22-r0/recipe-sysroot
+-B./obj32 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now
+-ldl -L../obj32 -o obj32/linkhuge_rw -Wl,--no-as-needed -lpthread -ldl
+-lhugetlbfs_privutils -Wl,--hugetlbfs-align obj32/linkhuge_rw.o
+obj32/testutils.o
+libhugetlbfs/1_2.23-r0-new/temp/log.do_compile:arm-oe-linux-gnueabi-gcc
+ -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -Wl,-O1
+-Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now
+-fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
+-Werror=format-security -Werror=return-type
+--sysroot=/jenkins/mjansa/build/ros/oe-melodic-gatesgarth/libhugetlbfs/1_2.23-r0/recipe-sysroot
+-I.. -O2 -Wall -g -o obj32/linkhuge_rw.o -c linkhuge_rw.c
+libhugetlbfs/1_2.23-r0-new/temp/log.do_compile:arm-oe-linux-gnueabi-gcc
+ -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -Wl,-O1
+-Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now
+-fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
+-Werror=format-security -Werror=return-type
+--sysroot=/jenkins/mjansa/build/ros/oe-melodic-gatesgarth/libhugetlbfs/1_2.23-r0/recipe-sysroot
+-B./obj32 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now
+-ldl -L../obj32 -o obj32/linkhuge_rw -Wl,--no-as-needed -lpthread -ldl
+-lhugetlbfs_privutils -Wl,--hugetlbfs-align obj32/linkhuge_rw.o
+obj32/testutils.o
+
+And the git log between 2.22 and 2.23 is also very short and looks
+reasonable.
+https://github.com/libhugetlbfs/libhugetlbfs/compare/2.22...2.23
+
+When checking with readelf -l it also shows the error about PHDR segment:
+arm-oe-linux-gnueabi-readelf -l
+./1_2.22-r0-old/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/linkhuge_rw
+
+Elf file type is DYN (Shared object file)
+Entry point 0x201105
+There are 10 program headers, starting at offset 52
+
+Program Headers:
+ Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
+ PHDR 0x000034 0x00200034 0x00200034 0x00140 0x00140 R 0x4
+ INTERP 0x000174 0x00200174 0x00200174 0x0001d 0x0001d R 0x1
+ [Requesting program interpreter: /usr/lib/ld-linux-armhf.so.3]
+ LOAD 0x000000 0x00200000 0x00200000 0x1222c 0x1222c R E 0x200000
+ LOAD 0x1ffdf0 0x005ffdf0 0x005ffdf0 0x102e0 0x202ec RW 0x200000
+ DYNAMIC 0x1ffdf8 0x005ffdf8 0x005ffdf8 0x00128 0x00128 RW 0x4
+ NOTE 0x000194 0x00200194 0x00200194 0x00044 0x00044 R 0x4
+ GNU_EH_FRAME 0x012224 0x00212224 0x00212224 0x00008 0x00008 R 0x4
+ GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10
+ EXIDX 0x001c5c 0x00201c5c 0x00201c5c 0x00008 0x00008 R 0x4
+ GNU_RELRO 0x1ffdf0 0x005ffdf0 0x005ffdf0 0x00210 0x00210 RW 0x4
+
+ Section to Segment mapping:
+ Segment Sections...
+ 00
+ 01 .interp
+ 02 .interp .note.ABI-tag .note.gnu.build-id .dynsym .dynstr
+.gnu.hash .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text
+.fini .ARM.extab .ARM.exidx .rodata .eh_frame .eh_frame_hdr
+ 03 .fini_array .init_array .dynamic .got .data .bss
+ 04 .dynamic
+ 05 .note.ABI-tag .note.gnu.build-id
+ 06 .eh_frame_hdr
+ 07
+ 08 .ARM.extab .ARM.exidx
+ 09 .fini_array .init_array .dynamic .got
+
+arm-oe-linux-gnueabi-readelf -l
+./1_2.23-r0-new/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/linkhuge_rw
+
+Elf file type is DYN (Shared object file)
+Entry point 0x31cd1
+There are 10 program headers, starting at offset 52
+
+Program Headers:
+ Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
+ PHDR 0x000000 0x00000000 0x00000000 0x00000 0x00000 R 0
+readelf: Error: the PHDR segment is not covered by a LOAD segment
+ INTERP 0x030d40 0x00030d40 0x00030d40 0x0001d 0x0001d R 0x1
+ [Requesting program interpreter: /usr/lib/ld-linux-armhf.so.3]
+ LOAD 0x030d40 0x00030d40 0x00030d40 0x120b8 0x120b8 R E 0x200000
+ LOAD 0x1ffdf0 0x003ffdf0 0x003ffdf0 0x102e0 0x202ec RW 0x200000
+ DYNAMIC 0x1ffdf8 0x003ffdf8 0x003ffdf8 0x00128 0x00128 RW 0x4
+ NOTE 0x030d60 0x00030d60 0x00030d60 0x00044 0x00044 R 0x4
+ GNU_EH_FRAME 0x042df0 0x00042df0 0x00042df0 0x00008 0x00008 R 0x4
+ GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10
+ EXIDX 0x032828 0x00032828 0x00032828 0x00008 0x00008 R 0x4
+ GNU_RELRO 0x1ffdf0 0x003ffdf0 0x003ffdf0 0x00210 0x00210 RW 0x4
+
+ Section to Segment mapping:
+ Segment Sections...
+ 00
+ 01 .interp
+ 02 .interp .note.ABI-tag .note.gnu.build-id .dynsym .dynstr
+.gnu.hash .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text
+.fini .ARM.extab .ARM.exidx .rodata .eh_frame .eh_frame_hdr
+ 03 .fini_array .init_array .dynamic .got .data .bss
+ 04 .dynamic
+ 05 .note.ABI-tag .note.gnu.build-id
+ 06 .eh_frame_hdr
+ 07
+ 08 .ARM.extab .ARM.exidx
+ 09 .fini_array .init_array .dynamic .got
+
+And the diff between these 2:
+
+1_2.22-r0-old/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/linkhuge_rw.readelf
+1_2.23-r0-new/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/linkhuge_rw.readelf
+ Elf file type is DYN (Shared object file)
+-Entry point 0x201105
++Entry point 0x31cd1
+ There are 10 program headers, starting at offset 52
+
+ Program Headers:
+ Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
+- PHDR 0x000034 0x00200034 0x00200034 0x00140 0x00140 R 0x4
+- INTERP 0x000174 0x00200174 0x00200174 0x0001d 0x0001d R 0x1
++ PHDR 0x000000 0x00000000 0x00000000 0x00000 0x00000 R 0
++readelf: Error: the PHDR segment is not covered by a LOAD segment
++ INTERP 0x030d40 0x00030d40 0x00030d40 0x0001d 0x0001d R 0x1
+ [Requesting program interpreter: /usr/lib/ld-linux-armhf.so.3]
+- LOAD 0x000000 0x00200000 0x00200000 0x1222c 0x1222c R E 0x200000
+- LOAD 0x1ffdf0 0x005ffdf0 0x005ffdf0 0x102e0 0x202ec RW 0x200000
+- DYNAMIC 0x1ffdf8 0x005ffdf8 0x005ffdf8 0x00128 0x00128 RW 0x4
+- NOTE 0x000194 0x00200194 0x00200194 0x00044 0x00044 R 0x4
+- GNU_EH_FRAME 0x012224 0x00212224 0x00212224 0x00008 0x00008 R 0x4
++ LOAD 0x030d40 0x00030d40 0x00030d40 0x120b8 0x120b8 R E 0x200000
++ LOAD 0x1ffdf0 0x003ffdf0 0x003ffdf0 0x102e0 0x202ec RW 0x200000
++ DYNAMIC 0x1ffdf8 0x003ffdf8 0x003ffdf8 0x00128 0x00128 RW 0x4
++ NOTE 0x030d60 0x00030d60 0x00030d60 0x00044 0x00044 R 0x4
++ GNU_EH_FRAME 0x042df0 0x00042df0 0x00042df0 0x00008 0x00008 R 0x4
+ GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10
+- EXIDX 0x001c5c 0x00201c5c 0x00201c5c 0x00008 0x00008 R 0x4
+- GNU_RELRO 0x1ffdf0 0x005ffdf0 0x005ffdf0 0x00210 0x00210 RW 0x4
++ EXIDX 0x032828 0x00032828 0x00032828 0x00008 0x00008 R 0x4
++ GNU_RELRO 0x1ffdf0 0x003ffdf0 0x003ffdf0 0x00210 0x00210 RW 0x4
+
+ Section to Segment mapping:
+
+Revert fixes this build issue, but I still don't see why it fails this way.
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+# Please enter the commit message for your changes. Lines starting
+# with '#' will be ignored, and an empty message aborts the commit.
+#
+# Date: Wed Sep 16 13:43:09 2020 +0200
+#
+# On branch jansa/master
+# Changes to be committed:
+# new file: meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch
+# modified: meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
+#
+# Untracked files:
+# counts.txt
+# diff
+# log.svn
+# log.svn2
+# wip/
+#
+---
+ ld.hugetlbfs | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/ld.hugetlbfs b/ld.hugetlbfs
+index 5e4e497..6ee8238 100755
+--- a/ld.hugetlbfs
++++ b/ld.hugetlbfs
+@@ -130,9 +130,7 @@ if [ "$HTLB_ALIGN" == "slice" ]; then
+ # targeting the ARM platform one needs to explicitly set the text segment offset
+ # otherwise it will be NULL.
+ case "$EMU" in
+- armelf*_linux_eabi|aarch64elf*|aarch64linux*)
+- printf -v TEXTADDR "%x" "$SLICE_SIZE"
+- HTLBOPTS="$HTLBOPTS -Ttext-segment=$TEXTADDR" ;;
++ armelf*_linux_eabi|aarch64elf*|aarch64linux*) HTLBOPTS="$HTLBOPTS -Ttext-segment=$SLICE_SIZE" ;;
+ elf_i386) HTLBOPTS="$HTLBOPTS -Ttext-segment=0x08000000" ;;
+ elf64ppc|elf64lppc)
+ if [ "$MMU_TYPE" == "Hash" ] ; then
+--
+2.17.1
+
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-huge_page_setup_helper-use-python3-interpreter.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-huge_page_setup_helper-use-python3-interpreter.patch
new file mode 100644
index 0000000000..e45f283b38
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-huge_page_setup_helper-use-python3-interpreter.patch
@@ -0,0 +1,29 @@
+From b77c61de4d88d2c6e5d31f4f5a5877cc4c61272e Mon Sep 17 00:00:00 2001
+From: Andrey Zhizhikin <andrey.z@gmail.com>
+Date: Mon, 27 Jan 2020 17:27:55 +0000
+Subject: [PATCH] huge_page_setup_helper: use python3 interpreter
+
+Setup helper script is already prepared to be used with python3, use the
+interpreter explicitly. This removes dependency to python2 and will not
+fail the QA check.
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
+---
+ huge_page_setup_helper.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/huge_page_setup_helper.py b/huge_page_setup_helper.py
+index a9ba2bf..7ba0c92 100755
+--- a/huge_page_setup_helper.py
++++ b/huge_page_setup_helper.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+
+ #
+ # Tool to set up Linux large page support with minimal effort
+--
+2.17.1
+
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch
new file mode 100644
index 0000000000..914b0514f8
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch
@@ -0,0 +1,25 @@
+From 351d1de09dd80049b7a2cb02c5750635d0389873 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 21 Jun 2018 19:25:57 -0700
+Subject: [PATCH] include stddef.h for ptrdiff_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+Upstream-Status: Pending
+
+ morecore.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/morecore.c b/morecore.c
+index 6563bbd..0eef782 100644
+--- a/morecore.c
++++ b/morecore.c
+@@ -19,6 +19,7 @@
+
+ #define _GNU_SOURCE
+
++#include <stddef.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <malloc.h>
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
index 3082d7ef5f..83934abef8 100644
--- 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
@@ -1,4 +1,4 @@
-From a85fc43243f8bfad12d306a4a0e230fb8b3e828a Mon Sep 17 00:00:00 2001
+From 0077532b07e268347cb8557be6d70148d5f0e840 Mon Sep 17 00:00:00 2001
From: Ting Liu <b28495@freescale.com>
Date: Wed, 21 Aug 2013 15:44:57 +0800
Subject: [PATCH] run_test.py: not use hard coded path ../obj/hugeadm
@@ -9,15 +9,21 @@ After 'make install', we can use hugeadm utility under DESTDIR.
Upstream-Status: Submitted
Signed-off-by: Ting Liu <b28495@freescale.com>
+
+Update for 2.22.
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+
+Update to work for python3
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
- tests/run_tests.py | 12 +++++++++++-
- 1 files changed, 11 insertions(+), 1 deletions(-)
+ tests/run_tests.py | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tests/run_tests.py b/tests/run_tests.py
-index d9a6b35..a9bab8f 100755
+index 018264d..0aabcd1 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
-@@ -232,9 +232,19 @@ def get_pagesizes():
+@@ -245,9 +245,19 @@ def get_pagesizes():
Use libhugetlbfs' hugeadm utility to get a list of page sizes that have
active mount points and at least one huge page allocated to the pool.
"""
@@ -33,11 +39,11 @@ index d9a6b35..a9bab8f 100755
+ return sizes
+ except OSError:
+ return sizes
-+ out = p.stdout.read().strip()
++ out = p.stdout.read().decode().strip()
+
- if rc != 0 or out == "": return sizes
+ if rc != 0 or out == "":
+ return sizes
- for size in out.split("\n"): sizes.add(int(size))
--
-1.7.3.4
+2.7.4
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-makefile-Append-CPPFLAGS-rather-then-override.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-makefile-Append-CPPFLAGS-rather-then-override.patch
new file mode 100644
index 0000000000..78a4cb0fc2
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-makefile-Append-CPPFLAGS-rather-then-override.patch
@@ -0,0 +1,31 @@
+From b6dba773491bbb7b4664dacdd87a12af860f1bd8 Mon Sep 17 00:00:00 2001
+From: Oleksiy Obitotskyy <oobitots@cisco.com>
+Date: Thu, 28 Jan 2021 05:43:33 -0800
+Subject: [PATCH] tests/makefile: Append CPPFLAGS rather then override
+
+CPPFLAGS overrided and we could miss some options needed.
+
+Upstream-Status: Submitted
+Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
+---
+ tests/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/Makefile b/tests/Makefile
+index 0ca3716..d262932 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -33,8 +33,8 @@ HELPERS = get_hugetlbfs_path compare_kvers
+ HELPER_LIBS = libheapshrink.so
+ BADTOOLCHAIN = bad-toolchain.sh
+
+-CFLAGS = -O2 -Wall -g
+-CPPFLAGS = -I..
++CFLAGS += -O2 -Wall -g
++CPPFLAGS += -I..
+ STATIC_LIBHUGE = -Wl,--whole-archive -lhugetlbfs -Wl,--no-whole-archive
+ STATIC_LDLIBS = -Wl,--no-as-needed -lpthread
+ LDLIBS = $(STATIC_LDLIBS) -ldl -lhugetlbfs_privutils
+--
+2.26.2.Cisco
+
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch
new file mode 100644
index 0000000000..7ad6c43eb1
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch
@@ -0,0 +1,39 @@
+From 0f548286848c70aa325c6748d80e8651389b4938 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 21 Jun 2018 19:32:59 -0700
+Subject: [PATCH] Mark glibc specific code so
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+Upstream-Status: Pending
+
+ morecore.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/morecore.c b/morecore.c
+index 0eef782..d48509c 100644
+--- a/morecore.c
++++ b/morecore.c
+@@ -364,6 +364,7 @@ void hugetlbfs_setup_morecore(void)
+
+ INFO("setup_morecore(): heapaddr = 0x%lx\n", heapaddr);
+
++#ifdef __GLIBC__
+ heaptop = heapbase = (void *)heapaddr;
+ if (__hugetlb_opts.thp_morecore)
+ __morecore = &thp_morecore;
+@@ -371,7 +372,6 @@ void hugetlbfs_setup_morecore(void)
+ __morecore = &hugetlbfs_morecore;
+
+ /* Set some allocator options more appropriate for hugepages */
+-
+ if (__hugetlb_opts.shrink_ok)
+ mallopt(M_TRIM_THRESHOLD, hpage_size + hpage_size / 2);
+ else
+@@ -381,4 +381,5 @@ void hugetlbfs_setup_morecore(void)
+ * This doesn't appear to prohibit malloc() from falling back
+ * to mmap() if we run out of hugepages. */
+ mallopt(M_MMAP_MAX, 0);
++#endif
+ }
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch
new file mode 100644
index 0000000000..858a8e511a
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch
@@ -0,0 +1,48 @@
+From 9ff04d7acc700387e3837f8ab11a41efea5ee8b0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 21 Jun 2018 19:44:26 -0700
+Subject: [PATCH] alloc.c: Avoid sysconf(_SC_LEVEL2_CACHE_LINESIZE) on linux
+
+musl does not have it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+Upstream-Status: Pending
+
+ alloc.c | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/alloc.c b/alloc.c
+index bce9464..cf7eb40 100644
+--- a/alloc.c
++++ b/alloc.c
+@@ -245,6 +245,19 @@ void free_huge_pages(void *ptr)
+ __free_huge_pages(ptr, 1);
+ }
+
++static size_t get_cacheline_size() {
++#if defined(__linux__)
++ FILE * fp = fopen("/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size", "r");
++ unsigned int line_size = 0;
++ if (fp) {
++ fscanf(fp, "%d", &line_size);
++ fclose(fp);
++ }
++ return line_size;
++#else
++ return sysconf(_SC_LEVEL2_CACHE_LINESIZE);
++#endif
++}
+ /*
+ * Offset the buffer using bytes wasted due to alignment to avoid using the
+ * same cache lines for the start of every buffer returned by
+@@ -261,7 +274,7 @@ void *cachecolor(void *buf, size_t len, size_t color_bytes)
+
+ /* Lookup our cacheline size once */
+ if (cacheline_size == 0) {
+- cacheline_size = sysconf(_SC_LEVEL2_CACHE_LINESIZE);
++ cacheline_size = get_cacheline_size();
+ linemod = time(NULL);
+ }
+
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch
new file mode 100644
index 0000000000..c3f7b3e479
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch
@@ -0,0 +1,30 @@
+From 9ce323432a7f4d99f617970c7e35b607b9bbf843 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 21 Jun 2018 19:48:04 -0700
+Subject: [PATCH] shm.c: Mark glibc specific changes so
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+Upstream-Status: Pending
+
+ shm.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/shm.c b/shm.c
+index 1f82cab..9447b63 100644
+--- a/shm.c
++++ b/shm.c
+@@ -48,10 +48,11 @@
+ * system shmget() may be performed without worry as there is no dynamic
+ * call chain.
+ */
++#ifdef __GLIBC__
+ extern void *dlsym (void *__restrict __handle, __const char *__restrict __name)
+ __attribute__((weak)) __THROW __nonnull ((2));
+ extern char *dlerror (void) __attribute__((weak)) __THROW;
+-
++#endif
+
+ /* call syscall shmget through the generic syscall mechanism */
+ static int syscall_shmget(key_t key, size_t size, int shmflg)
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch
new file mode 100644
index 0000000000..8bd1633392
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch
@@ -0,0 +1,33 @@
+From bb8c370aaaf25b1fe1fbf984e73177018026cb91 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 21 Jun 2018 19:51:02 -0700
+Subject: [PATCH] Include dirent.h for ino_t
+
+Fixes
+error: unknown type name 'ino_t'; did you mean 'int'?
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Update for 2.22.
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+Upstream-Status: Pending
+
+ tests/hugetests.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/hugetests.h b/tests/hugetests.h
+index bc4e16a..fbe4dc0 100644
+--- a/tests/hugetests.h
++++ b/tests/hugetests.h
+@@ -22,6 +22,7 @@
+
+ #include <errno.h>
+ #include <string.h>
++#include <dirent.h>
+ #include <unistd.h>
+
+ #include "libhugetlbfs_privutils.h"
+--
+2.7.4
+
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch
new file mode 100644
index 0000000000..e4f8030961
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch
@@ -0,0 +1,42 @@
+From 5f64aa8c47c2d3a155a97e262f89cc47394a69eb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 21 Jun 2018 19:58:53 -0700
+Subject: [PATCH] include limits.h for PATH_MAX
+
+Fixes
+
+error: 'PATH_MAX' undeclared
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+Upstream-Status: Pending
+
+ hugeadm.c | 1 +
+ tests/gethugepagesizes.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/hugeadm.c b/hugeadm.c
+index fe4211d..8db274c 100644
+--- a/hugeadm.c
++++ b/hugeadm.c
+@@ -33,6 +33,7 @@
+ #include <grp.h>
+ #include <pwd.h>
+ #include <fcntl.h>
++#include <limits.h>
+
+ #include <sys/stat.h>
+ #include <sys/types.h>
+diff --git a/tests/gethugepagesizes.c b/tests/gethugepagesizes.c
+index 9551b38..2645e3f 100644
+--- a/tests/gethugepagesizes.c
++++ b/tests/gethugepagesizes.c
+@@ -29,6 +29,7 @@
+ #include <fcntl.h>
+ #include <stdarg.h>
+ #include <hugetlbfs.h>
++#include <limits.h>
+
+ #include "hugetests.h"
+
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/Force-text-segment-alignment-to-0x08000000-for-i386-.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/Force-text-segment-alignment-to-0x08000000-for-i386-.patch
deleted file mode 100644
index ce6974d7c1..0000000000
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/Force-text-segment-alignment-to-0x08000000-for-i386-.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 3c6f8d0e3c0694f79244ec6ad5ad9ba3ca26bc0a Mon Sep 17 00:00:00 2001
-From: Yang Shi <yang.shi@linaro.org>
-Date: Mon, 7 Dec 2015 14:12:13 -0800
-Subject: [PATCH] Force text segment alignment to 0x08000000 for i386 with gold
- linker
-
-Upstream-Status: Backport
-
-When build libhugetlbfs tests with gold linker for i386, the below error occurs:
-
-i586-oe-linux-gcc -m32 -march=i586 -Wl,-O1 -Wl,--hash-style=gnu
--Wl,--as-needed
---sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86 -I..
--O2
--Wall -g -o obj32/linkhuge_rw.o -c linkhuge_rw.c
-| i586-oe-linux-gcc -m32 -march=i586 -Wl,-O1 -Wl,--hash-style=gnu
--Wl,--as-needed
---sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86
--B./obj32
--Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,noexecstack -ldl
--L../obj32
--o obj32/linkhuge_rw -Wl,--no-as-needed -lpthread -ldl -lhugetlbfs_privutils
--Wl,--hugetlbfs-align obj32/linkhuge_rw.o obj32/testutils.o
-| i586-oe-linux-ld: internal error in do_write, at
-/home/jenkins/oe/world/shr-core/tmp-glibc/work/x86_64-oe-linux/binutils-cross-i586/2.25-r0/git/gold/output.cc:464
-| collect2: error: ld returned 1 exit status
-
-But, it works well with GNU linker. --hugetlbfs-align flag passes
-"-zcommon-page-size=$SLICE_SIZE -zmax-page-size=$SLICE_SIZE", that are supported by gold linker too.
-But, it looks gold linker deal with them in a different way from gnu linker for i586.
-
-The readelf shows the below result with GNU linker:
-
-Elf file type is EXEC (Executable file)
-Entry point 0x8048fbd
-There are 8 program headers, starting at offset 52
-
-Program Headers:
- Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
- PHDR 0x000034 0x08000034 0x08000034 0x00100 0x00100 R E 0x4
- INTERP 0x048134 0x08048134 0x08048134 0x00013 0x00013 R 0x1
- [Requesting program interpreter: /lib/ld-linux.so.2]
- LOAD 0x000000 0x08000000 0x08000000 0x5a5bc 0x5a5bc R E 0x400000
- LOAD 0x05a5bc 0x0845a5bc 0x0845a5bc 0x1028c 0x202cc RW 0x400000
- DYNAMIC 0x05a5d0 0x0845a5d0 0x0845a5d0 0x000e8 0x000e8 RW 0x4
- NOTE 0x048148 0x08048148 0x08048148 0x00044 0x00044 R 0x4
- GNU_EH_FRAME 0x059e5c 0x08059e5c 0x08059e5c 0x0009c 0x0009c R 0x4
- GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10
-
-"--relax" linker option doesn't solve this problem.
-Forced textsegment alignment to 0x08000000 with gold linker, the build will pass and
-readelf shows the same result with GNU linker:
-
-Elf file type is EXEC (Executable file)
-Entry point 0x8048fbd
-There are 8 program headers, starting at offset 52
-
-Program Headers:
- Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
- PHDR 0x000034 0x08000034 0x08000034 0x00100 0x00100 R E 0x4
- INTERP 0x048134 0x08048134 0x08048134 0x00013 0x00013 R 0x1
- [Requesting program interpreter: /lib/ld-linux.so.2]
- LOAD 0x000000 0x08000000 0x08000000 0x5a5bc 0x5a5bc R E 0x400000
- LOAD 0x05a5bc 0x0845a5bc 0x0845a5bc 0x1028c 0x202cc RW 0x400000
- DYNAMIC 0x05a5d0 0x0845a5d0 0x0845a5d0 0x000e8 0x000e8 RW 0x4
- NOTE 0x048148 0x08048148 0x08048148 0x00044 0x00044 R 0x4
- GNU_EH_FRAME 0x059e5c 0x08059e5c 0x08059e5c 0x0009c 0x0009c R 0x4
- GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10
-
-The fix just have impact on hugelink_rw test case, which needs --hugetlbfs-align flag.
-
-Signed-off-by: Yang Shi <yang.shi@linaro.org>
-Signed-off-by: Eric B Munson <emunson@mgebm.net>
----
- ld.hugetlbfs | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/ld.hugetlbfs b/ld.hugetlbfs
-index 4417442..32bc6fb 100755
---- a/ld.hugetlbfs
-+++ b/ld.hugetlbfs
-@@ -98,6 +98,7 @@ if [ "$HTLB_ALIGN" == "slice" ]; then
- # otherwise it will be NULL.
- case "$EMU" in
- armelf*_linux_eabi) HTLBOPTS="$HTLBOPTS -Ttext-segment=$SLICE_SIZE" ;;
-+ elf_i386) HTLBOPTS="$HTLBOPTS -Ttext-segment=0x08000000" ;;
- esac
- fi
-
---
-2.0.2
-
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
index b3fd843128..f95e9e85a4 100644
--- 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
@@ -1,19 +1,20 @@
-From 0a2877400a086e9d6ddd32a80462b7a931921dc2 Mon Sep 17 00:00:00 2001
+From 82a4f60ab24dff121f5f9d3bbcd9a8a28bb7caef Mon Sep 17 00:00:00 2001
From: Chunrong Guo <B40290@freescale.com>
Date: Sun, 8 Sep 2013 23:21:49 -0500
-Subject: [PATCH] libhugetlbfs: avoid search host library path for cross
+Subject: [PATCH] libhugetlbfs: avoid search host library path for cross
compilation
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Chunrong Guo <B40290@freescale.com>
+
---
- ldscripts/elf32ppclinux.xB | 2 +-
- ldscripts/elf32ppclinux.xBDT | 2 +-
- ldscripts/elf64ppc.xB | 2 +-
- ldscripts/elf64ppc.xBDT | 2 +-
- ldscripts/elf_x86_64.xB | 2 +-
- ldscripts/elf_x86_64.xBDT | 2 +-
+ ldscripts/elf32ppclinux.xB | 2 +-
+ ldscripts/elf32ppclinux.xBDT | 2 +-
+ ldscripts/elf64ppc.xB | 2 +-
+ ldscripts/elf64ppc.xBDT | 2 +-
+ ldscripts/elf_x86_64.xB | 2 +-
+ ldscripts/elf_x86_64.xBDT | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ldscripts/elf32ppclinux.xB b/ldscripts/elf32ppclinux.xB
@@ -94,6 +95,3 @@ index 1855202..c62d245 100644
INPUT(-lhugetlbfs);
/* Do we need any of these for elf?
__DYNAMIC = 0; */
---
-1.7.9.7
-
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch
index 15664884bf..7cc180a4b7 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch
@@ -1,14 +1,16 @@
-From 889e52753d30179ba4ac940023cb4ed561436ab8 Mon Sep 17 00:00:00 2001
+From b5887693d90c430291b644c2f5713b5fdd1777ce Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Tue, 4 Nov 2014 00:49:11 -0800
-Subject: [PATCH] libhugetlbfs/elf_i386: avoid search host library path for cross compilation
+Subject: [PATCH] libhugetlbfs/elf_i386: avoid search host library path for
+ cross compilation
Upstream-Status: Inappropriate [cross compile specific]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
---
- ldscripts/elf_i386.xB | 1 -
- ldscripts/elf_i386.xBDT | 1 -
+ ldscripts/elf_i386.xB | 1 -
+ ldscripts/elf_i386.xBDT | 1 -
2 files changed, 2 deletions(-)
diff --git a/ldscripts/elf_i386.xB b/ldscripts/elf_i386.xB
@@ -35,6 +37,3 @@ index d72aebe..3bac1b1 100644
INPUT(-lhugetlbfs);
/* Do we need any of these for elf?
__DYNAMIC = 0; */
---
-1.7.9.5
-
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
index 07a99719b0..a13c5389fb 100644
--- 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
@@ -1,17 +1,20 @@
-From 355c014573de7f95202cc7c819f81f0f230e4a1a Mon Sep 17 00:00:00 2001
+From 183a4dafe141197de5840f2e48c266ef209307aa Mon Sep 17 00:00:00 2001
From: Ting Liu <b28495@freescale.com>
Date: Mon, 18 Jun 2012 16:37:05 +0800
Subject: [PATCH] skip checking LIB32 and LIB64 if they point to the same place
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Ting Liu <b28495@freescale.com>
+
---
+ Makefile | 1 -
+ 1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
-index 91502e1..bfb3414 100644
+index 51e41f0..373df3c 100644
--- a/Makefile
+++ b/Makefile
-@@ -167,7 +167,6 @@ REALLIB32 = $(realpath $(PREFIX)/$(LIB32))
+@@ -177,7 +177,6 @@ REALLIB32 = $(realpath $(PREFIX)/$(LIB32))
REALLIB64 = $(realpath $(PREFIX)/$(LIB64))
ifneq ($(realpath $(PREFIX)),)
ifeq ($(REALLIB32),$(REALLIB64))
@@ -19,5 +22,3 @@ index 91502e1..bfb3414 100644
endif
endif
---
-1.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
index 249f6e1e23..b8b2f8e6fb 100644
--- 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
@@ -1,12 +1,23 @@
+From f1ad8ff887f16daee8d06eca3df0f2541bfdaac0 Mon Sep 17 00:00:00 2001
+From: Ting Liu <b28495@freescale.com>
+Date: Mon, 23 Sep 2013 08:00:55 +0000
+Subject: [PATCH] libhugetlbfs: add recipe
+
Upstream-Status: Submitted
TESTS_64 is empty, install will fail due to missing file operand
Signed-off-by: Ting Liu <b28495@freescale.com>
---- a/tests/Makefileold 2013-10-12 02:32:55.262391998 -0500
-+++ b/tests/Makefile 2013-10-12 02:33:45.929394722 -0500
-@@ -292,7 +292,7 @@
+---
+ tests/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/Makefile b/tests/Makefile
+index 073df96..0ca3716 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -295,7 +295,7 @@ obj64/install:
$(INSTALL) -m 755 wrapper-utils.sh $(DESTDIR)$(INST_TESTSDIR64)/obj64
$(INSTALL) -m 755 $(HELPERS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64
$(INSTALL) -m 755 $(HELPER_LIBS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
index a63494a62d..80af9873b1 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
@@ -1,34 +1,45 @@
SUMMARY = "A library which provides easy access to huge pages of memory"
HOMEPAGE = "https://github.com/libhugetlbfs/libhugetlbfs"
-LICENSE = "LGPLv2.1"
+LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1"
-DEPENDS = "sysfsutils perl"
-RDEPENDS_${PN} += "bash perl python python-io python-lang python-subprocess python-resource ${PN}-perl"
-RDEPENDS_${PN}-tests += "bash"
+DEPENDS = "sysfsutils"
+RDEPENDS:${PN} += "bash python3-core"
+RDEPENDS:${PN}-tests += "bash python3-core"
-PV = "2.20"
+PV = "2.23"
PE = "1"
-SRCREV = "e44180072b796c0e28e53c4d01ef6279caaa2a99"
+SRCREV = "6b126a4d7da9490fa40fe7e1b962edcb939feddc"
SRC_URI = " \
- git://github.com/libhugetlbfs/libhugetlbfs.git;protocol=https \
+ git://github.com/libhugetlbfs/libhugetlbfs.git;protocol=https;branch=master \
file://skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch \
file://libhugetlbfs-avoid-search-host-library-path-for-cros.patch \
file://tests-Makefile-install-static-4G-edge-testcases.patch \
file://0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch \
file://libhugetlbfs-elf_i386-avoid-search-host-library-path.patch \
- file://Force-text-segment-alignment-to-0x08000000-for-i386-.patch \
+ file://0001-include-stddef.h-for-ptrdiff_t.patch \
+ file://0002-Mark-glibc-specific-code-so.patch \
+ file://0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch \
+ file://0004-shm.c-Mark-glibc-specific-changes-so.patch \
+ file://0005-Include-dirent.h-for-ino_t.patch \
+ file://0006-include-limits.h-for-PATH_MAX.patch \
+ file://0001-huge_page_setup_helper-use-python3-interpreter.patch \
+ file://0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch \
+ file://0001-tests-makefile-Append-CPPFLAGS-rather-then-override.patch \
"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
+
S = "${WORKDIR}/git"
COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
-LIBHUGETLBFS_ARCH_powerpc = "ppc"
-LIBHUGETLBFS_ARCH_powerpc64 = "ppc64"
+LIBHUGETLBFS_ARCH:powerpc = "ppc"
+LIBHUGETLBFS_ARCH:powerpc64 = "ppc64"
+LIBHUGETLBFS_ARCH:powerpc64le = "ppc64le"
EXTRA_OEMAKE = "'ARCH=${LIBHUGETLBFS_ARCH}' 'OPT=${CFLAGS}' 'CC=${CC}' ${LIBARGS} BUILDTYPE=NATIVEONLY V=2"
PARALLEL_MAKE = ""
CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0"
@@ -43,14 +54,6 @@ do_configure() {
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile
fi
-
- # fixup perl module directory hardcoded to perl5
- sed -i 's/perl5/perl/g' Makefile
-
- # fixup to install perl module under $(LIBDIR)/perl/${@get_perl_version(d)}/TLBC
- # to avoid below error
- # Can't locate TLBC/OpCollect.pm in @INC
- sed -i '/^PMDIR/ s:perl:perl/${@get_perl_version(d)}:g' Makefile
}
do_install() {
@@ -61,14 +64,16 @@ do_install() {
}
-PACKAGES =+ "${PN}-perl ${PN}-tests "
-FILES_${PN} += "${libdir}/*.so"
-FILES_${PN}-dev = "${includedir}"
-FILES_${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug"
-FILES_${PN}-perl = "${libdir}/perl"
-FILES_${PN}-tests += "${libdir}/libhugetlbfs/tests"
+PACKAGES =+ "${PN}-tests "
+FILES:${PN} += "${libdir}/*.so"
+FILES:${PN}-dev = "${includedir}"
+FILES:${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug"
+FILES:${PN}-tests += "${libdir}/libhugetlbfs/tests"
-INSANE_SKIP_${PN} = "dev-so"
+INSANE_SKIP:${PN} = "dev-so"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+
+# see https://github.com/libhugetlbfs/libhugetlbfs/issues/52
+SKIP_RECIPE[libhugetlbfs] ?= "Needs porting to glibc 2.34+"