util-linux-libs.mk 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ################################################################################
  2. #
  3. # util-linux-libs
  4. #
  5. ################################################################################
  6. # Please keep this file as similar as possible to util-linux.mk
  7. UTIL_LINUX_LIBS_VERSION = $(UTIL_LINUX_VERSION)
  8. UTIL_LINUX_LIBS_SOURCE = $(UTIL_LINUX_SOURCE)
  9. UTIL_LINUX_LIBS_SITE = $(UTIL_LINUX_SITE)
  10. UTIL_LINUX_LIBS_DL_SUBDIR = $(UTIL_LINUX_DL_SUBDIR)
  11. UTIL_LINUX_LIBS_CPE_ID_VENDOR = $(UTIL_LINUX_CPE_ID_VENDOR)
  12. UTIL_LINUX_LIBS_CPE_ID_PRODUCT = $(UTIL_LINUX_CPE_ID_PRODUCT)
  13. # README.licensing claims that some files are GPL-2.0 only, but this is not
  14. # true. Some files are GPL-3.0+ but only in tests and optionally in hwclock
  15. # (but we disable that option). rfkill uses an ISC-style license.
  16. UTIL_LINUX_LIBS_LICENSE = LGPL-2.1+ (libblkid, libfdisk, libmount), BSD-3-Clause (libuuid)
  17. UTIL_LINUX_LIBS_LICENSE_FILES = README.licensing \
  18. Documentation/licenses/COPYING.BSD-3-Clause \
  19. Documentation/licenses/COPYING.LGPL-2.1-or-later
  20. UTIL_LINUX_LIBS_INSTALL_STAGING = YES
  21. UTIL_LINUX_LIBS_DEPENDENCIES = \
  22. host-pkgconf \
  23. $(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt) \
  24. $(TARGET_NLS_DEPENDENCIES)
  25. # --disable-year2038: tells the configure script to not abort if the
  26. # system is not Y2038 compliant. util-linux-libs will support year2038
  27. # if the system is compliant even with this option passed
  28. UTIL_LINUX_LIBS_CONF_OPTS += \
  29. --disable-rpath \
  30. --disable-makeinstall-chown \
  31. --disable-year2038
  32. UTIL_LINUX_LIBS_LINK_LIBS = $(TARGET_NLS_LIBS)
  33. # Prevent the installation from attempting to move shared libraries from
  34. # ${usrlib_execdir} (/usr/lib) to ${libdir} (/lib), since both paths are
  35. # the same when merged usr is in use.
  36. ifeq ($(BR2_ROOTFS_MERGED_USR),y)
  37. UTIL_LINUX_LIBS_CONF_OPTS += --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib
  38. endif
  39. # systemd depends on util-linux-libs so we disable systemd support
  40. UTIL_LINUX_LIBS_CONF_OPTS += \
  41. --without-systemd \
  42. --with-systemdsystemunitdir=no
  43. # systemd/eudev depend on util-linux-libs so we disable udev support
  44. UTIL_LINUX_LIBS_CONF_OPTS += --without-udev
  45. # No libs use wchar
  46. UTIL_LINUX_LIBS_CONF_OPTS += --disable-widechar
  47. # No libs use ncurses
  48. UTIL_LINUX_LIBS_CONF_OPTS += --without-ncursesw --without-ncurses
  49. # workaround for static_assert on uclibc-ng < 1.0.42
  50. UTIL_LINUX_LIBS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert"
  51. # Unfortunately, the util-linux does LIBS="" at the end of its
  52. # configure script. So we have to pass the proper LIBS value when
  53. # calling the configure script to make configure tests pass properly,
  54. # and then pass it again at build time.
  55. UTIL_LINUX_LIBS_CONF_ENV += LIBS="$(UTIL_LINUX_LIBS_LINK_LIBS)"
  56. UTIL_LINUX_LIBS_MAKE_OPTS += LIBS="$(UTIL_LINUX_LIBS_LINK_LIBS)"
  57. # libmount optionally uses selinux
  58. ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT)$(BR2_PACKAGE_LIBSELINUX),yy)
  59. UTIL_LINUX_LIBS_DEPENDENCIES += libselinux
  60. UTIL_LINUX_LIBS_CONF_OPTS += --with-selinux
  61. else
  62. UTIL_LINUX_LIBS_CONF_OPTS += --without-selinux
  63. endif
  64. # Disable utilities
  65. UTIL_LINUX_LIBS_CONF_OPTS += \
  66. --disable-all-programs \
  67. $(if $(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),--enable-libblkid,--disable-libblkid) \
  68. $(if $(BR2_PACKAGE_UTIL_LINUX_LIBFDISK),--enable-libfdisk,--disable-libfdisk) \
  69. $(if $(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),--enable-libmount,--disable-libmount) \
  70. $(if $(BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS),--enable-libsmartcols,--disable-libsmartcols) \
  71. $(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid)
  72. # libmount python bindings are separate, will be installed by full util-linux
  73. UTIL_LINUX_LIBS_CONF_OPTS += --without-python --disable-pylibmount
  74. # No libs use readline
  75. UTIL_LINUX_LIBS_CONF_OPTS += --without-readline
  76. # No libs use audit
  77. UTIL_LINUX_LIBS_CONF_OPTS += --without-audit
  78. # No libs use libmagic
  79. UTIL_LINUX_LIBS_CONF_OPTS += --without-libmagic
  80. $(eval $(autotools-package))