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>
This commit is contained in:
Ryan Rowe
2020-06-12 12:48:24 -07:00
committed by Richard Purdie
parent b87f0746b0
commit 2c7dcad9b7

View File

@@ -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"