On Thu, Oct 19, 2023 at 8:32 AM Rasmus Villemoes <rasmus.villem...@prevas.dk> wrote: > > From: Rasmus Villemoes <rasmus.villem...@prevas.dk> > > Building perf without security_flags.inc being included in one's > distro results in the buildpaths warning > > WARNING: perf-1.0-r9 do_package_qa: QA Issue: File /usr/bin/trace in > package perf contains reference to TMPDIR > > because the ${DEBUG_PREFIX_MAP} does not get used. Most recipes get > that from CFLAGS, but the perf recipe explicitly unsets that. > > Now ${SELECTED_OPTIMIZATION} of course contains more than just > ${DEBUG_FLAGS}/${DEBUG_PREFIX_MAP}. For most TUs, perf's build system > adds its own optimization flags (-O6 for odd reasons), so for those > including the -O2 or -Og doesn't change anything. But looking at the > .o.cmd files show that there are some TUs which currently get built > without any -O flag. So for those adding the distro's > SELECTED_OPTIMIZATION seem to be the right thing to do.
The change is fine with me. > > Signed-off-by: Rasmus Villemoes <rasmus.villem...@prevas.dk> > --- > meta/conf/distro/include/security_flags.inc | 1 - > meta/recipes-kernel/perf/perf.bb | 1 + > 2 files changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/conf/distro/include/security_flags.inc > b/meta/conf/distro/include/security_flags.inc > index 2972f05b4e..d97a6edb0f 100644 > --- a/meta/conf/distro/include/security_flags.inc > +++ b/meta/conf/distro/include/security_flags.inc > @@ -69,4 +69,3 @@ SECURITY_LDFLAGS:pn-xserver-xorg = "${SECURITY_X_LDFLAGS}" > TARGET_CC_ARCH:append:pn-binutils = " ${SELECTED_OPTIMIZATION}" > TARGET_CC_ARCH:append:pn-gcc = " ${SELECTED_OPTIMIZATION}" > TARGET_CC_ARCH:append:pn-gdb = " ${SELECTED_OPTIMIZATION}" > -TARGET_CC_ARCH:append:pn-perf = " ${SELECTED_OPTIMIZATION}" > diff --git a/meta/recipes-kernel/perf/perf.bb > b/meta/recipes-kernel/perf/perf.bb > index 675acfaf26..a6110dedc9 100644 > --- a/meta/recipes-kernel/perf/perf.bb > +++ b/meta/recipes-kernel/perf/perf.bb > @@ -72,6 +72,7 @@ SPDX_S = "${S}/tools/perf" > # symbols and this is preferred than requiring patches to every old > # supported kernel. > LDFLAGS="-ldl -lutil" > +TARGET_CC_ARCH += "${SELECTED_OPTIMIZATION}" I'd even go so far as to add a comment above the relocated line with a hint / reminder that this adds the debug prefix map. Bruce > > EXTRA_OEMAKE = '\ > V=1 \ > -- > 2.40.1.1.g1c60b9335d > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#189453): https://lists.openembedded.org/g/openembedded-core/message/189453 Mute This Topic: https://lists.openembedded.org/mt/102058904/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-