uclibc-ng-test.mk 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ################################################################################
  2. #
  3. # uclibc-ng-test
  4. #
  5. ################################################################################
  6. UCLIBC_NG_TEST_VERSION = c64d6ac77f0e745c70e76024212c72e4bbe2091a
  7. UCLIBC_NG_TEST_SITE = git://uclibc-ng.org/git/uclibc-ng-test
  8. UCLIBC_NG_TEST_LICENSE = LGPL-2.1+
  9. UCLIBC_NG_TEST_LICENSE_FILES = COPYING.LIB
  10. # the math tests are recently synced from glibc and need more adaption before
  11. # regular testing is possible
  12. UCLIBC_NG_TEST_MAKE_ENV += NO_MATH=1
  13. # obsolete encrypt and setkey functions are not available since glibc 2.28
  14. ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
  15. UCLIBC_NG_TEST_MAKE_ENV += NO_CRYPT=1
  16. endif
  17. # locale tests are not compatible with musl, yet
  18. ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
  19. UCLIBC_NG_TEST_MAKE_ENV += NO_LOCALE=1
  20. endif
  21. ifeq ($(BR2_USE_WCHAR),)
  22. UCLIBC_NG_TEST_MAKE_ENV += NO_WCHAR=1
  23. endif
  24. ifeq ($(BR2_ENABLE_LOCALE),)
  25. UCLIBC_NG_TEST_MAKE_ENV += NO_LOCALE=1
  26. endif
  27. ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
  28. UCLIBC_NG_TEST_MAKE_ENV += NO_TLS=1 NO_THREADS=1
  29. endif
  30. ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),)
  31. UCLIBC_NG_TEST_MAKE_ENV += NO_TLS=1 NO_NPTL=1
  32. endif
  33. # most NPTL/TLS tests use dlopen
  34. ifeq ($(BR2_STATIC_LIBS),y)
  35. UCLIBC_NG_TEST_MAKE_ENV += NO_TLS=1 NO_NPTL=1 NO_DL=1
  36. endif
  37. # no TLS macros available
  38. ifeq ($(BR2_nds32)$(BR2_s390x),y)
  39. UCLIBC_NG_TEST_MAKE_ENV += NO_TLS=1
  40. endif
  41. # to execute tests in a deterministic order, call test_gen separately
  42. define UCLIBC_NG_TEST_BUILD_CMDS
  43. $(TARGET_MAKE_ENV) $(UCLIBC_NG_TEST_MAKE_ENV) $(MAKE) -C $(@D) \
  44. CC="$(TARGET_CC)" \
  45. UCLIBC_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
  46. UCLIBC_EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
  47. test_compile
  48. $(TARGET_MAKE_ENV) $(UCLIBC_NG_TEST_MAKE_ENV) $(MAKE1) -C $(@D) \
  49. CC="$(TARGET_CC)" \
  50. UCLIBC_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
  51. test_gen
  52. endef
  53. define UCLIBC_NG_TEST_INSTALL_TARGET_CMDS
  54. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
  55. endef
  56. $(eval $(generic-package))