Am 30.07.2025 um 08:45 schrieb Jonathan Wakely:
On Tue, 29 Jul 2025, 14:34 Björn Schäpers, <[email protected] <mailto:[email protected]>> wrote:From: Björn Schäpers <[email protected] <mailto:[email protected]>> I want assertions to be enabled, while compiling for bare metal and I don't have any printf variants at my hand (nor want I). Then don't you want to use --disable-libstdcxx-verbose ?
I would really like to use it out of the box with the gcc/libstdc++ installed from the local packet manager.
-- >8 -- Mark it as weak, so users can provide their own assert handler. libstc++-3/Changelog: Mark __glibcxx_assert_fail as weak * include/bits/c++config (__glibcxx_assert_fail): __attribute__((weak)) added. Signed-off-by: Björn Schäpers <[email protected] <mailto:[email protected]>> --- libstdc++-v3/include/bits/c++config | 1 + 1 file changed, 1 insertion(+) diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/ bits/c++config index eec3a4a499d..b94c780b216 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -625,6 +625,7 @@ namespace std #pragma GCC visibility push(default) // Don't use <cassert> because this should be unaffected by NDEBUG. extern "C++" _GLIBCXX_NORETURN __attribute__((__cold__)) +__attribute__((weak)) void __glibcxx_assert_fail /* Called when a precondition violation is detected. */ (const char* __file, int __line, const char* __function,-- 2.50.1
