blob: cfdf42065098d172e1a82d33c033924145dc7533 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "A library which provides easy access to huge pages of memory"
2HOMEPAGE = "https://github.com/libhugetlbfs/libhugetlbfs"
3LICENSE = "LGPLv2.1"
4LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1"
5
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08006DEPENDS = "sysfsutils"
Patrick Williams213cb262021-08-07 19:21:33 -05007RDEPENDS:${PN} += "bash python3-core"
8RDEPENDS:${PN}-tests += "bash python3-core"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05009
Andrew Geisslerd688a012020-09-18 13:36:00 -050010PV = "2.23"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050011PE = "1"
12
Andrew Geisslerd688a012020-09-18 13:36:00 -050013SRCREV = "6b126a4d7da9490fa40fe7e1b962edcb939feddc"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050014SRC_URI = " \
15 git://github.com/libhugetlbfs/libhugetlbfs.git;protocol=https \
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 \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080021 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 \
Andrew Geissler82c905d2020-04-13 13:39:40 -050027 file://0001-huge_page_setup_helper-use-python3-interpreter.patch \
Andrew Geisslera2681d92020-10-16 10:17:07 -050028 file://0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch \
Andrew Geisslerac970dd2021-02-12 15:32:45 -060029 file://0001-tests-makefile-Append-CPPFLAGS-rather-then-override.patch \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050030"
31
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080032UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
33
Patrick Williamsb48b7b42016-08-17 15:04:38 -050034S = "${WORKDIR}/git"
35
Patrick Williamsddad1a12017-02-23 20:36:32 -060036COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050037
38LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
39LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
Patrick Williams213cb262021-08-07 19:21:33 -050040LIBHUGETLBFS_ARCH:powerpc = "ppc"
41LIBHUGETLBFS_ARCH:powerpc64 = "ppc64"
42LIBHUGETLBFS_ARCH:powerpc64le = "ppc64le"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050043EXTRA_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
Brad Bishopd7bf8c12018-02-25 22:55:05 -050047export HUGETLB_LDSCRIPT_PATH="${S}/ldscripts"
48
Patrick Williamsb48b7b42016-08-17 15:04:38 -050049TARGET_CC_ARCH += "${LDFLAGS}"
50
51#The CUSTOM_LDSCRIPTS doesn't work with the gold linker
Patrick Williamsddad1a12017-02-23 20:36:32 -060052inherit cpan-base
Patrick Williamsb48b7b42016-08-17 15:04:38 -050053do_configure() {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050054 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
Patrick Williamsb48b7b42016-08-17 15:04:38 -050055 sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile
56 fi
Patrick Williamsb48b7b42016-08-17 15:04:38 -050057}
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
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080067PACKAGES =+ "${PN}-tests "
Patrick Williams213cb262021-08-07 19:21:33 -050068FILES:${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"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050072
Patrick Williams213cb262021-08-07 19:21:33 -050073INSANE_SKIP:${PN} = "dev-so"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050074
75INHIBIT_PACKAGE_STRIP = "1"
76INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
Patrick Williams213cb262021-08-07 19:21:33 -050077
78# see https://github.com/libhugetlbfs/libhugetlbfs/issues/52
79PNBLACKLIST[libhugetlbfs] ?= "Needs porting to glibc 2.34+"