All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fathi Boudra <fathi.boudra@linaro.org>
To: Bamvor Zhang Jian <bamvor.zhangjian@linaro.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	linux-kselftest@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] selftests: gpio: use pkg-config to determine libmount CFLAGS/LDLIBS
Date: Fri, 30 Jun 2017 08:53:15 +0300	[thread overview]
Message-ID: <CAGNsrLBf7fecd+-7WrAAsxRQFzSswNCTBWmwNTre-1ChYdRmpg@mail.gmail.com> (raw)
In-Reply-To: <CAFy1USR-kWgR3FUfnMjysxyR09zW48EYPAfxOVO-spBr_gJGAw@mail.gmail.com>

On 30 June 2017 at 05:20, Bamvor Zhang Jian <bamvor.zhangjian@linaro.org> wrote:
> On 29 June 2017 at 19:39, Fathi Boudra <fathi.boudra@linaro.org> wrote:
>> On 29 June 2017 at 12:01, Michael Ellerman <mpe@ellerman.id.au> wrote:
>>> Fathi Boudra <fathi.boudra@linaro.org> 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?

or use the appropriate tool for getting CFLAGS/LDFLAGS instead of:
1. hardcoding it and potentially get them wrong
2. expecting the user will have to take extra steps, while he can just run make

> 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

  reply	other threads:[~2017-06-30  5:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29  6:58 [PATCH 1/1] selftests: gpio: use pkg-config to determine libmount CFLAGS/LDLIBS Fathi Boudra
2017-06-29  9:01 ` Michael Ellerman
2017-06-29 11:39   ` Fathi Boudra
2017-06-30  2:20     ` Bamvor Zhang Jian
2017-06-30  5:53       ` Fathi Boudra [this message]
2017-07-01  1:48         ` Michael Ellerman
2017-07-03 11:23           ` Fathi Boudra
2017-06-30 11:01     ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGNsrLBf7fecd+-7WrAAsxRQFzSswNCTBWmwNTre-1ChYdRmpg@mail.gmail.com \
    --to=fathi.boudra@linaro.org \
    --cc=bamvor.zhangjian@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.