#4084 closed defect (fixed)

throwing std::runtime on PC BSP fails

Reported by: Joel Sherrill Owned by:
Priority: normal Milestone: 6.1
Component: tool/gcc Version: 6
Severity: normal Keywords:
Cc: Chris Johns, Michael Davidsaver Blocked By:


Copied from #2830 for new release milestone. The solution is to update gcc/config/i386/t-rtems. Whether for gcc 10 or gcc master is the difference on this CR versus #2830 which had to be to gcc 7 as a patch via the RSB.

Throwing a std::runtime() exception locks up.

The lock up is in the exception clean up handler where the exception object is destructed. The destructor loops distructing the std::string object. The path ends up in libstdc++-v3/include/ext/atomicity.h line 48 or exchange_and_add.

At a guess it would seem like the C++ atomics on i386 is broken or fragile.

UPDATE: This was broken when gcc i386 eliminated -mcpu in favor of -march/-mtune. The multilibs were built with -mtune and not -march.

Attachments (1)

gcc-10-i386march-1.diff (759 bytes) - added by Joel Sherrill on 09/21/20 at 20:17:06.
Patch for GCC 10 to fix multilib compiler arguments on i386

Download all attachments as: .zip

Change History (5)

Changed on 09/21/20 at 20:17:06 by Joel Sherrill

Attachment: gcc-10-i386march-1.diff added

Patch for GCC 10 to fix multilib compiler arguments on i386

comment:1 Changed on 09/21/20 at 21:14:32 by Michael Davidsaver <mdavidsaver@…>

In 1ea1c9c/rtems-source-builder:

patch gcc i386 multiarch

Add patch to change from mtune to march when building multilibs.
The mtune argument tunes or optimizes for a specific CPU model but
does not ensure the generated code is appropriate for the
CPU model. Prior to this patch, i386 compatible code was always
generated but tuned for later models.

This is the same fix as #2830 but applying to gcc 10.

Updates #4084.

comment:3 Changed on 09/21/20 at 21:17:50 by Joel Sherrill

Cc: Chris Johns Michael Davidsaver added

comment:4 Changed on 10/01/20 at 15:23:45 by Joel Sherrill

Resolution: fixed
Status: newclosed

I applied the GCC patch to the master and 10 release branch.


Note: See TracTickets for help on using tickets.