summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-11-08 16:02:08 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-11-11 10:04:34 +0000
commit2ccaa99871af8cb5b41e12a619e1bfbea4ca6f33 (patch)
treeecff9cc0fa91eadd1ffb2a9edbc51dbb1a9efc43 /meta/recipes-devtools
parent228b5a91516cdf9d5a1df3c721ba8e5619b188ab (diff)
downloadopenembedded-core-contrib-2ccaa99871af8cb5b41e12a619e1bfbea4ca6f33.tar.gz
python3: Enable lto if its in DISTRO_FEATURES
python3 configure compiles on object file and then greps for strings in it for endianness for target ,when using LTO the .o files are not nomal ELF onjects so this test fails, since we are using --enable-lto to enable this here we dont need to inject extra paths via bitbake anyway therefore reset LTO variable for target Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/python/python3_3.9.0.bb6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/recipes-devtools/python/python3_3.9.0.bb b/meta/recipes-devtools/python/python3_3.9.0.bb
index 6402760a1b..8fe60ea016 100644
--- a/meta/recipes-devtools/python/python3_3.9.0.bb
+++ b/meta/recipes-devtools/python/python3_3.9.0.bb
@@ -74,6 +74,9 @@ export CROSSPYTHONPATH="${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynl
EXTRANATIVEPATH += "python3-native"
+# LTO will be enabled via packageconfig depending upong distro features
+LTO_class-target = ""
+
CACHED_CONFIGUREVARS = " \
ac_cv_file__dev_ptmx=yes \
ac_cv_file__dev_ptc=no \
@@ -88,7 +91,7 @@ def possibly_include_pgo(d):
return ''
-PACKAGECONFIG_class-target ??= "readline ${@possibly_include_pgo(d)} gdbm"
+PACKAGECONFIG_class-target ??= "readline ${@possibly_include_pgo(d)} gdbm ${@bb.utils.filter('DISTRO_FEATURES', 'lto', d)}"
PACKAGECONFIG_class-native ??= "readline gdbm"
PACKAGECONFIG_class-nativesdk ??= "readline gdbm"
PACKAGECONFIG[readline] = ",,readline"
@@ -96,6 +99,7 @@ PACKAGECONFIG[readline] = ",,readline"
PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native"
PACKAGECONFIG[tk] = ",,tk"
PACKAGECONFIG[gdbm] = ",,gdbm"
+PACKAGECONFIG[lto] = "--with-lto,,"
do_configure_prepend () {
mkdir -p ${B}/Modules