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