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

Bruce Ashfield bruce.ashfield at gmail.com
Wed Sep 18 14:06:00 UTC 2013


On Wed, Sep 18, 2013 at 10:04 AM, Richard Purdie
<richard.purdie at linuxfoundation.org> wrote:
> On Wed, 2013-09-18 at 10:51 -0300, Otavio Salvador wrote:
>> The LDFLAGS is required or some old kernels fails due missing
>> symbols and this is preferred than requiring patches to every old
>> supported kernel.
>>
>> Fixes [YOCTO: #5221]
>>
>> Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
>> ---
>>  meta/recipes-kernel/perf/perf.bb | 9 +++++++--
>>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> Doesn't this reintroduce the problem you previously fixed though with
> things rebuilding because the flags changed?

I'm doing a test on just that right now, but as far as I can tell, as
long as they
are consistent between the compile and install, we should be fine. It was when
one was clobbered and one wasn't before, that the rebuilds were triggering.

Bruce

>
> Cheers,
>
> Richard
>
>
>
>
>
>> diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
>> index 4a815ff..269069f 100644
>> --- a/meta/recipes-kernel/perf/perf.bb
>> +++ b/meta/recipes-kernel/perf/perf.bb
>> @@ -60,6 +60,11 @@ B = "${WORKDIR}/${BPN}-${PV}"
>>  SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
>>  TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}"
>>
>> +# The LDFLAGS is required or some old kernels fails due missing
>> +# symbols and this is preferred than requiring patches to every old
>> +# supported kernel.
>> +LDFLAGS="-ldl -lutil"
>> +
>>  EXTRA_OEMAKE = \
>>               '-C ${S}/tools/perf \
>>               O=${B} \
>> @@ -88,13 +93,13 @@ PARALLEL_MAKE = ""
>>
>>  do_compile() {
>>       # Linux kernel build system is expected to do the right thing
>> -     unset CFLAGS LDFLAGS
>> +     unset CFLAGS
>>       oe_runmake all
>>  }
>>
>>  do_install() {
>>       # Linux kernel build system is expected to do the right thing
>> -     unset CFLAGS LDFLAGS
>> +     unset CFLAGS
>>       oe_runmake DESTDIR=${D} install
>>       # we are checking for this make target to be compatible with older perf versions
>>       if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0"]; then
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



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



More information about the Openembedded-core mailing list