summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2023-12-14 17:18:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-21 10:38:29 +0000
commite73b3744dea85c86a8b1896d50f95fa8ca7e168e (patch)
treeb56aa1c26c7ad88a3e9817c75379b0344b6c2df4 /meta
parent2f56aec05c584f094267efad26480d624821019b (diff)
downloadpoky-e73b3744dea85c86a8b1896d50f95fa8ca7e168e.tar.gz
python3: re-enable profile guided optimisation
This was accidentally disabled in the 3.7.2 upgrade in 2019[1] where PGO was made target-only. Change the wrapper script generation so that it happens in all environments but class-native. [1] oe-core 02714c105426b0d687620913c1a7401b386428b6 (From OE-Core rev: 96a9964d6071dc614cec06a4f0712e257de2bc8b) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/python/python3_3.11.5.bb12
1 files changed, 9 insertions, 3 deletions
diff --git a/meta/recipes-devtools/python/python3_3.11.5.bb b/meta/recipes-devtools/python/python3_3.11.5.bb
index d375de4b19..e7b2b08f7f 100644
--- a/meta/recipes-devtools/python/python3_3.11.5.bb
+++ b/meta/recipes-devtools/python/python3_3.11.5.bb
@@ -129,18 +129,24 @@ EXTRA_OEMAKE = '\
129 LIB=${baselib} \ 129 LIB=${baselib} \
130' 130'
131 131
132do_compile:prepend:class-target() { 132# Generate a Profile Guided Optimisation wrapper script that uses qemu-user for
133# all cross builds.
134write_pgo_wrapper:class-native = ":"
135write_pgo_wrapper() {
133 if ${@bb.utils.contains('PACKAGECONFIG', 'pgo', 'true', 'false', d)}; then 136 if ${@bb.utils.contains('PACKAGECONFIG', 'pgo', 'true', 'false', d)}; then
134 qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}', ['${B}', '${STAGING_DIR_TARGET}/${base_libdir}'])}"
135 cat >pgo-wrapper <<EOF 137 cat >pgo-wrapper <<EOF
136#!/bin/sh 138#!/bin/sh
137cd ${B} 139cd ${B}
138$qemu_binary "\$@" 140${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}', ['${B}', '${STAGING_DIR_TARGET}/${base_libdir}'])} "\$@"
139EOF 141EOF
140 chmod +x pgo-wrapper 142 chmod +x pgo-wrapper
141 fi 143 fi
142} 144}
143 145
146do_compile:prepend() {
147 write_pgo_wrapper
148}
149
144do_install:prepend() { 150do_install:prepend() {
145 ${WORKDIR}/check_build_completeness.py ${T}/log.do_compile 151 ${WORKDIR}/check_build_completeness.py ${T}/log.do_compile
146} 152}