summaryrefslogtreecommitdiff
path: root/package/ltp-testsuite/ltp-testsuite.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/ltp-testsuite/ltp-testsuite.mk')
-rw-r--r--package/ltp-testsuite/ltp-testsuite.mk13
1 files changed, 12 insertions, 1 deletions
diff --git a/package/ltp-testsuite/ltp-testsuite.mk b/package/ltp-testsuite/ltp-testsuite.mk
index 7b44764a8..b36894c4c 100644
--- a/package/ltp-testsuite/ltp-testsuite.mk
+++ b/package/ltp-testsuite/ltp-testsuite.mk
@@ -10,6 +10,17 @@ LTP_TESTSUITE_CAT:=zcat
LTP_TESTSUITE_ROOT:=$(TARGET_DIR)/root
LTP_TESTSUITE_DIR:=$(LTP_TESTSUITE_ROOT)/ltp-full-$(LTP_TESTSUITE_VERSION)
+#
+# We enable Open POSIX Testsuite if Native POSIX Threads Library (NPTL)
+# is selected. Otherwise, we filter out the patch for it.
+#
+LTP_PATCHES:=$(subst package/ltp-testsuite/,, \
+ $(wildcard package/ltp-testsuite/*.patch))
+ifneq ($(BR2_PTHREADS_NATIVE),y)
+LTP_PATCHES:=$(filter-out ltp-testsuite-enable-openposix-for-nptl.patch, \
+ $(LTP_PATCHES))
+endif
+
$(DL_DIR)/$(LTP_TESTSUITE_SOURCE):
$(WGET) -P $(DL_DIR) $(LTP_TESTSUITE_SITE)/$(LTP_TESTSUITE_SOURCE)
@@ -18,7 +29,7 @@ ltp-testsuite-source: $(DL_DIR)/$(LTP_TESTSUITE_SOURCE)
$(LTP_TESTSUITE_DIR)/Makefile: $(DL_DIR)/$(LTP_TESTSUITE_SOURCE)
$(LTP_TESTSUITE_CAT) $(DL_DIR)/$(LTP_TESTSUITE_SOURCE) | tar -C $(LTP_TESTSUITE_ROOT) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(LTP_TESTSUITE_DIR) package/ltp-testsuite/ ltp-testsuite\*.patch
+ toolchain/patch-kernel.sh $(LTP_TESTSUITE_DIR) package/ltp-testsuite/ $(LTP_PATCHES)
touch -c $(LTP_TESTSUITE_DIR)/Makefile
$(LTP_TESTSUITE_DIR)/.compiled: $(LTP_TESTSUITE_DIR)/Makefile