summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch
blob: b5c25c56a572fb9cab060eba5816461bde32b1a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
From ec282980e6eee96f5b74aba464141f86049263e6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 7 Jan 2016 18:19:03 +0000
Subject: [PATCH] build: Add option to select libc implementation

There are more than glibc for C library implementation available on
linux now a days, uclibc cloaked like glibc but musl e.g. is very
different and does not implement all GNU extentions

Disable tests specifically not building _yet_ on musl based systems

Upstream-Status: Pending

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 Makefile                                    | 5 +++++
 testcases/kernel/Makefile                   | 5 ++++-
 testcases/kernel/sched/Makefile             | 4 +++-
 testcases/kernel/syscalls/Makefile          | 5 +++++
 testcases/network/nfsv4/acl/Makefile        | 4 ++++
 testcases/network/rpc/basic_tests/Makefile  | 5 +++++
 testcases/realtime/func/pi-tests/Makefile   | 4 ++++
 testcases/realtime/stress/pi-tests/Makefile | 5 +++++
 8 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 768ca46..e9d679a 100644
--- a/Makefile
+++ b/Makefile
@@ -41,6 +41,11 @@ vpath %.mk		$(top_srcdir)/mk:$(top_srcdir)/mk/include
 UCLINUX			?= 0
 export UCLINUX
 
+# System C library implementation (glibc,uclibc,musl etc.)
+# default to glibc if not set
+LIBC			?= glibc
+export LIBC
+
 # CLEAN_TARGETS:	Targets which exist solely in clean.
 # COMMON_TARGETS:	Targets which exist in all, clean, and install.
 # INSTALL_TARGETS:	Targets which exist in clean and install (contains
diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
index 39d79c7..24a57d9 100644
--- a/testcases/kernel/Makefile
+++ b/testcases/kernel/Makefile
@@ -49,12 +49,15 @@ SUBDIRS			+= connectors \
 			   logging \
 			   mem \
 			   numa \
-			   pty \
 			   sched \
 			   security \
 			   timers \
 			   tracing \
 
+ifneq ($(LIBC),musl)
+SUBDIRS			+= pty
+endif
+
 ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes)
 SUBDIRS			+= power_management
 endif
diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile
index 6a57d79..74bb933 100644
--- a/testcases/kernel/sched/Makefile
+++ b/testcases/kernel/sched/Makefile
@@ -23,5 +23,7 @@
 top_srcdir		?= ../../..
 
 include $(top_srcdir)/include/mk/env_pre.mk
-
+ifeq ($(LIBC),musl)
+	FILTER_OUT_DIRS += process_stress
+endif
 include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
index 45a00cf..d1becd0 100644
--- a/testcases/kernel/syscalls/Makefile
+++ b/testcases/kernel/syscalls/Makefile
@@ -28,6 +28,11 @@ ifeq ($(UCLINUX),1)
 FILTER_OUT_DIRS	+= capget capset chmod chown clone fork getcontext llseek \
 		   mincore mprotect nftw profil remap_file_pages sbrk
 endif
+ifeq ($(LIBC),musl)
+FILTER_OUT_DIRS	+= confstr fmtmsg getcontext ioctl mallopt profil \
+		   rt_sigsuspend setdomainname sethostname sigsuspend \
+		   ustat
+endif
 
 ifeq ($(UCLIBC),1)
 FILTER_OUT_DIRS	+= profil
diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile
index 8c55a6b..f7cda62 100644
--- a/testcases/network/nfsv4/acl/Makefile
+++ b/testcases/network/nfsv4/acl/Makefile
@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
 
 LDLIBS			+= $(ACL_LIBS)
 
+ifeq ($(LIBC),musl)
+FILTER_OUT_MAKE_TARGETS	:= acl1
+endif
+
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile
index 66e9d56..ea8eb8a 100644
--- a/testcases/network/rpc/basic_tests/Makefile
+++ b/testcases/network/rpc/basic_tests/Makefile
@@ -23,4 +23,9 @@
 top_srcdir		?= ../../../..
 
 include $(top_srcdir)/include/mk/env_pre.mk
+
+ifeq ($(LIBC),musl)
+FILTER_OUT_DIRS += rpc01
+endif
+
 include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile
index 68616a7..748754b 100644
--- a/testcases/realtime/func/pi-tests/Makefile
+++ b/testcases/realtime/func/pi-tests/Makefile
@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk
 include $(abs_srcdir)/../../config.mk
 
 MAKE_TARGETS		:= testpi-0 testpi-1 testpi-2 testpi-4 testpi-5 testpi-6 testpi-7 sbrk_mutex
+ifeq ($(LIBC),musl)
+FILTER_OUT_MAKE_TARGETS	:= testpi-5 testpi-6 sbrk_mutex
+endif
+
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile
index 1881f75..266e0b8 100644
--- a/testcases/realtime/stress/pi-tests/Makefile
+++ b/testcases/realtime/stress/pi-tests/Makefile
@@ -24,4 +24,9 @@ top_srcdir		?= ../../../..
 
 include $(top_srcdir)/include/mk/env_pre.mk
 include $(abs_srcdir)/../../config.mk
+
+ifeq ($(LIBC),musl)
+FILTER_OUT_MAKE_TARGETS	:= testpi-3
+endif
+
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
-- 
2.7.4