diff options
author | Daniel Díaz <daniel.diaz@linaro.org> | 2018-10-04 18:15:50 -0500 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2018-10-04 20:01:19 -0700 |
commit | 0f6bab36cb8b40efc613e764eb3fb01defc17d3f (patch) | |
tree | 69fbbcd79dece5f07e4fdc6f77639f86448dcb59 /meta-oe/recipes-benchmark/libhugetlbfs | |
parent | 126f046247079aed0fdc2acda21b0f6898b56bd6 (diff) | |
download | meta-openembedded-0f6bab36cb8b40efc613e764eb3fb01defc17d3f.tar.gz |
libhugetlbfs: Update to 2.21
Version 2.21 was released on 9/17 [1]. These changes update
the recipe to use that version.
Only one of the existing patches had been merged upstream
(as e3928d57 "Force text segment alignment to 0x08000000 for
i386 with gold linker") -- the rest of them is still needed
for proper cross-compilation.
Upstream commit c3e5cb22 ("Remove bit-rotting scripts") got
rid of the Perl stuff, due to it being "massively out of
date", so the Perl bits in the recipe have gone away too.
[1] https://github.com/libhugetlbfs/libhugetlbfs/releases/tag/2.21
Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-benchmark/libhugetlbfs')
-rw-r--r-- | meta-oe/recipes-benchmark/libhugetlbfs/files/Force-text-segment-alignment-to-0x08000000-for-i386-.patch | 92 | ||||
-rw-r--r-- | meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb | 20 |
2 files changed, 5 insertions, 107 deletions
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 ce6974d7c..000000000 --- a/meta-oe/recipes-benchmark/libhugetlbfs/files/Force-text-segment-alignment-to-0x08000000-for-i386-.patch +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | From 3c6f8d0e3c0694f79244ec6ad5ad9ba3ca26bc0a Mon Sep 17 00:00:00 2001 | ||
2 | From: Yang Shi <yang.shi@linaro.org> | ||
3 | Date: Mon, 7 Dec 2015 14:12:13 -0800 | ||
4 | Subject: [PATCH] Force text segment alignment to 0x08000000 for i386 with gold | ||
5 | linker | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | |||
9 | When build libhugetlbfs tests with gold linker for i386, the below error occurs: | ||
10 | |||
11 | i586-oe-linux-gcc -m32 -march=i586 -Wl,-O1 -Wl,--hash-style=gnu | ||
12 | -Wl,--as-needed | ||
13 | --sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86 -I.. | ||
14 | -O2 | ||
15 | -Wall -g -o obj32/linkhuge_rw.o -c linkhuge_rw.c | ||
16 | | i586-oe-linux-gcc -m32 -march=i586 -Wl,-O1 -Wl,--hash-style=gnu | ||
17 | -Wl,--as-needed | ||
18 | --sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86 | ||
19 | -B./obj32 | ||
20 | -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,noexecstack -ldl | ||
21 | -L../obj32 | ||
22 | -o obj32/linkhuge_rw -Wl,--no-as-needed -lpthread -ldl -lhugetlbfs_privutils | ||
23 | -Wl,--hugetlbfs-align obj32/linkhuge_rw.o obj32/testutils.o | ||
24 | | i586-oe-linux-ld: internal error in do_write, at | ||
25 | /home/jenkins/oe/world/shr-core/tmp-glibc/work/x86_64-oe-linux/binutils-cross-i586/2.25-r0/git/gold/output.cc:464 | ||
26 | | collect2: error: ld returned 1 exit status | ||
27 | |||
28 | But, it works well with GNU linker. --hugetlbfs-align flag passes | ||
29 | "-zcommon-page-size=$SLICE_SIZE -zmax-page-size=$SLICE_SIZE", that are supported by gold linker too. | ||
30 | But, it looks gold linker deal with them in a different way from gnu linker for i586. | ||
31 | |||
32 | The readelf shows the below result with GNU linker: | ||
33 | |||
34 | Elf file type is EXEC (Executable file) | ||
35 | Entry point 0x8048fbd | ||
36 | There are 8 program headers, starting at offset 52 | ||
37 | |||
38 | Program Headers: | ||
39 | Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align | ||
40 | PHDR 0x000034 0x08000034 0x08000034 0x00100 0x00100 R E 0x4 | ||
41 | INTERP 0x048134 0x08048134 0x08048134 0x00013 0x00013 R 0x1 | ||
42 | [Requesting program interpreter: /lib/ld-linux.so.2] | ||
43 | LOAD 0x000000 0x08000000 0x08000000 0x5a5bc 0x5a5bc R E 0x400000 | ||
44 | LOAD 0x05a5bc 0x0845a5bc 0x0845a5bc 0x1028c 0x202cc RW 0x400000 | ||
45 | DYNAMIC 0x05a5d0 0x0845a5d0 0x0845a5d0 0x000e8 0x000e8 RW 0x4 | ||
46 | NOTE 0x048148 0x08048148 0x08048148 0x00044 0x00044 R 0x4 | ||
47 | GNU_EH_FRAME 0x059e5c 0x08059e5c 0x08059e5c 0x0009c 0x0009c R 0x4 | ||
48 | GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 | ||
49 | |||
50 | "--relax" linker option doesn't solve this problem. | ||
51 | Forced textsegment alignment to 0x08000000 with gold linker, the build will pass and | ||
52 | readelf shows the same result with GNU linker: | ||
53 | |||
54 | Elf file type is EXEC (Executable file) | ||
55 | Entry point 0x8048fbd | ||
56 | There are 8 program headers, starting at offset 52 | ||
57 | |||
58 | Program Headers: | ||
59 | Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align | ||
60 | PHDR 0x000034 0x08000034 0x08000034 0x00100 0x00100 R E 0x4 | ||
61 | INTERP 0x048134 0x08048134 0x08048134 0x00013 0x00013 R 0x1 | ||
62 | [Requesting program interpreter: /lib/ld-linux.so.2] | ||
63 | LOAD 0x000000 0x08000000 0x08000000 0x5a5bc 0x5a5bc R E 0x400000 | ||
64 | LOAD 0x05a5bc 0x0845a5bc 0x0845a5bc 0x1028c 0x202cc RW 0x400000 | ||
65 | DYNAMIC 0x05a5d0 0x0845a5d0 0x0845a5d0 0x000e8 0x000e8 RW 0x4 | ||
66 | NOTE 0x048148 0x08048148 0x08048148 0x00044 0x00044 R 0x4 | ||
67 | GNU_EH_FRAME 0x059e5c 0x08059e5c 0x08059e5c 0x0009c 0x0009c R 0x4 | ||
68 | GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 | ||
69 | |||
70 | The fix just have impact on hugelink_rw test case, which needs --hugetlbfs-align flag. | ||
71 | |||
72 | Signed-off-by: Yang Shi <yang.shi@linaro.org> | ||
73 | Signed-off-by: Eric B Munson <emunson@mgebm.net> | ||
74 | --- | ||
75 | ld.hugetlbfs | 1 + | ||
76 | 1 file changed, 1 insertion(+) | ||
77 | |||
78 | diff --git a/ld.hugetlbfs b/ld.hugetlbfs | ||
79 | index 4417442..32bc6fb 100755 | ||
80 | --- a/ld.hugetlbfs | ||
81 | +++ b/ld.hugetlbfs | ||
82 | @@ -98,6 +98,7 @@ if [ "$HTLB_ALIGN" == "slice" ]; then | ||
83 | # otherwise it will be NULL. | ||
84 | case "$EMU" in | ||
85 | armelf*_linux_eabi) HTLBOPTS="$HTLBOPTS -Ttext-segment=$SLICE_SIZE" ;; | ||
86 | + elf_i386) HTLBOPTS="$HTLBOPTS -Ttext-segment=0x08000000" ;; | ||
87 | esac | ||
88 | fi | ||
89 | |||
90 | -- | ||
91 | 2.0.2 | ||
92 | |||
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb index 14c909e75..66fd8e21d 100644 --- a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb | |||
@@ -3,14 +3,14 @@ HOMEPAGE = "https://github.com/libhugetlbfs/libhugetlbfs" | |||
3 | LICENSE = "LGPLv2.1" | 3 | LICENSE = "LGPLv2.1" |
4 | LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1" | 4 | LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1" |
5 | 5 | ||
6 | DEPENDS = "sysfsutils perl" | 6 | DEPENDS = "sysfsutils" |
7 | RDEPENDS_${PN} += "bash perl python python-io python-lang python-subprocess python-resource ${PN}-perl" | 7 | RDEPENDS_${PN} += "bash python python-io python-lang python-subprocess python-resource" |
8 | RDEPENDS_${PN}-tests += "bash" | 8 | RDEPENDS_${PN}-tests += "bash" |
9 | 9 | ||
10 | PV = "2.20" | 10 | PV = "2.21" |
11 | PE = "1" | 11 | PE = "1" |
12 | 12 | ||
13 | SRCREV = "e44180072b796c0e28e53c4d01ef6279caaa2a99" | 13 | SRCREV = "73d06e69108f231696e9c5c44f4b42690fc5d752" |
14 | SRC_URI = " \ | 14 | SRC_URI = " \ |
15 | git://github.com/libhugetlbfs/libhugetlbfs.git;protocol=https \ | 15 | git://github.com/libhugetlbfs/libhugetlbfs.git;protocol=https \ |
16 | file://skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch \ | 16 | file://skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch \ |
@@ -18,7 +18,6 @@ SRC_URI = " \ | |||
18 | file://tests-Makefile-install-static-4G-edge-testcases.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 \ | 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 \ | 20 | file://libhugetlbfs-elf_i386-avoid-search-host-library-path.patch \ |
21 | file://Force-text-segment-alignment-to-0x08000000-for-i386-.patch \ | ||
22 | file://0001-include-stddef.h-for-ptrdiff_t.patch \ | 21 | file://0001-include-stddef.h-for-ptrdiff_t.patch \ |
23 | file://0002-Mark-glibc-specific-code-so.patch \ | 22 | file://0002-Mark-glibc-specific-code-so.patch \ |
24 | file://0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch \ | 23 | file://0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch \ |
@@ -51,14 +50,6 @@ do_configure() { | |||
51 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then | 50 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then |
52 | sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile | 51 | sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile |
53 | fi | 52 | fi |
54 | |||
55 | # fixup perl module directory hardcoded to perl5 | ||
56 | sed -i 's/perl5/perl/g' Makefile | ||
57 | |||
58 | # fixup to install perl module under $(LIBDIR)/perl/${@get_perl_version(d)}/TLBC | ||
59 | # to avoid below error | ||
60 | # Can't locate TLBC/OpCollect.pm in @INC | ||
61 | sed -i '/^PMDIR/ s:perl:perl/${@get_perl_version(d)}:g' Makefile | ||
62 | } | 53 | } |
63 | 54 | ||
64 | do_install() { | 55 | do_install() { |
@@ -69,11 +60,10 @@ do_install() { | |||
69 | } | 60 | } |
70 | 61 | ||
71 | 62 | ||
72 | PACKAGES =+ "${PN}-perl ${PN}-tests " | 63 | PACKAGES =+ "${PN}-tests " |
73 | FILES_${PN} += "${libdir}/*.so" | 64 | FILES_${PN} += "${libdir}/*.so" |
74 | FILES_${PN}-dev = "${includedir}" | 65 | FILES_${PN}-dev = "${includedir}" |
75 | FILES_${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug" | 66 | FILES_${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug" |
76 | FILES_${PN}-perl = "${libdir}/perl" | ||
77 | FILES_${PN}-tests += "${libdir}/libhugetlbfs/tests" | 67 | FILES_${PN}-tests += "${libdir}/libhugetlbfs/tests" |
78 | 68 | ||
79 | INSANE_SKIP_${PN} = "dev-so" | 69 | INSANE_SKIP_${PN} = "dev-so" |