Ticket #4322: gcc-7.5-sparc-rtems-add-__FIX_LEON3FT_TN0018-for-affected-ta.patch

File gcc-7.5-sparc-rtems-add-__FIX_LEON3FT_TN0018-for-affected-ta.patch, 1000 bytes (added by Daniel Hellstrom, on 03/09/21 at 13:53:52)

GCC-7.5 backport from GCC-10 patch linked in ticket.

  • gcc/config/sparc/rtemself.h

    From acc699509676ac09b14abc83b457feb67dc7d09c Mon Sep 17 00:00:00 2001
    From: Daniel Hellstrom <daniel@gaisler.com>
    Date: Tue, 19 Jan 2021 10:39:51 +0100
    Subject: [PATCH] sparc,rtems: add __FIX_LEON3FT_TN0018 for affected targets
    
    Enable a define FIX_LEON3FT_TN0018 for the LEON3FT targets affected
    by the GRLIB-TN-0018 errata described here:
      https://www.gaisler.com/notes
    
    gcc/
    
    	* config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
    	built-in define __FIX_LEON3FT_TN0018.
    ---
     gcc/config/sparc/rtemself.h | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/gcc/config/sparc/rtemself.h b/gcc/config/sparc/rtemself.h
    index 0fb56ee..a445b0c 100644
    a b  
    3333        builtin_assert ("system=rtems");        \
    3434        if (sparc_fix_b2bst)                    \
    3535          builtin_define ("__FIX_LEON3FT_B2BST"); \
     36        if (sparc_fix_gr712rc || sparc_fix_ut700 || sparc_fix_ut699) \
     37          builtin_define ("__FIX_LEON3FT_TN0018"); \
    3638    }                                           \
    3739  while (0)
    3840