Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755214AbbHNNra (ORCPT ); Fri, 14 Aug 2015 09:47:30 -0400 Received: from mail-oi0-f46.google.com ([209.85.218.46]:34025 "EHLO mail-oi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755161AbbHNNr3 (ORCPT ); Fri, 14 Aug 2015 09:47:29 -0400 From: Bamvor Jian Zhang To: linux-kernel@vger.kernel.org Cc: broonie@linaro.org, khilman@linaro.org, tyler.baker@linaro.org, bamvor.zhangjian@linaro.org, shuahkh@osg.samsung.com Subject: [PATCH 2/7] selftests: add CFLAGS_EXTRA Date: Fri, 14 Aug 2015 21:43:33 +0800 Message-Id: <1439559818-21666-3-git-send-email-bamvor.zhangjian@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1439559818-21666-1-git-send-email-bamvor.zhangjian@linaro.org> References: <1439559818-21666-1-git-send-email-bamvor.zhangjian@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1366 Lines: 37 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 -- 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/