From patchwork Fri Aug 14 13:43:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bamvor Zhang Jian X-Patchwork-Id: 52440 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id F0E242031F for ; Fri, 14 Aug 2015 13:47:38 +0000 (UTC) Received: by wicja10 with SMTP id ja10sf6606139wic.2 for ; Fri, 14 Aug 2015 06:47:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=pKd/3WS70Nn/P79KfZQgDmCaxn/yTU4kNmo9fsJmrkw=; b=cFedQQRpZUcGcrc6+l3eeOK2tCahi5sywY9v3hK1pKpOr9j+4U2c6OgfHirmd1U+ao LT77VT80DhPOqNVrxA2l6D4llFEiWfQAOct8RgoRdu/nuLBBli+ikTJGTqukjxEKf2iL ya3fFPiXcT48b0rgD4pUw8giBbVcDCPGV6axjtwwOmsTrj4T25mTETVa2Jjt4rNPmck/ 4zVI7P1atWM/KEHp/2+QKTMinP1aLDjtx/bRWv8c15muSmpKXM0hTb2qw1/44NSRTrCD Rz2dq6l5QrkViEatAZwh2KMFJGxmJtMnC7svgcSRqUne1HevMDbFzH1nw6ImKjAOnOb5 Gpww== X-Gm-Message-State: ALoCoQnZtqGCcZLMM0B0x/CpHLbDYnXBiLVWHZfQZ5O6qZw/TXBB6kJH35Slf3xuKfuprkxZNjO4 X-Received: by 10.194.188.104 with SMTP id fz8mr13870wjc.1.1439560058264; Fri, 14 Aug 2015 06:47:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.70 with SMTP id y6ls348750lay.55.gmail; Fri, 14 Aug 2015 06:47:38 -0700 (PDT) X-Received: by 10.152.4.163 with SMTP id l3mr44846095lal.35.1439560058063; Fri, 14 Aug 2015 06:47:38 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id cb5si5992130lad.130.2015.08.14.06.47.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Aug 2015 06:47:38 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbbpu9 with SMTP id pu9so45840531lbb.3 for ; Fri, 14 Aug 2015 06:47:37 -0700 (PDT) X-Received: by 10.152.5.228 with SMTP id v4mr43992273lav.36.1439560057906; Fri, 14 Aug 2015 06:47:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp1634529lba; Fri, 14 Aug 2015 06:47:36 -0700 (PDT) X-Received: by 10.70.6.34 with SMTP id x2mr86671986pdx.113.1439560055961; Fri, 14 Aug 2015 06:47:35 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j9si9111911pbq.42.2015.08.14.06.47.34; Fri, 14 Aug 2015 06:47:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755218AbbHNNrb (ORCPT + 28 others); Fri, 14 Aug 2015 09:47:31 -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 Received: by oip136 with SMTP id 136so44133319oip.1 for ; Fri, 14 Aug 2015 06:47:28 -0700 (PDT) X-Received: by 10.202.173.2 with SMTP id w2mr16144638oie.128.1439560048510; Fri, 14 Aug 2015 06:47:28 -0700 (PDT) Received: from linux-j170.site ([107.191.45.96]) by smtp.gmail.com with ESMTPSA id fx10sm2844558obb.27.2015.08.14.06.47.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Aug 2015 06:47:27 -0700 (PDT) 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 Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bamvor.zhangjian@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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]"; \