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

Enrico Scholz enrico.scholz at sigma-chemnitz.de
Wed Sep 18 15:19:42 UTC 2013


Bruce Ashfield <bruce.ashfield-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
writes:

>>> +LDFLAGS="-ldl -lutil"
>>
>> What is with -Wl,-as-needed or the gnu-hash ldflags which are applied
>> usually?  Perhaps, hacks like
>
> We don't want to influence the perf build from the build system, unless we
> absolutely have to. We want to use the flags and configs that are contained
> within the kernel, just as we do with anything from the kernel tree in
> general.

Userspace programs should always be built with optimization flags of the
build system.  E.g. it would be wrong when packages override our idea of
optimization (-Os/-O2/-O6), generation of debug symbols or stripping of
debug symbols.

Kernel itself is an exception because it is tied very much to gcc and
its behaviour.  But things like

| CFLAGS = -fno-omit-frame-pointer -ggdb3

in the perf Makefile must be overridable by the build system.



Enrico



More information about the Openembedded-core mailing list