Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1207545

[PATCH 2/7] selftests: add CFLAGS_EXTRA

From Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 2/7] selftests: add CFLAGS_EXTRA
Date 2015-08-14 15:50 +0200
Message-ID <pXnwS-3Fg-17@gated-at.bofh.it> (permalink)
References <pXnwR-3Fg-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


One may pass the "-I /path/to/headers -L /path/to/lib" through
CFLAGS_EXTRA for cross compiling. mqueue could compile pass
in this way when we provide the popt.h and libpopt.so. And kdbus
could compile pass with sys/capability and libcap.so

Sed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>

--
Originally, I want to add something like --sysroot to the compile
which mean the user need to provide the full filesystem including
headers and library for compiler. With CFLAGS_EXTRA, the user only
need to provide the minimal headers and/or librarys for building.
---
 tools/testing/selftests/lib.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index ee412ba..1acfd02 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -2,6 +2,8 @@
 # Makefile can operate with or without the kbuild infrastructure.
 CC := $(CROSS_COMPILE)gcc
 
+CFLAGS += $(CFLAGS_EXTRA)
+
 define RUN_TESTS
 	@for TEST in $(TEST_PROGS); do \
 		(./$$TEST && echo "selftests: $$TEST [PASS]") || echo "selftests: $$TEST [FAIL]"; \
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7] Improvement kselftest support for arm and arm64 Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-08-14 15:50 +0200
  [PATCH 4/7] selftests: check before install Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-08-14 15:50 +0200
  [PATCH 2/7] selftests: add CFLAGS_EXTRA Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-08-14 15:50 +0200
  [PATCH 6/7] selftests: only compile userfaultfd for x86 and powperpc Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-08-14 15:50 +0200
  [PATCH 3/7] selftests: exec: fix for running and installing Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-08-14 15:50 +0200

csiph-web