[OE-core] [PATCH] perf: Add LDFLAGS to allow build of old kernels without patching

Bruce Ashfield bruce.ashfield at gmail.com
Wed Sep 18 16:27:03 UTC 2013


On Wed, Sep 18, 2013 at 12:23 PM, Richard Purdie
<richard.purdie at linuxfoundation.org> wrote:
> On Wed, 2013-09-18 at 12:14 -0400, Bruce Ashfield wrote:
>> On Wed, Sep 18, 2013 at 12:02 PM, Richard Purdie
>> <richard.purdie at linuxfoundation.org> wrote:
>> > On Wed, 2013-09-18 at 11:54 -0400, Bruce Ashfield wrote:
>> >> On Wed, Sep 18, 2013 at 11:44 AM, Enrico Scholz
>> >> <enrico.scholz at sigma-chemnitz.de> wrote:
>> >> > Otavio Salvador <otavio at ossystems.com.br> writes:
>> >> >
>> >> >> I don't agree on this. perf is tied to kernel and part of its code so
>> >> >> I think same exception rule apply for it as well.
>> >> >
>> >> > perf ships with the kernel but is a pure userspace program.  It does not
>> >> > require any special setup ('make configure'), it links against complex
>> >> > userspace gui frameworks and uses userspace headers.
>> >>
>> >> yes, we realize this .. we have a long a complicated history with perf and the
>> >> related build issues.
>> >>
>> >> We are stating our general policy, interfere with it's build as little
>> >> as possible.
>> >> Use extension variables, not clobber variables, etc.
>> >>
>> >> Otherwise, we end up creating our own issues, and have the bugs to prove it :)
>> >
>> > For the record, I do think Enrico does have a valid point here. We do
>> > put things in CFLAGS and LDFLAGS which we expect *all* userspace to be
>> > built with. Things like the hash style, preferred debugging symbol
>> > options and so on are expected to be used for all userspace binaries.
>> >
>> > So somehow we do need to ensure that when the kernel is building
>> > userspace binaries, it does use the options we expect and match the rest
>> > of the system.
>> >
>> > Equally, I do understand the kernel build system is a complex beast in
>> > its own right.
>> >
>> > We don't have to solve this instantly, but in general its considered a
>> > bug if things like the hash-style in LDFLAGS don't make it to the linker
>> > commandline. We do have QA tests that check for this, however they don't
>> > function as they used to since we hard set the option on when we compile
>> > the linker now :/.
>>
>> Right, don't get me wrong in my comments. I'm just saying that I'd rather
>> add to the flags, versus completely clobber them. Since us imposing the
>> complete set of flags, is what has caused us the pain .. not adding to them.
>
> Isn't that what the patch at the start of this thread is doing though
> (clobbering, not adding)?  :/

It definitely is, and I had put in the bugzilla that it is a compromise for now,
since perf only offers EXTRA_CFLAGS and not EXTRA_LDFLAGS. I'll see
about addressing that upstream once we get out of this fix :)

Bruce

>
> I really need to figure out whether to take this patch or not and it
> looks like there isn't an easy answer...
>
> Cheers,
>
> Richard
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"



More information about the Openembedded-core mailing list