blob: e66db1a090abc5617e3d6101e546648383e3a13b [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"
7RDEPENDS_${PN} += "bash python python-io python-lang python-subprocess python-resource"
Brad Bishop868407c2019-11-04 13:24:47 -05008RDEPENDS_${PN}-tests += "bash python3-core"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05009
Brad Bishop868407c2019-11-04 13:24:47 -050010PV = "2.22"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050011PE = "1"
12
Brad Bishop868407c2019-11-04 13:24:47 -050013SRCREV = "e6499ff92b4a7dcffbd131d1f5d24933e48c3f20"
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 \
Brad Bishop0e2770c2020-01-21 07:31:46 -050027 file://0001-tests-add-explicit-permissions-to-open-call.patch \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050028"
29
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080030UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
31
Patrick Williamsb48b7b42016-08-17 15:04:38 -050032S = "${WORKDIR}/git"
33
Patrick Williamsddad1a12017-02-23 20:36:32 -060034COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050035
36LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
37LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
38LIBHUGETLBFS_ARCH_powerpc = "ppc"
39LIBHUGETLBFS_ARCH_powerpc64 = "ppc64"
40EXTRA_OEMAKE = "'ARCH=${LIBHUGETLBFS_ARCH}' 'OPT=${CFLAGS}' 'CC=${CC}' ${LIBARGS} BUILDTYPE=NATIVEONLY V=2"
41PARALLEL_MAKE = ""
42CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0"
43
Brad Bishopd7bf8c12018-02-25 22:55:05 -050044export HUGETLB_LDSCRIPT_PATH="${S}/ldscripts"
45
Patrick Williamsb48b7b42016-08-17 15:04:38 -050046TARGET_CC_ARCH += "${LDFLAGS}"
47
48#The CUSTOM_LDSCRIPTS doesn't work with the gold linker
Patrick Williamsddad1a12017-02-23 20:36:32 -060049inherit cpan-base
Patrick Williamsb48b7b42016-08-17 15:04:38 -050050do_configure() {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050051 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
Patrick Williamsb48b7b42016-08-17 15:04:38 -050052 sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile
53 fi
Patrick Williamsb48b7b42016-08-17 15:04:38 -050054}
55
56do_install() {
57 oe_runmake PREFIX=${prefix} DESTDIR=${D} \
58 INST_TESTSDIR32=${libdir}/libhugetlbfs/tests \
59 INST_TESTSDIR64=${libdir}/libhugetlbfs/tests \
60 install-tests
61}
62
63
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080064PACKAGES =+ "${PN}-tests "
Patrick Williamsb48b7b42016-08-17 15:04:38 -050065FILES_${PN} += "${libdir}/*.so"
66FILES_${PN}-dev = "${includedir}"
67FILES_${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050068FILES_${PN}-tests += "${libdir}/libhugetlbfs/tests"
69
70INSANE_SKIP_${PN} = "dev-so"
71
72INHIBIT_PACKAGE_STRIP = "1"
73INHIBIT_PACKAGE_DEBUG_SPLIT = "1"