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 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 6 | DEPENDS = "sysfsutils" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 7 | RDEPENDS_${PN} += "bash python3-core" |
Brad Bishop | 868407c | 2019-11-04 13:24:47 -0500 | [diff] [blame] | 8 | RDEPENDS_${PN}-tests += "bash python3-core" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 9 | |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 10 | PV = "2.23" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 11 | PE = "1" |
| 12 | |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 13 | SRCREV = "6b126a4d7da9490fa40fe7e1b962edcb939feddc" |
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 \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 21 | 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 Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 27 | file://0001-huge_page_setup_helper-use-python3-interpreter.patch \ |
Andrew Geissler | a2681d9 | 2020-10-16 10:17:07 -0500 | [diff] [blame] | 28 | file://0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch \ |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame^] | 29 | file://0001-tests-makefile-Append-CPPFLAGS-rather-then-override.patch \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 30 | " |
| 31 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 32 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" |
| 33 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 34 | S = "${WORKDIR}/git" |
| 35 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 36 | COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 37 | |
| 38 | LIBARGS = "LIB32=${baselib} LIB64=${baselib}" |
| 39 | LIBHUGETLBFS_ARCH = "${TARGET_ARCH}" |
| 40 | LIBHUGETLBFS_ARCH_powerpc = "ppc" |
| 41 | LIBHUGETLBFS_ARCH_powerpc64 = "ppc64" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 42 | LIBHUGETLBFS_ARCH_powerpc64le = "ppc64" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 43 | EXTRA_OEMAKE = "'ARCH=${LIBHUGETLBFS_ARCH}' 'OPT=${CFLAGS}' 'CC=${CC}' ${LIBARGS} BUILDTYPE=NATIVEONLY V=2" |
| 44 | PARALLEL_MAKE = "" |
| 45 | CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0" |
| 46 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 47 | export HUGETLB_LDSCRIPT_PATH="${S}/ldscripts" |
| 48 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 49 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 50 | |
| 51 | #The CUSTOM_LDSCRIPTS doesn't work with the gold linker |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 52 | inherit cpan-base |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 53 | do_configure() { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 54 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 55 | sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile |
| 56 | fi |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | do_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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 67 | PACKAGES =+ "${PN}-tests " |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 68 | FILES_${PN} += "${libdir}/*.so" |
| 69 | FILES_${PN}-dev = "${includedir}" |
| 70 | FILES_${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 71 | FILES_${PN}-tests += "${libdir}/libhugetlbfs/tests" |
| 72 | |
| 73 | INSANE_SKIP_${PN} = "dev-so" |
| 74 | |
| 75 | INHIBIT_PACKAGE_STRIP = "1" |
| 76 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |