All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] python3: fix PGO for non-reproducible biniaries
@ 2020-06-12 19:48 Ryan Rowe
  0 siblings, 0 replies; only message in thread
From: Ryan Rowe @ 2020-06-12 19:48 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ryan Rowe

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.

Signed-off-by: Ryan Rowe <rrowe@xevo.com>
---
 meta/recipes-devtools/python/python3_3.8.3.bb | 12 ++++++------
 1 file 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 4367923b55..3261e5fb17 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 = " \
                 ac_cv_file__dev_ptc=no \
                 ac_cv_working_tzset=yes \
 "
-python() {
+
+def possibly_include_pgo(d):
     # PGO currently causes builds to not be reproducible, so disable it for
     # now. See YOCTO #13407
     if bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', True, False, d) and d.getVar('BUILD_REPRODUCIBLE_BINARIES') != '1':
-        d.setVar('PACKAGECONFIG_PGO', 'pgo')
-    else:
-        d.setVar('PACKAGECONFIG_PGO', '')
-}
+        return 'pgo'
+    
+    return ''
 
-PACKAGECONFIG_class-target ??= "readline ${PACKAGECONFIG_PGO} gdbm"
+PACKAGECONFIG_class-target ??= "readline ${@possibly_include_pgo(d)} gdbm"
 PACKAGECONFIG_class-native ??= "readline gdbm"
 PACKAGECONFIG_class-nativesdk ??= "readline gdbm"
 PACKAGECONFIG[readline] = ",,readline"
-- 
2.17.2 (Apple Git-113)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-12 19:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-12 19:48 [PATCH] python3: fix PGO for non-reproducible biniaries Ryan Rowe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.