Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751886AbdF3CU0 (ORCPT ); Thu, 29 Jun 2017 22:20:26 -0400 Received: from mail-it0-f46.google.com ([209.85.214.46]:38642 "EHLO mail-it0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751625AbdF3CUY (ORCPT ); Thu, 29 Jun 2017 22:20:24 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170629065802.24062-1-fathi.boudra@linaro.org> <87shij9nhl.fsf@concordia.ellerman.id.au> From: Bamvor Zhang Jian Date: Fri, 30 Jun 2017 10:20:22 +0800 Message-ID: Subject: Re: [PATCH 1/1] selftests: gpio: use pkg-config to determine libmount CFLAGS/LDLIBS To: Fathi Boudra Cc: Michael Ellerman , linux-kselftest@vger.kernel.org, Shuah Khan , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1064 Lines: 28 On 29 June 2017 at 19:39, Fathi Boudra wrote: > On 29 June 2017 at 12:01, Michael Ellerman wrote: >> Fathi Boudra writes: >> >>> Fix hardcoded and misplaced libmount headers. Use pkg-config instead to >>> figure out CFLAGS/LDLIBS, fixing also their value for cross-compilation. >> >> Can you explain how it fixes the values for cross-compilation? > > When pkg-config is invoked in a cross-build environment, it will > return your sysroot headers path instead of the hardcoded > -I/usr/include/libmount > > For example in my oe environment, when I invoke "pkg-config --cflags > mount", it returns: > -I/build/tmp-rpb-glibc/sysroots/hikey/usr/include/libmount I suppose we could also pass the extra CFLAGS and LDFLAGS directly to make it work. correct? Regards Bamvor > >> cheers >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html