diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-08-26 17:27:46 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-08-30 09:56:13 +0100 |
commit | b90ab186f7d751f00ed5e4c067dd0c07b482fc98 (patch) | |
tree | 33b10b3c1e2e83ff839e0ca7a96fa304c77469af | |
parent | 907aa954b2b997bf1f21e0dd96e85cf23ed23915 (diff) | |
download | poky-b90ab186f7d751f00ed5e4c067dd0c07b482fc98.tar.gz |
python3: Increase default thread stack size on musl
default stack size for threads is approx 140k on musl which is fine in
most cases but some of python apps e.g. python3-lz4 bindings run into
thread stack size overflow. Increase the default size to 2M on musl,
glibc defaults to 8M, so we are good there.
This default stack size change is limited to interpreter and stdlib
modules only, thats why CFLAGS_NODIST instead of CFLAGS
(From OE-Core rev: 7f9c14aa51fe9180e56cc6922415aef873de9cb6)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/python/python3_3.11.4.bb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3_3.11.4.bb b/meta/recipes-devtools/python/python3_3.11.4.bb index 8fd1382caa..ac4c6221ca 100644 --- a/meta/recipes-devtools/python/python3_3.11.4.bb +++ b/meta/recipes-devtools/python/python3_3.11.4.bb | |||
@@ -91,6 +91,13 @@ CACHED_CONFIGUREVARS = " \ | |||
91 | ac_cv_file__dev_ptc=no \ | 91 | ac_cv_file__dev_ptc=no \ |
92 | ac_cv_working_tzset=yes \ | 92 | ac_cv_working_tzset=yes \ |
93 | " | 93 | " |
94 | # set thread stack size to 2MB on musl for interpreter and stdlib C extensions | ||
95 | # so it does not run into stack limits due to musl's small thread stack | ||
96 | # This is only needed to build interpreter and not the subsequent modules | ||
97 | # Thats why CFLAGS_NODIST is modified instead of CFLAGS | ||
98 | CACHED_CONFIGUREVARS:append:libc-musl = "\ | ||
99 | CFLAGS_NODIST='${CFLAGS} -DTHREAD_STACK_SIZE=0x200000' \ | ||
100 | " | ||
94 | 101 | ||
95 | # PGO currently causes builds to not be reproducible so disable by default, see YOCTO #13407 | 102 | # PGO currently causes builds to not be reproducible so disable by default, see YOCTO #13407 |
96 | PACKAGECONFIG ??= "editline gdbm ${@bb.utils.filter('DISTRO_FEATURES', 'lto', d)}" | 103 | PACKAGECONFIG ??= "editline gdbm ${@bb.utils.filter('DISTRO_FEATURES', 'lto', d)}" |