/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch

https://gitlab.com/actawithamana/poky · Patch · 147 lines · 132 code · 15 blank · 0 comment · 0 complexity · e3f7912ff40021ab2fcf4cde3c06e418 MD5 · raw file

  1. From 53acddddf1b324e06af886ee4639b774e5c8c8bc Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Thu, 7 Jan 2016 18:19:03 +0000
  4. Subject: [PATCH 04/32] build: Add option to select libc implementation
  5. There are more than glibc for C library implementation available on
  6. linux now a days, uclibc cloaked like glibc but musl e.g. is very
  7. different and does not implement all GNU extentions
  8. Disable tests specifically not building _yet_ on musl based systems
  9. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  10. ---
  11. Makefile | 5 +++++
  12. testcases/kernel/Makefile | 5 ++++-
  13. testcases/kernel/sched/Makefile | 4 +++-
  14. testcases/kernel/syscalls/Makefile | 5 +++++
  15. testcases/network/nfsv4/acl/Makefile | 4 ++++
  16. testcases/network/rpc/basic_tests/Makefile | 5 +++++
  17. testcases/realtime/func/pi-tests/Makefile | 4 ++++
  18. testcases/realtime/stress/pi-tests/Makefile | 5 +++++
  19. 8 files changed, 35 insertions(+), 2 deletions(-)
  20. diff --git a/Makefile b/Makefile
  21. index 297f8e7..906b280 100644
  22. --- a/Makefile
  23. +++ b/Makefile
  24. @@ -49,6 +49,11 @@ SKIP_IDCHECK ?= 0
  25. UCLINUX ?= 0
  26. export UCLINUX
  27. +# System C library implementation (glibc,uclibc,musl etc.)
  28. +# default to glibc if not set
  29. +LIBC ?= glibc
  30. +export LIBC
  31. +
  32. # CLEAN_TARGETS: Targets which exist solely in clean.
  33. # COMMON_TARGETS: Targets which exist in all, clean, and install.
  34. # INSTALL_TARGETS: Targets which exist in clean and install (contains
  35. diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
  36. index 50a12fa..4f1987f 100644
  37. --- a/testcases/kernel/Makefile
  38. +++ b/testcases/kernel/Makefile
  39. @@ -47,13 +47,16 @@ SUBDIRS += connectors \
  40. logging \
  41. mem \
  42. numa \
  43. - pty \
  44. sched \
  45. security \
  46. timers \
  47. tracing \
  48. module \
  49. +ifneq ($(LIBC),musl)
  50. +SUBDIRS += pty
  51. +endif
  52. +
  53. ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes)
  54. SUBDIRS += power_management
  55. endif
  56. diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile
  57. index 6245ed0..aa4eb7f 100644
  58. --- a/testcases/kernel/sched/Makefile
  59. +++ b/testcases/kernel/sched/Makefile
  60. @@ -23,5 +23,7 @@
  61. top_srcdir ?= ../../..
  62. include $(top_srcdir)/include/mk/env_pre.mk
  63. -
  64. +ifeq ($(LIBC),musl)
  65. + FILTER_OUT_DIRS += process_stress
  66. +endif
  67. include $(top_srcdir)/include/mk/generic_trunk_target.mk
  68. diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
  69. index 8acb395..b749126 100644
  70. --- a/testcases/kernel/syscalls/Makefile
  71. +++ b/testcases/kernel/syscalls/Makefile
  72. @@ -28,5 +28,10 @@ ifeq ($(UCLINUX),1)
  73. FILTER_OUT_DIRS += capget capset chmod chown clone fork getcontext llseek \
  74. mincore mprotect nftw profil remap_file_pages sbrk
  75. endif
  76. +ifeq ($(LIBC),musl)
  77. +FILTER_OUT_DIRS += confstr fmtmsg getcontext ioctl mallopt profil \
  78. + rt_sigsuspend setdomainname sethostname sigsuspend \
  79. + ustat
  80. +endif
  81. include $(top_srcdir)/include/mk/generic_trunk_target.mk
  82. diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile
  83. index 8bc78c2..c36cf50 100644
  84. --- a/testcases/network/nfsv4/acl/Makefile
  85. +++ b/testcases/network/nfsv4/acl/Makefile
  86. @@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
  87. LDLIBS += $(ACL_LIBS)
  88. +ifeq ($(LIBC),musl)
  89. +FILTER_OUT_MAKE_TARGETS := acl1
  90. +endif
  91. +
  92. include $(top_srcdir)/include/mk/generic_leaf_target.mk
  93. diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile
  94. index 3160813..9bdf5d0 100644
  95. --- a/testcases/network/rpc/basic_tests/Makefile
  96. +++ b/testcases/network/rpc/basic_tests/Makefile
  97. @@ -23,4 +23,9 @@
  98. top_srcdir ?= ../../../..
  99. include $(top_srcdir)/include/mk/env_pre.mk
  100. +
  101. +ifeq ($(LIBC),musl)
  102. +FILTER_OUT_DIRS += rpc01
  103. +endif
  104. +
  105. include $(top_srcdir)/include/mk/generic_trunk_target.mk
  106. diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile
  107. index 7a7a57a..5808866 100644
  108. --- a/testcases/realtime/func/pi-tests/Makefile
  109. +++ b/testcases/realtime/func/pi-tests/Makefile
  110. @@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk
  111. include $(abs_srcdir)/../../config.mk
  112. MAKE_TARGETS := testpi-0 testpi-1 testpi-2 testpi-4 testpi-5 testpi-6 testpi-7 sbrk_mutex
  113. +ifeq ($(LIBC),musl)
  114. +FILTER_OUT_MAKE_TARGETS := testpi-5 testpi-6 sbrk_mutex
  115. +endif
  116. +
  117. include $(top_srcdir)/include/mk/generic_leaf_target.mk
  118. diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile
  119. index 5edc3b4..aa5987a 100644
  120. --- a/testcases/realtime/stress/pi-tests/Makefile
  121. +++ b/testcases/realtime/stress/pi-tests/Makefile
  122. @@ -24,4 +24,9 @@ top_srcdir ?= ../../../..
  123. include $(top_srcdir)/include/mk/env_pre.mk
  124. include $(abs_srcdir)/../../config.mk
  125. +
  126. +ifeq ($(LIBC),musl)
  127. +FILTER_OUT_MAKE_TARGETS := testpi-3
  128. +endif
  129. +
  130. include $(top_srcdir)/include/mk/generic_leaf_target.mk
  131. --
  132. 2.7.0