From: Björn Schäpers <bjo...@hazardy.de>

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).

-- >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 <bjo...@hazardy.de>
---
 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

Reply via email to