summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Rowe <rrowe@xevo.com>2020-06-12 12:48:24 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-16 23:39:28 +0100
commit2c7dcad9b75174758c00b2fbcf193bc22b67e397 (patch)
tree6478fe66559189b59dced37823109ae32e1e0ad5
parentb87f0746b01c079eab5fba81e2f9580dba75835e (diff)
downloadpoky-2c7dcad9b75174758c00b2fbcf193bc22b67e397.tar.gz
python3: fix PGO for non-reproducible biniaries
When PGO was disabled by default by e53ebf29, a bug was introduced that prevented PGO from ever being enabled. At the time at which extra config is appended to PACKAGECONFIG_CONFARGS, PACKAGECONFIG_PGO remains unevaluated in PACKAGECONFIG_class-target, due to setting its value in an anonymous Python function. As a result, the PGO options options will never be included. (From OE-Core rev: 21446d4b6c5f59b6acb66133a9675ec3d3dbabe2) Signed-off-by: Ryan Rowe <rrowe@xevo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/python/python3_3.8.3.bb12
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/recipes-devtools/python/python3_3.8.3.bb b/meta/recipes-devtools/python/python3_3.8.3.bb
index 997308dc75..2eb2a422e6 100644
--- a/meta/recipes-devtools/python/python3_3.8.3.bb
+++ b/meta/recipes-devtools/python/python3_3.8.3.bb
@@ -82,16 +82,16 @@ CACHED_CONFIGUREVARS = " \
82 ac_cv_file__dev_ptc=no \ 82 ac_cv_file__dev_ptc=no \
83 ac_cv_working_tzset=yes \ 83 ac_cv_working_tzset=yes \
84" 84"
85python() { 85
86def possibly_include_pgo(d):
86 # PGO currently causes builds to not be reproducible, so disable it for 87 # PGO currently causes builds to not be reproducible, so disable it for
87 # now. See YOCTO #13407 88 # now. See YOCTO #13407
88 if bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', True, False, d) and d.getVar('BUILD_REPRODUCIBLE_BINARIES') != '1': 89 if bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', True, False, d) and d.getVar('BUILD_REPRODUCIBLE_BINARIES') != '1':
89 d.setVar('PACKAGECONFIG_PGO', 'pgo') 90 return 'pgo'
90 else: 91
91 d.setVar('PACKAGECONFIG_PGO', '') 92 return ''
92}
93 93
94PACKAGECONFIG_class-target ??= "readline ${PACKAGECONFIG_PGO} gdbm" 94PACKAGECONFIG_class-target ??= "readline ${@possibly_include_pgo(d)} gdbm"
95PACKAGECONFIG_class-native ??= "readline gdbm" 95PACKAGECONFIG_class-native ??= "readline gdbm"
96PACKAGECONFIG_class-nativesdk ??= "readline gdbm" 96PACKAGECONFIG_class-nativesdk ??= "readline gdbm"
97PACKAGECONFIG[readline] = ",,readline" 97PACKAGECONFIG[readline] = ",,readline"