blob: a63494a62dc070e2688fe96ec2f6e9aa44adc5ce [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
6DEPENDS = "sysfsutils perl"
Patrick Williamsddad1a12017-02-23 20:36:32 -06007RDEPENDS_${PN} += "bash perl python python-io python-lang python-subprocess python-resource ${PN}-perl"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05008RDEPENDS_${PN}-tests += "bash"
9
Brad Bishop6e60e8b2018-02-01 10:27:11 -050010PV = "2.20"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050011PE = "1"
12
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013SRCREV = "e44180072b796c0e28e53c4d01ef6279caaa2a99"
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 \
Patrick Williamsddad1a12017-02-23 20:36:32 -060021 file://Force-text-segment-alignment-to-0x08000000-for-i386-.patch \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050022"
23
24S = "${WORKDIR}/git"
25
Patrick Williamsddad1a12017-02-23 20:36:32 -060026COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050027
28LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
29LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
30LIBHUGETLBFS_ARCH_powerpc = "ppc"
31LIBHUGETLBFS_ARCH_powerpc64 = "ppc64"
32EXTRA_OEMAKE = "'ARCH=${LIBHUGETLBFS_ARCH}' 'OPT=${CFLAGS}' 'CC=${CC}' ${LIBARGS} BUILDTYPE=NATIVEONLY V=2"
33PARALLEL_MAKE = ""
34CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0"
35
Brad Bishopd7bf8c12018-02-25 22:55:05 -050036export HUGETLB_LDSCRIPT_PATH="${S}/ldscripts"
37
Patrick Williamsb48b7b42016-08-17 15:04:38 -050038TARGET_CC_ARCH += "${LDFLAGS}"
39
40#The CUSTOM_LDSCRIPTS doesn't work with the gold linker
Patrick Williamsddad1a12017-02-23 20:36:32 -060041inherit cpan-base
Patrick Williamsb48b7b42016-08-17 15:04:38 -050042do_configure() {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050043 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
Patrick Williamsb48b7b42016-08-17 15:04:38 -050044 sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile
45 fi
46
47 # fixup perl module directory hardcoded to perl5
48 sed -i 's/perl5/perl/g' Makefile
Patrick Williamsddad1a12017-02-23 20:36:32 -060049
50 # fixup to install perl module under $(LIBDIR)/perl/${@get_perl_version(d)}/TLBC
51 # to avoid below error
52 # Can't locate TLBC/OpCollect.pm in @INC
53 sed -i '/^PMDIR/ s:perl:perl/${@get_perl_version(d)}:g' Makefile
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
64PACKAGES =+ "${PN}-perl ${PN}-tests "
65FILES_${PN} += "${libdir}/*.so"
66FILES_${PN}-dev = "${includedir}"
67FILES_${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug"
68FILES_${PN}-perl = "${libdir}/perl"
69FILES_${PN}-tests += "${libdir}/libhugetlbfs/tests"
70
71INSANE_SKIP_${PN} = "dev-so"
72
73INHIBIT_PACKAGE_STRIP = "1"
74INHIBIT_PACKAGE_DEBUG_SPLIT = "1"