Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755431AbbHYMwW (ORCPT ); Tue, 25 Aug 2015 08:52:22 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:35097 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753858AbbHYMwV (ORCPT ); Tue, 25 Aug 2015 08:52:21 -0400 Subject: Re: [PATCH 2/7] selftests: add CFLAGS_EXTRA To: Michael Ellerman References: <1439559818-21666-1-git-send-email-bamvor.zhangjian@linaro.org> <1439559818-21666-3-git-send-email-bamvor.zhangjian@linaro.org> <1440388080.9176.6.camel@ellerman.id.au> Cc: linux-kernel@vger.kernel.org, Mark Brown , khilman@linaro.org, tyler.baker@linaro.org, shuahkh@osg.samsung.com From: Bamvor Zhang Jian Message-ID: <55DC6470.8030106@linaro.org> Date: Tue, 25 Aug 2015 20:49:52 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1440388080.9176.6.camel@ellerman.id.au> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1243 Lines: 37 On 08/24/2015 11:48 AM, Michael Ellerman wrote: > On Fri, 2015-08-14 at 21:43 +0800, Bamvor Jian Zhang wrote: >> 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 > > There should be no need to define a new variable. > > You should just update the relevant Makefiles to use CFLAGS += rather than > CFLAGS =. And then you can just specifiy CFLAGS on the command line. yeap, it works for me. There is only one line need to be changed: diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile index 0e3b41e..ca8327f 100644 --- a/tools/testing/selftests/mqueue/Makefile +++ b/tools/testing/selftests/mqueue/Makefile @@ -1,4 +1,4 @@ -CFLAGS = -O2 +CFLAGS += -O2 all: $(CC) $(CFLAGS) mq_open_tests.c -o mq_open_tests -lrt regards bamvor > > cheers > > -- 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/