Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753937AbdC1DAw (ORCPT ); Mon, 27 Mar 2017 23:00:52 -0400 Received: from ozlabs.org ([103.22.144.67]:60241 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753849AbdC1DAu (ORCPT ); Mon, 27 Mar 2017 23:00:50 -0400 From: Michael Ellerman To: Fathi Boudra , linux-kselftest@vger.kernel.org, Shuah Khan Cc: linux-kernel@vger.kernel.org, Bamvor Jian Zhang , Fathi Boudra Subject: Re: [PATCH] selftests: gpio: fix Makefile In-Reply-To: <20170324115527.26472-1-fathi.boudra@linaro.org> References: <20170324115527.26472-1-fathi.boudra@linaro.org> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Tue, 28 Mar 2017 14:00:45 +1100 Message-ID: <87efxiayw2.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 778 Lines: 26 Fathi Boudra writes: > diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile > index 205e4d10e085..714f1f7df04d 100644 > --- a/tools/testing/selftests/gpio/Makefile > +++ b/tools/testing/selftests/gpio/Makefile > @@ -1,23 +1,24 @@ > +CFLAGS += -O2 -g -std=gnu99 -Wall > +CFLAGS += -I../../../../include/uapi/ -I../../../../include/ Those are kernel headers, they *might* work in userspace but they're not designed to. Use the exported headers: CFLAGS += -I../../../../usr/include If they're not there, then the user can install them, or fall back to the system headers. > +CFLAGS += $(shell pkg-config --cflags mount) > +LDLIBS += $(shell pkg-config --libs mount) What if pkg-config isn't installed? cheers