On 16/08/2021 14:33, Martin Liška wrote:
On 8/12/21 4:31 PM, Sebastian Huber wrote:
This would be suitable for me, however, I am not sure if you want such a customization feature just for a niche operating system.

I don't see a reason why not.
Please send a patch.

Ok, good. I will try to figure out what can be done. One problem is that tsystem.h is included before tm.h. Independent of this Joseph S. Myers said in the recent patch review with respect to the gcov_type size that removing tm.h from the target libraries is a development goal.

I guess we have a couple of options.

1. Detect the presence of __assert_func and add the result to tconfig.h. This can't be a link time check, since libgcc is build before Newlib.

2. Use __builtin_trap() instead of abort() if inhibit_libc is defined. The trap builtin is target-specific. Making this system-specific (in this case RTEMS) could be an issue.

3. Add a new target hook for the gcc_assert() failure. This has the same problem as 2. with respect to customization by system and not architecture.

4. Disable gcc_assert() if inhibit_libc is defined.

5. Use builtin __rtems__ define in tsystem.h as a hack.

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/

Reply via email to