summaryrefslogtreecommitdiffstats
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-skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch (renamed from meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch)19
-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-libhugetlbfs-avoid-search-host-library-path-for-cros.patch (renamed from meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch)6
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0003-tests-Makefile-install-static-4G-edge-testcases.patch (renamed from meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch)22
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0004-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch (renamed from meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch)8
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0005-libhugetlbfs-elf_i386-avoid-search-host-library-path.patch (renamed from meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch)6
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-stddef.h-for-ptrdiff_t.patch (renamed from meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch)12
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0007-Mark-glibc-specific-code-so.patch (renamed from meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch)19
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0008-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch (renamed from meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch)12
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0009-shm.c-Mark-glibc-specific-changes-so.patch (renamed from meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch)10
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0010-Include-dirent.h-for-ino_t.patch (renamed from meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch)8
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0011-include-limits.h-for-PATH_MAX.patch (renamed from meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch)14
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0012-huge_page_setup_helper-use-python3-interpreter.patch (renamed from meta-oe/recipes-benchmark/libhugetlbfs/files/0001-huge_page_setup_helper-use-python3-interpreter.patch)6
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0013-elflink.c-include-libgen.h-for-basename.patch41
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb79
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb79
17 files changed, 201 insertions, 381 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
deleted file mode 100644
index 0787ef27d2..0000000000
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch
+++ /dev/null
@@ -1,210 +0,0 @@
1From 0a163f60b4a316c4b6f1726a71c84755f3bd85e7 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <martin.jansa@lge.com>
3Date: Wed, 16 Sep 2020 04:36:04 -0700
4Subject: [PATCH] Revert "ld.hugetlbfs: fix -Ttext-segment argument on AArch64"
5
6This reverts commit 852dcc963ce44861ed7c4e225aa92ff2b5b43579.
7
8* works around
9 ERROR: libhugetlbfs-1_2.23-r0 do_populate_sysroot: Fatal errors occurred in subprocesses:
10 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.
11 Subprocess output:arm-oe-linux-gnueabi-strip:
12 libhugetlbfs/1_2.23-r0/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/stmuFa58: error: PHDR segment not covered by LOAD segment
13 arm-oe-linux-gnueabi-strip: libhugetlbfs/1_2.23-r0/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/stmuFa58[.interp]: file format not recognized
14
15I don't see anything suspicious in the build (the same cmdline as in 2.22
16version), but it uses
17
18libhugetlbfs/1_2.22-r0-old/temp/log.do_compile:arm-oe-linux-gnueabi-gcc
19 -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -Wl,-O1
20-Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now
21-fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
22-Werror=format-security -Werror=return-type
23--sysroot=/jenkins/mjansa/build/ros/oe-melodic-gatesgarth/libhugetlbfs/1_2.22-r0/recipe-sysroot
24-I.. -O2 -Wall -g -o obj32/linkhuge_rw.o -c linkhuge_rw.c
25libhugetlbfs/1_2.22-r0-old/temp/log.do_compile:arm-oe-linux-gnueabi-gcc
26 -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -Wl,-O1
27-Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now
28-fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
29-Werror=format-security -Werror=return-type
30--sysroot=/jenkins/mjansa/build/ros/oe-melodic-gatesgarth/libhugetlbfs/1_2.22-r0/recipe-sysroot
31-B./obj32 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now
32-ldl -L../obj32 -o obj32/linkhuge_rw -Wl,--no-as-needed -lpthread -ldl
33-lhugetlbfs_privutils -Wl,--hugetlbfs-align obj32/linkhuge_rw.o
34obj32/testutils.o
35libhugetlbfs/1_2.23-r0-new/temp/log.do_compile:arm-oe-linux-gnueabi-gcc
36 -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -Wl,-O1
37-Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now
38-fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
39-Werror=format-security -Werror=return-type
40--sysroot=/jenkins/mjansa/build/ros/oe-melodic-gatesgarth/libhugetlbfs/1_2.23-r0/recipe-sysroot
41-I.. -O2 -Wall -g -o obj32/linkhuge_rw.o -c linkhuge_rw.c
42libhugetlbfs/1_2.23-r0-new/temp/log.do_compile:arm-oe-linux-gnueabi-gcc
43 -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -Wl,-O1
44-Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now
45-fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
46-Werror=format-security -Werror=return-type
47--sysroot=/jenkins/mjansa/build/ros/oe-melodic-gatesgarth/libhugetlbfs/1_2.23-r0/recipe-sysroot
48-B./obj32 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now
49-ldl -L../obj32 -o obj32/linkhuge_rw -Wl,--no-as-needed -lpthread -ldl
50-lhugetlbfs_privutils -Wl,--hugetlbfs-align obj32/linkhuge_rw.o
51obj32/testutils.o
52
53And the git log between 2.22 and 2.23 is also very short and looks
54reasonable.
55https://github.com/libhugetlbfs/libhugetlbfs/compare/2.22...2.23
56
57When checking with readelf -l it also shows the error about PHDR segment:
58arm-oe-linux-gnueabi-readelf -l
59./1_2.22-r0-old/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/linkhuge_rw
60
61Elf file type is DYN (Shared object file)
62Entry point 0x201105
63There are 10 program headers, starting at offset 52
64
65Program Headers:
66 Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
67 PHDR 0x000034 0x00200034 0x00200034 0x00140 0x00140 R 0x4
68 INTERP 0x000174 0x00200174 0x00200174 0x0001d 0x0001d R 0x1
69 [Requesting program interpreter: /usr/lib/ld-linux-armhf.so.3]
70 LOAD 0x000000 0x00200000 0x00200000 0x1222c 0x1222c R E 0x200000
71 LOAD 0x1ffdf0 0x005ffdf0 0x005ffdf0 0x102e0 0x202ec RW 0x200000
72 DYNAMIC 0x1ffdf8 0x005ffdf8 0x005ffdf8 0x00128 0x00128 RW 0x4
73 NOTE 0x000194 0x00200194 0x00200194 0x00044 0x00044 R 0x4
74 GNU_EH_FRAME 0x012224 0x00212224 0x00212224 0x00008 0x00008 R 0x4
75 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10
76 EXIDX 0x001c5c 0x00201c5c 0x00201c5c 0x00008 0x00008 R 0x4
77 GNU_RELRO 0x1ffdf0 0x005ffdf0 0x005ffdf0 0x00210 0x00210 RW 0x4
78
79 Section to Segment mapping:
80 Segment Sections...
81 00
82 01 .interp
83 02 .interp .note.ABI-tag .note.gnu.build-id .dynsym .dynstr
84.gnu.hash .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text
85.fini .ARM.extab .ARM.exidx .rodata .eh_frame .eh_frame_hdr
86 03 .fini_array .init_array .dynamic .got .data .bss
87 04 .dynamic
88 05 .note.ABI-tag .note.gnu.build-id
89 06 .eh_frame_hdr
90 07
91 08 .ARM.extab .ARM.exidx
92 09 .fini_array .init_array .dynamic .got
93
94arm-oe-linux-gnueabi-readelf -l
95./1_2.23-r0-new/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/linkhuge_rw
96
97Elf file type is DYN (Shared object file)
98Entry point 0x31cd1
99There are 10 program headers, starting at offset 52
100
101Program Headers:
102 Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
103 PHDR 0x000000 0x00000000 0x00000000 0x00000 0x00000 R 0
104readelf: Error: the PHDR segment is not covered by a LOAD segment
105 INTERP 0x030d40 0x00030d40 0x00030d40 0x0001d 0x0001d R 0x1
106 [Requesting program interpreter: /usr/lib/ld-linux-armhf.so.3]
107 LOAD 0x030d40 0x00030d40 0x00030d40 0x120b8 0x120b8 R E 0x200000
108 LOAD 0x1ffdf0 0x003ffdf0 0x003ffdf0 0x102e0 0x202ec RW 0x200000
109 DYNAMIC 0x1ffdf8 0x003ffdf8 0x003ffdf8 0x00128 0x00128 RW 0x4
110 NOTE 0x030d60 0x00030d60 0x00030d60 0x00044 0x00044 R 0x4
111 GNU_EH_FRAME 0x042df0 0x00042df0 0x00042df0 0x00008 0x00008 R 0x4
112 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10
113 EXIDX 0x032828 0x00032828 0x00032828 0x00008 0x00008 R 0x4
114 GNU_RELRO 0x1ffdf0 0x003ffdf0 0x003ffdf0 0x00210 0x00210 RW 0x4
115
116 Section to Segment mapping:
117 Segment Sections...
118 00
119 01 .interp
120 02 .interp .note.ABI-tag .note.gnu.build-id .dynsym .dynstr
121.gnu.hash .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text
122.fini .ARM.extab .ARM.exidx .rodata .eh_frame .eh_frame_hdr
123 03 .fini_array .init_array .dynamic .got .data .bss
124 04 .dynamic
125 05 .note.ABI-tag .note.gnu.build-id
126 06 .eh_frame_hdr
127 07
128 08 .ARM.extab .ARM.exidx
129 09 .fini_array .init_array .dynamic .got
130
131And the diff between these 2:
132
1331_2.22-r0-old/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/linkhuge_rw.readelf
1341_2.23-r0-new/sysroot-destdir/usr/lib/libhugetlbfs/tests/obj32/linkhuge_rw.readelf
135 Elf file type is DYN (Shared object file)
136-Entry point 0x201105
137+Entry point 0x31cd1
138 There are 10 program headers, starting at offset 52
139
140 Program Headers:
141 Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
142- PHDR 0x000034 0x00200034 0x00200034 0x00140 0x00140 R 0x4
143- INTERP 0x000174 0x00200174 0x00200174 0x0001d 0x0001d R 0x1
144+ PHDR 0x000000 0x00000000 0x00000000 0x00000 0x00000 R 0
145+readelf: Error: the PHDR segment is not covered by a LOAD segment
146+ INTERP 0x030d40 0x00030d40 0x00030d40 0x0001d 0x0001d R 0x1
147 [Requesting program interpreter: /usr/lib/ld-linux-armhf.so.3]
148- LOAD 0x000000 0x00200000 0x00200000 0x1222c 0x1222c R E 0x200000
149- LOAD 0x1ffdf0 0x005ffdf0 0x005ffdf0 0x102e0 0x202ec RW 0x200000
150- DYNAMIC 0x1ffdf8 0x005ffdf8 0x005ffdf8 0x00128 0x00128 RW 0x4
151- NOTE 0x000194 0x00200194 0x00200194 0x00044 0x00044 R 0x4
152- GNU_EH_FRAME 0x012224 0x00212224 0x00212224 0x00008 0x00008 R 0x4
153+ LOAD 0x030d40 0x00030d40 0x00030d40 0x120b8 0x120b8 R E 0x200000
154+ LOAD 0x1ffdf0 0x003ffdf0 0x003ffdf0 0x102e0 0x202ec RW 0x200000
155+ DYNAMIC 0x1ffdf8 0x003ffdf8 0x003ffdf8 0x00128 0x00128 RW 0x4
156+ NOTE 0x030d60 0x00030d60 0x00030d60 0x00044 0x00044 R 0x4
157+ GNU_EH_FRAME 0x042df0 0x00042df0 0x00042df0 0x00008 0x00008 R 0x4
158 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10
159- EXIDX 0x001c5c 0x00201c5c 0x00201c5c 0x00008 0x00008 R 0x4
160- GNU_RELRO 0x1ffdf0 0x005ffdf0 0x005ffdf0 0x00210 0x00210 RW 0x4
161+ EXIDX 0x032828 0x00032828 0x00032828 0x00008 0x00008 R 0x4
162+ GNU_RELRO 0x1ffdf0 0x003ffdf0 0x003ffdf0 0x00210 0x00210 RW 0x4
163
164 Section to Segment mapping:
165
166Revert fixes this build issue, but I still don't see why it fails this way.
167
168Upstream-Status: Pending
169
170Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
171
172# Please enter the commit message for your changes. Lines starting
173# with '#' will be ignored, and an empty message aborts the commit.
174#
175# Date: Wed Sep 16 13:43:09 2020 +0200
176#
177# On branch jansa/master
178# Changes to be committed:
179# new file: meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch
180# modified: meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
181#
182# Untracked files:
183# counts.txt
184# diff
185# log.svn
186# log.svn2
187# wip/
188#
189---
190 ld.hugetlbfs | 4 +---
191 1 file changed, 1 insertion(+), 3 deletions(-)
192
193diff --git a/ld.hugetlbfs b/ld.hugetlbfs
194index 5e4e497..6ee8238 100755
195--- a/ld.hugetlbfs
196+++ b/ld.hugetlbfs
197@@ -130,9 +130,7 @@ if [ "$HTLB_ALIGN" == "slice" ]; then
198 # targeting the ARM platform one needs to explicitly set the text segment offset
199 # otherwise it will be NULL.
200 case "$EMU" in
201- armelf*_linux_eabi|aarch64elf*|aarch64linux*)
202- printf -v TEXTADDR "%x" "$SLICE_SIZE"
203- HTLBOPTS="$HTLBOPTS -Ttext-segment=$TEXTADDR" ;;
204+ armelf*_linux_eabi|aarch64elf*|aarch64linux*) HTLBOPTS="$HTLBOPTS -Ttext-segment=$SLICE_SIZE" ;;
205 elf_i386) HTLBOPTS="$HTLBOPTS -Ttext-segment=0x08000000" ;;
206 elf64ppc|elf64lppc)
207 if [ "$MMU_TYPE" == "Hash" ] ; then
208--
2092.17.1
210
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/0001-skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch
index a13c5389fb..3dbc34d08d 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/0001-skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch
@@ -1,20 +1,20 @@
1From 183a4dafe141197de5840f2e48c266ef209307aa Mon Sep 17 00:00:00 2001 1From b448672f1bc08dcef2ae07727ae6f124a3032a35 Mon Sep 17 00:00:00 2001
2From: Ting Liu <b28495@freescale.com> 2From: Ting Liu <b28495@freescale.com>
3Date: Mon, 18 Jun 2012 16:37:05 +0800 3Date: Mon, 18 Jun 2012 16:37:05 +0800
4Subject: [PATCH] skip checking LIB32 and LIB64 if they point to the same place 4Subject: [PATCH] skip checking LIB32 and LIB64 if they point to the same place
5 5
6Upstream-Status: Inappropriate [oe-core specific] 6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Ting Liu <b28495@freescale.com>
8 7
8Signed-off-by: Ting Liu <b28495@freescale.com>
9--- 9---
10 Makefile | 1 - 10 Makefile.in | 1 -
11 1 file changed, 1 deletion(-) 11 1 file changed, 1 deletion(-)
12 12
13diff --git a/Makefile b/Makefile 13diff --git a/Makefile.in b/Makefile.in
14index 51e41f0..373df3c 100644 14index 65ae5a4..25be577 100644
15--- a/Makefile 15--- a/Makefile.in
16+++ b/Makefile 16+++ b/Makefile.in
17@@ -177,7 +177,6 @@ REALLIB32 = $(realpath $(PREFIX)/$(LIB32)) 17@@ -196,7 +196,6 @@ REALLIB32 = $(realpath $(PREFIX)/$(LIB32))
18 REALLIB64 = $(realpath $(PREFIX)/$(LIB64)) 18 REALLIB64 = $(realpath $(PREFIX)/$(LIB64))
19 ifneq ($(realpath $(PREFIX)),) 19 ifneq ($(realpath $(PREFIX)),)
20 ifeq ($(REALLIB32),$(REALLIB64)) 20 ifeq ($(REALLIB32),$(REALLIB64))
@@ -22,3 +22,6 @@ index 51e41f0..373df3c 100644
22 endif 22 endif
23 endif 23 endif
24 24
25--
262.25.1
27
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
deleted file mode 100644
index 78a4cb0fc2..0000000000
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-makefile-Append-CPPFLAGS-rather-then-override.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From b6dba773491bbb7b4664dacdd87a12af860f1bd8 Mon Sep 17 00:00:00 2001
2From: Oleksiy Obitotskyy <oobitots@cisco.com>
3Date: Thu, 28 Jan 2021 05:43:33 -0800
4Subject: [PATCH] tests/makefile: Append CPPFLAGS rather then override
5
6CPPFLAGS overrided and we could miss some options needed.
7
8Upstream-Status: Submitted
9Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
10---
11 tests/Makefile | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/tests/Makefile b/tests/Makefile
15index 0ca3716..d262932 100644
16--- a/tests/Makefile
17+++ b/tests/Makefile
18@@ -33,8 +33,8 @@ HELPERS = get_hugetlbfs_path compare_kvers
19 HELPER_LIBS = libheapshrink.so
20 BADTOOLCHAIN = bad-toolchain.sh
21
22-CFLAGS = -O2 -Wall -g
23-CPPFLAGS = -I..
24+CFLAGS += -O2 -Wall -g
25+CPPFLAGS += -I..
26 STATIC_LIBHUGE = -Wl,--whole-archive -lhugetlbfs -Wl,--no-whole-archive
27 STATIC_LDLIBS = -Wl,--no-as-needed -lpthread
28 LDLIBS = $(STATIC_LDLIBS) -ldl -lhugetlbfs_privutils
29--
302.26.2.Cisco
31
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/0002-libhugetlbfs-avoid-search-host-library-path-for-cros.patch
index f95e9e85a4..1b99c007f5 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-libhugetlbfs-avoid-search-host-library-path-for-cros.patch
@@ -1,4 +1,4 @@
1From 82a4f60ab24dff121f5f9d3bbcd9a8a28bb7caef Mon Sep 17 00:00:00 2001 1From d3903cbe348c6ecb2f38b37f20dafa6b0ca3b114 Mon Sep 17 00:00:00 2001
2From: Chunrong Guo <B40290@freescale.com> 2From: Chunrong Guo <B40290@freescale.com>
3Date: Sun, 8 Sep 2013 23:21:49 -0500 3Date: Sun, 8 Sep 2013 23:21:49 -0500
4Subject: [PATCH] libhugetlbfs: avoid search host library path for cross 4Subject: [PATCH] libhugetlbfs: avoid search host library path for cross
@@ -7,7 +7,6 @@ Subject: [PATCH] libhugetlbfs: avoid search host library path for cross
7Upstream-Status: Inappropriate [oe-core specific] 7Upstream-Status: Inappropriate [oe-core specific]
8 8
9Signed-off-by: Chunrong Guo <B40290@freescale.com> 9Signed-off-by: Chunrong Guo <B40290@freescale.com>
10
11--- 10---
12 ldscripts/elf32ppclinux.xB | 2 +- 11 ldscripts/elf32ppclinux.xB | 2 +-
13 ldscripts/elf32ppclinux.xBDT | 2 +- 12 ldscripts/elf32ppclinux.xBDT | 2 +-
@@ -95,3 +94,6 @@ index 1855202..c62d245 100644
95 INPUT(-lhugetlbfs); 94 INPUT(-lhugetlbfs);
96 /* Do we need any of these for elf? 95 /* Do we need any of these for elf?
97 __DYNAMIC = 0; */ 96 __DYNAMIC = 0; */
97--
982.25.1
99
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-tests-Makefile-install-static-4G-edge-testcases.patch
index b8b2f8e6fb..98cdf2f51c 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/tests-Makefile-install-static-4G-edge-testcases.patch
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-tests-Makefile-install-static-4G-edge-testcases.patch
@@ -1,22 +1,21 @@
1From f1ad8ff887f16daee8d06eca3df0f2541bfdaac0 Mon Sep 17 00:00:00 2001 1From 3e54866a0ea3c9e933e91213cbe6e55b7ff67b87 Mon Sep 17 00:00:00 2001
2From: Ting Liu <b28495@freescale.com> 2From: Ting Liu <b28495@freescale.com>
3Date: Mon, 23 Sep 2013 08:00:55 +0000 3Date: Mon, 23 Sep 2013 08:00:55 +0000
4Subject: [PATCH] libhugetlbfs: add recipe 4Subject: [PATCH] tests/Makefile: install static 4G edge testcases
5
6Upstream-Status: Submitted
7 5
8TESTS_64 is empty, install will fail due to missing file operand 6TESTS_64 is empty, install will fail due to missing file operand
9 7
10Signed-off-by: Ting Liu <b28495@freescale.com> 8Upstream-Status: Submitted
11 9
10Signed-off-by: Ting Liu <b28495@freescale.com>
12--- 11---
13 tests/Makefile | 2 +- 12 tests/Makefile.in | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-) 13 1 file changed, 1 insertion(+), 1 deletion(-)
15 14
16diff --git a/tests/Makefile b/tests/Makefile 15diff --git a/tests/Makefile.in b/tests/Makefile.in
17index 073df96..0ca3716 100644 16index d33a228..d262932 100644
18--- a/tests/Makefile 17--- a/tests/Makefile.in
19+++ b/tests/Makefile 18+++ b/tests/Makefile.in
20@@ -295,7 +295,7 @@ obj64/install: 19@@ -295,7 +295,7 @@ obj64/install:
21 $(INSTALL) -m 755 wrapper-utils.sh $(DESTDIR)$(INST_TESTSDIR64)/obj64 20 $(INSTALL) -m 755 wrapper-utils.sh $(DESTDIR)$(INST_TESTSDIR64)/obj64
22 $(INSTALL) -m 755 $(HELPERS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64 21 $(INSTALL) -m 755 $(HELPERS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64
@@ -26,3 +25,6 @@ index 073df96..0ca3716 100644
26 $(INSTALL) -m 755 run_tests.py $(DESTDIR)$(INST_TESTSDIR64) 25 $(INSTALL) -m 755 run_tests.py $(DESTDIR)$(INST_TESTSDIR64)
27 26
28 install: $(OBJDIRS:%=%/install) 27 install: $(OBJDIRS:%=%/install)
28--
292.25.1
30
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/0004-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch
index 83934abef8..6b010365a0 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/0004-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch
@@ -1,4 +1,4 @@
1From 0077532b07e268347cb8557be6d70148d5f0e840 Mon Sep 17 00:00:00 2001 1From 86d3ebfc4da5ccbc82fdee4abaf2cbf758d82403 Mon Sep 17 00:00:00 2001
2From: Ting Liu <b28495@freescale.com> 2From: Ting Liu <b28495@freescale.com>
3Date: Wed, 21 Aug 2013 15:44:57 +0800 3Date: Wed, 21 Aug 2013 15:44:57 +0800
4Subject: [PATCH] run_test.py: not use hard coded path ../obj/hugeadm 4Subject: [PATCH] run_test.py: not use hard coded path ../obj/hugeadm
@@ -20,10 +20,10 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
20 1 file changed, 11 insertions(+), 1 deletion(-) 20 1 file changed, 11 insertions(+), 1 deletion(-)
21 21
22diff --git a/tests/run_tests.py b/tests/run_tests.py 22diff --git a/tests/run_tests.py b/tests/run_tests.py
23index 018264d..0aabcd1 100755 23index 4793262..6cd0241 100755
24--- a/tests/run_tests.py 24--- a/tests/run_tests.py
25+++ b/tests/run_tests.py 25+++ b/tests/run_tests.py
26@@ -245,9 +245,19 @@ def get_pagesizes(): 26@@ -250,9 +250,19 @@ def get_pagesizes():
27 Use libhugetlbfs' hugeadm utility to get a list of page sizes that have 27 Use libhugetlbfs' hugeadm utility to get a list of page sizes that have
28 active mount points and at least one huge page allocated to the pool. 28 active mount points and at least one huge page allocated to the pool.
29 """ 29 """
@@ -45,5 +45,5 @@ index 018264d..0aabcd1 100755
45 return sizes 45 return sizes
46 46
47-- 47--
482.7.4 482.25.1
49 49
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/0005-libhugetlbfs-elf_i386-avoid-search-host-library-path.patch
index 7cc180a4b7..fc8776af66 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-elf_i386-avoid-search-host-library-path.patch
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-libhugetlbfs-elf_i386-avoid-search-host-library-path.patch
@@ -1,4 +1,4 @@
1From b5887693d90c430291b644c2f5713b5fdd1777ce Mon Sep 17 00:00:00 2001 1From 8c7a379876e3c7a32bef8620f94a85d20b7b186f Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com> 2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Tue, 4 Nov 2014 00:49:11 -0800 3Date: Tue, 4 Nov 2014 00:49:11 -0800
4Subject: [PATCH] libhugetlbfs/elf_i386: avoid search host library path for 4Subject: [PATCH] libhugetlbfs/elf_i386: avoid search host library path for
@@ -7,7 +7,6 @@ Subject: [PATCH] libhugetlbfs/elf_i386: avoid search host library path for
7Upstream-Status: Inappropriate [cross compile specific] 7Upstream-Status: Inappropriate [cross compile specific]
8 8
9Signed-off-by: Jackie Huang <jackie.huang@windriver.com> 9Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
10
11--- 10---
12 ldscripts/elf_i386.xB | 1 - 11 ldscripts/elf_i386.xB | 1 -
13 ldscripts/elf_i386.xBDT | 1 - 12 ldscripts/elf_i386.xBDT | 1 -
@@ -37,3 +36,6 @@ index d72aebe..3bac1b1 100644
37 INPUT(-lhugetlbfs); 36 INPUT(-lhugetlbfs);
38 /* Do we need any of these for elf? 37 /* Do we need any of these for elf?
39 __DYNAMIC = 0; */ 38 __DYNAMIC = 0; */
39--
402.25.1
41
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-stddef.h-for-ptrdiff_t.patch
index 914b0514f8..33a4efb1fa 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-stddef.h-for-ptrdiff_t.patch
@@ -1,18 +1,17 @@
1From 351d1de09dd80049b7a2cb02c5750635d0389873 Mon Sep 17 00:00:00 2001 1From 5fe5dae674e259bcdd57b9c6a0004111ab0700ce Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 21 Jun 2018 19:25:57 -0700 3Date: Thu, 21 Jun 2018 19:25:57 -0700
4Subject: [PATCH] include stddef.h for ptrdiff_t 4Subject: [PATCH] include stddef.h for ptrdiff_t
5 5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7
8---
9Upstream-Status: Pending 6Upstream-Status: Pending
10 7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
11 morecore.c | 1 + 10 morecore.c | 1 +
12 1 file changed, 1 insertion(+) 11 1 file changed, 1 insertion(+)
13 12
14diff --git a/morecore.c b/morecore.c 13diff --git a/morecore.c b/morecore.c
15index 6563bbd..0eef782 100644 14index 405c566..0edccd2 100644
16--- a/morecore.c 15--- a/morecore.c
17+++ b/morecore.c 16+++ b/morecore.c
18@@ -19,6 +19,7 @@ 17@@ -19,6 +19,7 @@
@@ -23,3 +22,6 @@ index 6563bbd..0eef782 100644
23 #include <stdio.h> 22 #include <stdio.h>
24 #include <stdlib.h> 23 #include <stdlib.h>
25 #include <malloc.h> 24 #include <malloc.h>
25--
262.25.1
27
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0007-Mark-glibc-specific-code-so.patch
index 7ad6c43eb1..5b2c91b8a1 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0007-Mark-glibc-specific-code-so.patch
@@ -1,21 +1,20 @@
1From 0f548286848c70aa325c6748d80e8651389b4938 Mon Sep 17 00:00:00 2001 1From c98e64c56d0118a2d5f950eaceaed0e85eaa2543 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 21 Jun 2018 19:32:59 -0700 3Date: Thu, 21 Jun 2018 19:32:59 -0700
4Subject: [PATCH] Mark glibc specific code so 4Subject: [PATCH] Mark glibc specific code so
5 5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7
8---
9Upstream-Status: Pending 6Upstream-Status: Pending
10 7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
11 morecore.c | 3 ++- 10 morecore.c | 3 ++-
12 1 file changed, 2 insertions(+), 1 deletion(-) 11 1 file changed, 2 insertions(+), 1 deletion(-)
13 12
14diff --git a/morecore.c b/morecore.c 13diff --git a/morecore.c b/morecore.c
15index 0eef782..d48509c 100644 14index 0edccd2..db22216 100644
16--- a/morecore.c 15--- a/morecore.c
17+++ b/morecore.c 16+++ b/morecore.c
18@@ -364,6 +364,7 @@ void hugetlbfs_setup_morecore(void) 17@@ -371,6 +371,7 @@ void hugetlbfs_setup_morecore(void)
19 18
20 INFO("setup_morecore(): heapaddr = 0x%lx\n", heapaddr); 19 INFO("setup_morecore(): heapaddr = 0x%lx\n", heapaddr);
21 20
@@ -23,7 +22,7 @@ index 0eef782..d48509c 100644
23 heaptop = heapbase = (void *)heapaddr; 22 heaptop = heapbase = (void *)heapaddr;
24 if (__hugetlb_opts.thp_morecore) 23 if (__hugetlb_opts.thp_morecore)
25 __morecore = &thp_morecore; 24 __morecore = &thp_morecore;
26@@ -371,7 +372,6 @@ void hugetlbfs_setup_morecore(void) 25@@ -378,7 +379,6 @@ void hugetlbfs_setup_morecore(void)
27 __morecore = &hugetlbfs_morecore; 26 __morecore = &hugetlbfs_morecore;
28 27
29 /* Set some allocator options more appropriate for hugepages */ 28 /* Set some allocator options more appropriate for hugepages */
@@ -31,9 +30,13 @@ index 0eef782..d48509c 100644
31 if (__hugetlb_opts.shrink_ok) 30 if (__hugetlb_opts.shrink_ok)
32 mallopt(M_TRIM_THRESHOLD, hpage_size + hpage_size / 2); 31 mallopt(M_TRIM_THRESHOLD, hpage_size + hpage_size / 2);
33 else 32 else
34@@ -381,4 +381,5 @@ void hugetlbfs_setup_morecore(void) 33@@ -388,5 +388,6 @@ void hugetlbfs_setup_morecore(void)
35 * This doesn't appear to prohibit malloc() from falling back 34 * This doesn't appear to prohibit malloc() from falling back
36 * to mmap() if we run out of hugepages. */ 35 * to mmap() if we run out of hugepages. */
37 mallopt(M_MMAP_MAX, 0); 36 mallopt(M_MMAP_MAX, 0);
38+#endif 37+#endif
39 } 38 }
39 #endif /* HAS_MORECORE */
40--
412.25.1
42
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/0008-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch
index 858a8e511a..73844b71f9 100644
--- 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/0008-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch
@@ -1,20 +1,19 @@
1From 9ff04d7acc700387e3837f8ab11a41efea5ee8b0 Mon Sep 17 00:00:00 2001 1From 4f69eb130dc2c67a90f2460cedb78f6db11dd6d2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 21 Jun 2018 19:44:26 -0700 3Date: Thu, 21 Jun 2018 19:44:26 -0700
4Subject: [PATCH] alloc.c: Avoid sysconf(_SC_LEVEL2_CACHE_LINESIZE) on linux 4Subject: [PATCH] alloc.c: Avoid sysconf(_SC_LEVEL2_CACHE_LINESIZE) on linux
5 5
6musl does not have it 6musl does not have it
7 7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9
10---
11Upstream-Status: Pending 8Upstream-Status: Pending
12 9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
13 alloc.c | 15 ++++++++++++++- 12 alloc.c | 15 ++++++++++++++-
14 1 file changed, 14 insertions(+), 1 deletion(-) 13 1 file changed, 14 insertions(+), 1 deletion(-)
15 14
16diff --git a/alloc.c b/alloc.c 15diff --git a/alloc.c b/alloc.c
17index bce9464..cf7eb40 100644 16index b8ed663..a58c43d 100644
18--- a/alloc.c 17--- a/alloc.c
19+++ b/alloc.c 18+++ b/alloc.c
20@@ -245,6 +245,19 @@ void free_huge_pages(void *ptr) 19@@ -245,6 +245,19 @@ void free_huge_pages(void *ptr)
@@ -46,3 +45,6 @@ index bce9464..cf7eb40 100644
46 linemod = time(NULL); 45 linemod = time(NULL);
47 } 46 }
48 47
48--
492.25.1
50
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/0009-shm.c-Mark-glibc-specific-changes-so.patch
index c3f7b3e479..4fbf30e24b 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0009-shm.c-Mark-glibc-specific-changes-so.patch
@@ -1,13 +1,12 @@
1From 9ce323432a7f4d99f617970c7e35b607b9bbf843 Mon Sep 17 00:00:00 2001 1From 37239dd5f14a34b05e77b3ca6e34f96161f1339a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 21 Jun 2018 19:48:04 -0700 3Date: Thu, 21 Jun 2018 19:48:04 -0700
4Subject: [PATCH] shm.c: Mark glibc specific changes so 4Subject: [PATCH] shm.c: Mark glibc specific changes so
5 5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7
8---
9Upstream-Status: Pending 6Upstream-Status: Pending
10 7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
11 shm.c | 3 ++- 10 shm.c | 3 ++-
12 1 file changed, 2 insertions(+), 1 deletion(-) 11 1 file changed, 2 insertions(+), 1 deletion(-)
13 12
@@ -28,3 +27,6 @@ index 1f82cab..9447b63 100644
28 27
29 /* call syscall shmget through the generic syscall mechanism */ 28 /* call syscall shmget through the generic syscall mechanism */
30 static int syscall_shmget(key_t key, size_t size, int shmflg) 29 static int syscall_shmget(key_t key, size_t size, int shmflg)
30--
312.25.1
32
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0010-Include-dirent.h-for-ino_t.patch
index 8bd1633392..a530a5267a 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0010-Include-dirent.h-for-ino_t.patch
@@ -1,4 +1,4 @@
1From bb8c370aaaf25b1fe1fbf984e73177018026cb91 Mon Sep 17 00:00:00 2001 1From ec9163c0436d1c77cecc941aca2e524b26001b15 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 21 Jun 2018 19:51:02 -0700 3Date: Thu, 21 Jun 2018 19:51:02 -0700
4Subject: [PATCH] Include dirent.h for ino_t 4Subject: [PATCH] Include dirent.h for ino_t
@@ -6,13 +6,13 @@ Subject: [PATCH] Include dirent.h for ino_t
6Fixes 6Fixes
7error: unknown type name 'ino_t'; did you mean 'int'? 7error: unknown type name 'ino_t'; did you mean 'int'?
8 8
9Upstream-Status: Pending
10
9Signed-off-by: Khem Raj <raj.khem@gmail.com> 11Signed-off-by: Khem Raj <raj.khem@gmail.com>
10 12
11Update for 2.22. 13Update for 2.22.
12Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> 14Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
13--- 15---
14Upstream-Status: Pending
15
16 tests/hugetests.h | 1 + 16 tests/hugetests.h | 1 +
17 1 file changed, 1 insertion(+) 17 1 file changed, 1 insertion(+)
18 18
@@ -29,5 +29,5 @@ index bc4e16a..fbe4dc0 100644
29 29
30 #include "libhugetlbfs_privutils.h" 30 #include "libhugetlbfs_privutils.h"
31-- 31--
322.7.4 322.25.1
33 33
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0011-include-limits.h-for-PATH_MAX.patch
index e4f8030961..08de396d9f 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0011-include-limits.h-for-PATH_MAX.patch
@@ -1,4 +1,4 @@
1From 5f64aa8c47c2d3a155a97e262f89cc47394a69eb Mon Sep 17 00:00:00 2001 1From 79b76433f4b6f2f14914817b7e8ac0db1df39250 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 21 Jun 2018 19:58:53 -0700 3Date: Thu, 21 Jun 2018 19:58:53 -0700
4Subject: [PATCH] include limits.h for PATH_MAX 4Subject: [PATCH] include limits.h for PATH_MAX
@@ -7,17 +7,16 @@ Fixes
7 7
8error: 'PATH_MAX' undeclared 8error: 'PATH_MAX' undeclared
9 9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
12---
13Upstream-Status: Pending 10Upstream-Status: Pending
14 11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
15 hugeadm.c | 1 + 14 hugeadm.c | 1 +
16 tests/gethugepagesizes.c | 1 + 15 tests/gethugepagesizes.c | 1 +
17 2 files changed, 2 insertions(+) 16 2 files changed, 2 insertions(+)
18 17
19diff --git a/hugeadm.c b/hugeadm.c 18diff --git a/hugeadm.c b/hugeadm.c
20index fe4211d..8db274c 100644 19index 79a4867..65d5136 100644
21--- a/hugeadm.c 20--- a/hugeadm.c
22+++ b/hugeadm.c 21+++ b/hugeadm.c
23@@ -33,6 +33,7 @@ 22@@ -33,6 +33,7 @@
@@ -29,7 +28,7 @@ index fe4211d..8db274c 100644
29 #include <sys/stat.h> 28 #include <sys/stat.h>
30 #include <sys/types.h> 29 #include <sys/types.h>
31diff --git a/tests/gethugepagesizes.c b/tests/gethugepagesizes.c 30diff --git a/tests/gethugepagesizes.c b/tests/gethugepagesizes.c
32index 9551b38..2645e3f 100644 31index 5777265..990db69 100644
33--- a/tests/gethugepagesizes.c 32--- a/tests/gethugepagesizes.c
34+++ b/tests/gethugepagesizes.c 33+++ b/tests/gethugepagesizes.c
35@@ -29,6 +29,7 @@ 34@@ -29,6 +29,7 @@
@@ -40,3 +39,6 @@ index 9551b38..2645e3f 100644
40 39
41 #include "hugetests.h" 40 #include "hugetests.h"
42 41
42--
432.25.1
44
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/0012-huge_page_setup_helper-use-python3-interpreter.patch
index e45f283b38..0583df95ad 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-huge_page_setup_helper-use-python3-interpreter.patch
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0012-huge_page_setup_helper-use-python3-interpreter.patch
@@ -1,4 +1,4 @@
1From b77c61de4d88d2c6e5d31f4f5a5877cc4c61272e Mon Sep 17 00:00:00 2001 1From e5580e392b8764e1e6509c5a4ed13fb2ce7566b9 Mon Sep 17 00:00:00 2001
2From: Andrey Zhizhikin <andrey.z@gmail.com> 2From: Andrey Zhizhikin <andrey.z@gmail.com>
3Date: Mon, 27 Jan 2020 17:27:55 +0000 3Date: Mon, 27 Jan 2020 17:27:55 +0000
4Subject: [PATCH] huge_page_setup_helper: use python3 interpreter 4Subject: [PATCH] huge_page_setup_helper: use python3 interpreter
@@ -15,7 +15,7 @@ Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
15 1 file changed, 1 insertion(+), 1 deletion(-) 15 1 file changed, 1 insertion(+), 1 deletion(-)
16 16
17diff --git a/huge_page_setup_helper.py b/huge_page_setup_helper.py 17diff --git a/huge_page_setup_helper.py b/huge_page_setup_helper.py
18index a9ba2bf..7ba0c92 100755 18index 01fc8dc..79a88ca 100755
19--- a/huge_page_setup_helper.py 19--- a/huge_page_setup_helper.py
20+++ b/huge_page_setup_helper.py 20+++ b/huge_page_setup_helper.py
21@@ -1,4 +1,4 @@ 21@@ -1,4 +1,4 @@
@@ -25,5 +25,5 @@ index a9ba2bf..7ba0c92 100755
25 # 25 #
26 # Tool to set up Linux large page support with minimal effort 26 # Tool to set up Linux large page support with minimal effort
27-- 27--
282.17.1 282.25.1
29 29
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0013-elflink.c-include-libgen.h-for-basename.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0013-elflink.c-include-libgen.h-for-basename.patch
new file mode 100644
index 0000000000..264a535cc7
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0013-elflink.c-include-libgen.h-for-basename.patch
@@ -0,0 +1,41 @@
1From 825444522d698991be04bbfa683a7cf785c6f72c Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Wed, 2 Oct 2024 00:06:34 +0800
4Subject: [PATCH] elflink.c: include libgen.h for basename
5
6Basename prototype has been removed from string.h from latest musl[1].
7Compilers e.g. clang-18 flags the absense of prototype as error.
8Therefore include libgen.h for providing it.
9
10elflink.c: In function 'get_shared_file_name':
11elflink.c:363:19: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration]
12 363 | binary2 = basename(binary);
13 | ^~~~~~~~
14elflink.c:363:17: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
15 363 | binary2 = basename(binary);
16 | ^
17
18[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
19
20Upstream-Status: Pending
21
22Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
23---
24 elflink.c | 1 +
25 1 file changed, 1 insertion(+)
26
27diff --git a/elflink.c b/elflink.c
28index 278d338..0e78d61 100644
29--- a/elflink.c
30+++ b/elflink.c
31@@ -38,6 +38,7 @@
32 #include <limits.h>
33 #include <elf.h>
34 #include <dlfcn.h>
35+#include <libgen.h>
36
37 #include "version.h"
38 #include "hugetlbfs.h"
39--
402.25.1
41
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb
new file mode 100644
index 0000000000..e688d6ede2
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb
@@ -0,0 +1,79 @@
1SUMMARY = "A library which provides easy access to huge pages of memory"
2HOMEPAGE = "https://github.com/libhugetlbfs/libhugetlbfs"
3LICENSE = "LGPL-2.1-only"
4LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1"
5
6RDEPENDS:${PN} += "bash"
7RDEPENDS:${PN}-tests += "bash python3-core python3-resource"
8
9PE = "1"
10
11SRCREV = "1322884fb0d55dc55f53563c1aa6328d118997e7"
12SRC_URI = " \
13 git://github.com/libhugetlbfs/libhugetlbfs.git;protocol=https;branch=master \
14 file://0001-skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch \
15 file://0002-libhugetlbfs-avoid-search-host-library-path-for-cros.patch \
16 file://0003-tests-Makefile-install-static-4G-edge-testcases.patch \
17 file://0004-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch \
18 file://0005-libhugetlbfs-elf_i386-avoid-search-host-library-path.patch \
19 file://0006-include-stddef.h-for-ptrdiff_t.patch \
20 file://0007-Mark-glibc-specific-code-so.patch \
21 file://0008-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch \
22 file://0009-shm.c-Mark-glibc-specific-changes-so.patch \
23 file://0010-Include-dirent.h-for-ino_t.patch \
24 file://0011-include-limits.h-for-PATH_MAX.patch \
25 file://0012-huge_page_setup_helper-use-python3-interpreter.patch \
26 file://0013-elflink.c-include-libgen.h-for-basename.patch \
27"
28
29UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
30
31
32COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
33
34LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
35LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
36LIBHUGETLBFS_ARCH:powerpc = "ppc"
37LIBHUGETLBFS_ARCH:powerpc64 = "ppc64"
38LIBHUGETLBFS_ARCH:powerpc64le = "ppc64le"
39EXTRA_OEMAKE = "'ARCH=${LIBHUGETLBFS_ARCH}' 'OPT=${CFLAGS}' 'CC=${CC}' ${LIBARGS} BUILDTYPE=NATIVEONLY V=2"
40PARALLEL_MAKE = ""
41CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0"
42
43export HUGETLB_LDSCRIPT_PATH = "${S}/ldscripts"
44
45TARGET_CC_ARCH += "${LDFLAGS}"
46
47LDFLAGS += "-B${S}"
48
49inherit autotools-brokensep
50
51do_configure:prepend() {
52 ln -sf ld.hugetlbfs ${S}/ld
53 ln -sf ld.hugetlbfs ${S}/ld.bfd
54 ln -sf ld.hugetlbfs ${S}/ld.lld
55}
56
57do_install() {
58 oe_runmake PREFIX=${prefix} DESTDIR=${D} \
59 INST_TESTSDIR32=${libdir}/libhugetlbfs/tests \
60 INST_TESTSDIR64=${libdir}/libhugetlbfs/tests \
61 install-tests
62
63 sed -i \
64 -e 's|${RECIPE_SYSROOT_NATIVE}||g' \
65 -e 's|${RECIPE_SYSROOT}||g' \
66 -e 's|${S}||g' \
67 `find ${D}${libdir}/libhugetlbfs/tests -name dummy.ldscript`
68}
69
70PACKAGES =+ "${PN}-tests "
71FILES:${PN} += "${libdir}/*.so"
72FILES:${PN}-dev = "${includedir}"
73FILES:${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug"
74FILES:${PN}-tests += "${libdir}/libhugetlbfs/tests"
75
76INSANE_SKIP:${PN} = "dev-so"
77
78INHIBIT_PACKAGE_STRIP = "1"
79INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
deleted file mode 100644
index 80af9873b1..0000000000
--- a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
+++ /dev/null
@@ -1,79 +0,0 @@
1SUMMARY = "A library which provides easy access to huge pages of memory"
2HOMEPAGE = "https://github.com/libhugetlbfs/libhugetlbfs"
3LICENSE = "LGPL-2.1-only"
4LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1"
5
6DEPENDS = "sysfsutils"
7RDEPENDS:${PN} += "bash python3-core"
8RDEPENDS:${PN}-tests += "bash python3-core"
9
10PV = "2.23"
11PE = "1"
12
13SRCREV = "6b126a4d7da9490fa40fe7e1b962edcb939feddc"
14SRC_URI = " \
15 git://github.com/libhugetlbfs/libhugetlbfs.git;protocol=https;branch=master \
16 file://skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch \
17 file://libhugetlbfs-avoid-search-host-library-path-for-cros.patch \
18 file://tests-Makefile-install-static-4G-edge-testcases.patch \
19 file://0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch \
20 file://libhugetlbfs-elf_i386-avoid-search-host-library-path.patch \
21 file://0001-include-stddef.h-for-ptrdiff_t.patch \
22 file://0002-Mark-glibc-specific-code-so.patch \
23 file://0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch \
24 file://0004-shm.c-Mark-glibc-specific-changes-so.patch \
25 file://0005-Include-dirent.h-for-ino_t.patch \
26 file://0006-include-limits.h-for-PATH_MAX.patch \
27 file://0001-huge_page_setup_helper-use-python3-interpreter.patch \
28 file://0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch \
29 file://0001-tests-makefile-Append-CPPFLAGS-rather-then-override.patch \
30"
31
32UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
33
34S = "${WORKDIR}/git"
35
36COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
37
38LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
39LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
40LIBHUGETLBFS_ARCH:powerpc = "ppc"
41LIBHUGETLBFS_ARCH:powerpc64 = "ppc64"
42LIBHUGETLBFS_ARCH:powerpc64le = "ppc64le"
43EXTRA_OEMAKE = "'ARCH=${LIBHUGETLBFS_ARCH}' 'OPT=${CFLAGS}' 'CC=${CC}' ${LIBARGS} BUILDTYPE=NATIVEONLY V=2"
44PARALLEL_MAKE = ""
45CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0"
46
47export HUGETLB_LDSCRIPT_PATH="${S}/ldscripts"
48
49TARGET_CC_ARCH += "${LDFLAGS}"
50
51#The CUSTOM_LDSCRIPTS doesn't work with the gold linker
52inherit cpan-base
53do_configure() {
54 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
55 sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile
56 fi
57}
58
59do_install() {
60 oe_runmake PREFIX=${prefix} DESTDIR=${D} \
61 INST_TESTSDIR32=${libdir}/libhugetlbfs/tests \
62 INST_TESTSDIR64=${libdir}/libhugetlbfs/tests \
63 install-tests
64}
65
66
67PACKAGES =+ "${PN}-tests "
68FILES:${PN} += "${libdir}/*.so"
69FILES:${PN}-dev = "${includedir}"
70FILES:${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug"
71FILES:${PN}-tests += "${libdir}/libhugetlbfs/tests"
72
73INSANE_SKIP:${PN} = "dev-so"
74
75INHIBIT_PACKAGE_STRIP = "1"
76INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
77
78# see https://github.com/libhugetlbfs/libhugetlbfs/issues/52
79SKIP_RECIPE[libhugetlbfs] ?= "Needs porting to glibc 2.34+"