libhugetlbfs_git.bb 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. DEPENDS = "sysfsutils"
  6. RDEPENDS_${PN} += "bash python3-core"
  7. RDEPENDS_${PN}-tests += "bash python3-core"
  8. PV = "2.23"
  9. PE = "1"
  10. SRCREV = "6b126a4d7da9490fa40fe7e1b962edcb939feddc"
  11. SRC_URI = " \
  12. git://github.com/libhugetlbfs/libhugetlbfs.git;protocol=https \
  13. file://skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch \
  14. file://libhugetlbfs-avoid-search-host-library-path-for-cros.patch \
  15. file://tests-Makefile-install-static-4G-edge-testcases.patch \
  16. file://0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch \
  17. file://libhugetlbfs-elf_i386-avoid-search-host-library-path.patch \
  18. file://0001-include-stddef.h-for-ptrdiff_t.patch \
  19. file://0002-Mark-glibc-specific-code-so.patch \
  20. file://0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch \
  21. file://0004-shm.c-Mark-glibc-specific-changes-so.patch \
  22. file://0005-Include-dirent.h-for-ino_t.patch \
  23. file://0006-include-limits.h-for-PATH_MAX.patch \
  24. file://0001-huge_page_setup_helper-use-python3-interpreter.patch \
  25. file://0001-Revert-ld.hugetlbfs-fix-Ttext-segment-argument-on-AA.patch \
  26. "
  27. UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
  28. S = "${WORKDIR}/git"
  29. COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
  30. LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
  31. LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
  32. LIBHUGETLBFS_ARCH_powerpc = "ppc"
  33. LIBHUGETLBFS_ARCH_powerpc64 = "ppc64"
  34. LIBHUGETLBFS_ARCH_powerpc64le = "ppc64"
  35. EXTRA_OEMAKE = "'ARCH=${LIBHUGETLBFS_ARCH}' 'OPT=${CFLAGS}' 'CC=${CC}' ${LIBARGS} BUILDTYPE=NATIVEONLY V=2"
  36. PARALLEL_MAKE = ""
  37. CFLAGS += "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -g0"
  38. export HUGETLB_LDSCRIPT_PATH="${S}/ldscripts"
  39. TARGET_CC_ARCH += "${LDFLAGS}"
  40. #The CUSTOM_LDSCRIPTS doesn't work with the gold linker
  41. inherit cpan-base
  42. do_configure() {
  43. if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
  44. sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile
  45. fi
  46. }
  47. do_install() {
  48. oe_runmake PREFIX=${prefix} DESTDIR=${D} \
  49. INST_TESTSDIR32=${libdir}/libhugetlbfs/tests \
  50. INST_TESTSDIR64=${libdir}/libhugetlbfs/tests \
  51. install-tests
  52. }
  53. PACKAGES =+ "${PN}-tests "
  54. FILES_${PN} += "${libdir}/*.so"
  55. FILES_${PN}-dev = "${includedir}"
  56. FILES_${PN}-dbg += "${libdir}/libhugetlbfs/tests/obj32/.debug ${libdir}/libhugetlbfs/tests/obj64/.debug"
  57. FILES_${PN}-tests += "${libdir}/libhugetlbfs/tests"
  58. INSANE_SKIP_${PN} = "dev-so"
  59. INHIBIT_PACKAGE_STRIP = "1"
  60. INHIBIT_PACKAGE_DEBUG_SPLIT = "1"