Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | SUMMARY = "A library which provides easy access to huge pages of memory" |
| 2 | HOMEPAGE = "https://github.com/libhugetlbfs/libhugetlbfs" |
| 3 | LICENSE = "LGPLv2.1" |
| 4 | LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1" |
| 5 | |
| 6 | DEPENDS = "sysfsutils perl" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 7 | RDEPENDS_${PN} += "bash perl python python-io python-lang python-subprocess python-resource ${PN}-perl" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 8 | RDEPENDS_${PN}-tests += "bash" |
| 9 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 10 | PV = "2.20" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 11 | PE = "1" |
| 12 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 13 | SRCREV = "e44180072b796c0e28e53c4d01ef6279caaa2a99" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 14 | SRC_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 Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 21 | file://Force-text-segment-alignment-to-0x08000000-for-i386-.patch \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 22 | " |
| 23 | |
| 24 | S = "${WORKDIR}/git" |
| 25 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 26 | COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 27 | |
| 28 | LIBARGS = "LIB32=${baselib} LIB64=${baselib}" |
| 29 | LIBHUGETLBFS_ARCH = "${TARGET_ARCH}" |
| 30 | LIBHUGETLBFS_ARCH_powerpc = "ppc" |
| 31 | LIBHUGETLBFS_ARCH_powerpc64 = "ppc64" |
| 32 | EXTRA_OEMAKE = "'ARCH=${LIBHUGETLBFS_ARCH}' 'OPT=${CFLAGS}' 'CC=${CC}' ${LIBARGS} BUILDTYPE=NATIVEONLY V=2" |
| 33 | PARALLEL_MAKE = "" |
| 34 | CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0" |
| 35 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 36 | export HUGETLB_LDSCRIPT_PATH="${S}/ldscripts" |
| 37 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 38 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 39 | |
| 40 | #The CUSTOM_LDSCRIPTS doesn't work with the gold linker |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 41 | inherit cpan-base |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 42 | do_configure() { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 43 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 44 | 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 Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 49 | |
| 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 Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 54 | } |
| 55 | |
| 56 | do_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 | |
| 64 | PACKAGES =+ "${PN}-perl ${PN}-tests " |
| 65 | FILES_${PN} += "${libdir}/*.so" |
| 66 | FILES_${PN}-dev = "${includedir}" |
| 67 | FILES_${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug" |
| 68 | FILES_${PN}-perl = "${libdir}/perl" |
| 69 | FILES_${PN}-tests += "${libdir}/libhugetlbfs/tests" |
| 70 | |
| 71 | INSANE_SKIP_${PN} = "dev-so" |
| 72 | |
| 73 | INHIBIT_PACKAGE_STRIP = "1" |
| 74 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |