fix: process/v2/exit_code: guard static_asserts on MIPS - #565
Open
WXbet wants to merge 1 commit into
Open
Conversation
glibc 2.44 added sysdeps/unix/sysv/linux/mips/bits/waitstatus.h (commit c19cdbf66ff62a4578ac2117d43ebb306ae36aeb) which defines WIFSTOPPED and WIFSIGNALED as `static inline int` functions rather than macros so that MIPS's SIGRTMAX=127 special-case (status 0x7f) can be handled. Since those inline functions are not constexpr, the four static_assert lines guarding still_active fail to compile on MIPS with error: non-constant condition for static assertion error: call to non-'constexpr' function 'int __WIFSTOPPED(int)' whenever env.cpp (or any other TU pulling exit_code.hpp) is compiled. Earlier glibc versions used the generic macro-based header on MIPS too and Boost.Process compiled fine there. musl has taken the same approach for MIPS since 2018 (musl commit 41c632824c...); this is the same class of problem previously reported for is_running.hpp / musl in issue boostorg#48, which was fixed by the v1 rewrite but resurfaced in v2's exit_code.hpp. The asserts are compile-time sanity checks on Boost's own still_active constant (0x17f); the semantics on MIPS are unchanged (WIFSTOPPED returns true, the other three return false, as intended). Guard the block with `#ifndef __mips__` so the checks keep firing on every port where they can, and are skipped only on the one arch where glibc implements the underlying primitives as inline functions.
nickersk
pushed a commit
to nickersk/oe-alliance-core
that referenced
this pull request
Aug 1, 2026
…s on MIPS
Two mips-specific bandaids on top of the openembedded-core
boost 1.91.0 recipe, both scoped to the mipsarch override:
1. BJAM_OPTS abi=o32 architecture=mips.
Boost.Build's default_abi in boost-context-features.jam derives
the ABI from os.platform (the build host, x86_64) and falls back
to sysv, so on a mipsel cross-build b2 fails with
No best alternative for libs/context/build/asm_sources
with <architecture>mips <address-model>32 <abi>sysv ...
OE-core already carries the analogous override for arm/aarch64 in
boost.inc; extend the same idea to mips. Upstream fix:
boostorg/context#334 (merged into develop 2026-07-23, will ship
with boost 1.92.0). Drop this hunk once oe-core bumps to boost 1.92.
2. Source patch: guard four static_asserts in
boost/process/v2/exit_code.hpp with #ifndef __mips__.
Root cause: glibc 2.44 added
sysdeps/unix/sysv/linux/mips/bits/waitstatus.h (commit
c19cdbf66ff62a4578ac2117d43ebb306ae36aeb) which defines WIFSTOPPED
and WIFSIGNALED as `static inline int` functions rather than
macros, so that MIPS's SIGRTMAX=127 special-case (status 0x7f) can
be handled. Earlier glibc used the generic macro-based header on
MIPS as well and boost.process compiled fine there. Since the new
inline functions are not constexpr, the static_asserts break.
Strictly a (glibc >= 2.44) + MIPS combination. Upstream PR:
boostorg/process#565
nickersk
pushed a commit
to nickersk/oe-alliance-core
that referenced
this pull request
Aug 1, 2026
…s on MIPS
Two mips-specific bandaids on top of the openembedded-core
boost 1.91.0 recipe, both scoped to the mipsarch override:
1. BJAM_OPTS abi=o32 architecture=mips.
Boost.Build's default_abi in boost-context-features.jam derives
the ABI from os.platform (the build host, x86_64) and falls back
to sysv, so on a mipsel cross-build b2 fails with
No best alternative for libs/context/build/asm_sources
with <architecture>mips <address-model>32 <abi>sysv ...
OE-core already carries the analogous override for arm/aarch64 in
boost.inc; extend the same idea to mips. Upstream fix:
boostorg/context#334 (merged into develop 2026-07-23, will ship
with boost 1.92.0). Drop this hunk once oe-core bumps to boost 1.92.
2. Source patch: guard four static_asserts in
boost/process/v2/exit_code.hpp with #ifndef __mips__.
Root cause: glibc 2.44 added
sysdeps/unix/sysv/linux/mips/bits/waitstatus.h (commit
c19cdbf66ff62a4578ac2117d43ebb306ae36aeb) which defines WIFSTOPPED
and WIFSIGNALED as `static inline int` functions rather than
macros, so that MIPS's SIGRTMAX=127 special-case (status 0x7f) can
be handled. Earlier glibc used the generic macro-based header on
MIPS as well and boost.process compiled fine there. Since the new
inline functions are not constexpr, the static_asserts break.
Strictly a (glibc >= 2.44) + MIPS combination. Upstream PR:
boostorg/process#565
nickersk
pushed a commit
to nickersk/oe-alliance-core
that referenced
this pull request
Aug 1, 2026
Two mips-specific bandaids on top of the openembedded-core
boost 1.91.0 recipe, both scoped to the mipsarch override:
1. BJAM_OPTS abi=o32 architecture=mips.
Boost.Build's default_abi in boost-context-features.jam derives
the ABI from os.platform (the build host, x86_64) and falls back
to sysv, so on a mipsel cross-build b2 fails with
No best alternative for libs/context/build/asm_sources
with <architecture>mips <address-model>32 <abi>sysv ...
OE-core already carries the analogous override for arm/aarch64 in
boost.inc; extend the same idea to mips. Upstream fix:
boostorg/context#334 (merged into develop 2026-07-23, will ship
with boost 1.92.0). Drop this hunk once oe-core bumps to boost 1.92.
2. Source patch: guard four static_asserts in
boost/process/v2/exit_code.hpp with #ifndef __mips__.
Root cause: glibc 2.44 added
sysdeps/unix/sysv/linux/mips/bits/waitstatus.h (commit
c19cdbf66ff62a4578ac2117d43ebb306ae36aeb) which defines WIFSTOPPED
and WIFSIGNALED as `static inline int` functions rather than
macros, so that MIPS's SIGRTMAX=127 special-case (status 0x7f) can
be handled. Earlier glibc used the generic macro-based header on
MIPS as well and boost.process compiled fine there. Since the new
inline functions are not constexpr, the static_asserts break.
Strictly a (glibc >= 2.44) + MIPS combination. Upstream PR:
boostorg/process#565
nickersk
pushed a commit
to nickersk/oe-alliance-core
that referenced
this pull request
Aug 1, 2026
…s on MIPS
Two mips-specific bandaids on top of the openembedded-core
boost 1.91.0 recipe, both scoped to the mipsarch override:
1. BJAM_OPTS abi=o32 architecture=mips.
Boost.Build's default_abi in boost-context-features.jam derives
the ABI from os.platform (the build host, x86_64) and falls back
to sysv, so on a mipsel cross-build b2 fails with
No best alternative for libs/context/build/asm_sources
with <architecture>mips <address-model>32 <abi>sysv ...
OE-core already carries the analogous override for arm/aarch64 in
boost.inc; extend the same idea to mips. Upstream fix:
boostorg/context#334 (merged into develop 2026-07-23, will ship
with boost 1.92.0). Drop this hunk once oe-core bumps to boost 1.92.
2. Source patch: guard four static_asserts in
boost/process/v2/exit_code.hpp with #ifndef __mips__.
Root cause: glibc 2.44 added
sysdeps/unix/sysv/linux/mips/bits/waitstatus.h (commit
c19cdbf66ff62a4578ac2117d43ebb306ae36aeb) which defines WIFSTOPPED
and WIFSIGNALED as `static inline int` functions rather than
macros, so that MIPS's SIGRTMAX=127 special-case (status 0x7f) can
be handled. Earlier glibc used the generic macro-based header on
MIPS as well and boost.process compiled fine there. Since the new
inline functions are not constexpr, the static_asserts break.
Strictly a (glibc >= 2.44) + MIPS combination. Upstream PR:
boostorg/process#565
WXbet
added a commit
to oe-alliance/oe-alliance-core
that referenced
this pull request
Aug 1, 2026
…s on MIPS
Two mips-specific bandaids on top of the openembedded-core
boost 1.91.0 recipe, both scoped to the mipsarch override:
1. BJAM_OPTS abi=o32 architecture=mips.
Boost.Build's default_abi in boost-context-features.jam derives
the ABI from os.platform (the build host, x86_64) and falls back
to sysv, so on a mipsel cross-build b2 fails with
No best alternative for libs/context/build/asm_sources
with <architecture>mips <address-model>32 <abi>sysv ...
OE-core already carries the analogous override for arm/aarch64 in
boost.inc; extend the same idea to mips. Upstream fix:
boostorg/context#334 (merged into develop 2026-07-23, will ship
with boost 1.92.0). Drop this hunk once oe-core bumps to boost 1.92.
2. Source patch: guard four static_asserts in
boost/process/v2/exit_code.hpp with #ifndef __mips__.
Root cause: glibc 2.44 added
sysdeps/unix/sysv/linux/mips/bits/waitstatus.h (commit
c19cdbf66ff62a4578ac2117d43ebb306ae36aeb) which defines WIFSTOPPED
and WIFSIGNALED as `static inline int` functions rather than
macros, so that MIPS's SIGRTMAX=127 special-case (status 0x7f) can
be handled. Earlier glibc used the generic macro-based header on
MIPS as well and boost.process compiled fine there. Since the new
inline functions are not constexpr, the static_asserts break.
Strictly a (glibc >= 2.44) + MIPS combination. Upstream PR:
boostorg/process#565
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
glibc 2.44 added sysdeps/unix/sysv/linux/mips/bits/waitstatus.h (commit c19cdbf66ff62a4578ac2117d43ebb306ae36aeb) which defines WIFSTOPPED and WIFSIGNALED as
static inline intfunctions rather than macros so that MIPS's SIGRTMAX=127 special-case (status 0x7f) can be handled. Since those inline functions are not constexpr, the four static_assert lines guarding still_active fail to compile on MIPS witherror: non-constant condition for static assertion
error: call to non-'constexpr' function 'int __WIFSTOPPED(int)'
whenever env.cpp (or any other TU pulling exit_code.hpp) is compiled.
Earlier glibc versions used the generic macro-based header on MIPS too and Boost.Process compiled fine there. musl has taken the same approach for MIPS since 2018 (musl commit 41c632824c...); this is the same class of problem previously reported for is_running.hpp / musl in issue #48, which was fixed by the v1 rewrite but resurfaced in v2's exit_code.hpp.
The asserts are compile-time sanity checks on Boost's own still_active constant (0x17f); the semantics on MIPS are unchanged (WIFSTOPPED returns true, the other three return false, as intended). Guard the block with
#ifndef __mips__so the checks keep firing on every port where they can, and are skipped only on the one arch where glibc implements the underlying primitives as inline functions.