A recent fix for the LEON3 support added a new option -muser-mode to select the ASI of the CASA instruction used for atomic operations. Use the user-mode CASA instruction since this works also in supervisor-mode.
This patch should be applied to GCC 4.8, 4,9 and mainline. I do not have write access, so in case this gets approved, please commit it for me. gcc/ChangeLog 2014-05-02 Sebastian Huber <sebastian.hu...@embedded-brains.de> * config/sparc/t-rtems: Use user-mode for leon3 multilibs. --- gcc/config/sparc/t-rtems | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/gcc/config/sparc/t-rtems b/gcc/config/sparc/t-rtems index f1a3d84..91de612 100644 --- a/gcc/config/sparc/t-rtems +++ b/gcc/config/sparc/t-rtems @@ -17,6 +17,20 @@ # <http://www.gnu.org/licenses/>. # -MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3 -MULTILIB_DIRNAMES = soft v8 leon3 +MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3 muser-mode +MULTILIB_DIRNAMES = soft v8 leon3 user-mode MULTILIB_MATCHES = msoft-float=mno-fpu + +# Enumeration of multilibs + +MULTILIB_EXCEPTIONS += msoft-float/mcpu=v8/muser-mode +# MULTILIB_EXCEPTIONS += msoft-float/mcpu=v8 +# MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3/muser-mode +MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3 +MULTILIB_EXCEPTIONS += msoft-float/muser-mode +# MULTILIB_EXCEPTIONS += msoft-float +MULTILIB_EXCEPTIONS += mcpu=v8/muser-mode +# MULTILIB_EXCEPTIONS += mcpu=v8 +# MULTILIB_EXCEPTIONS += mcpu=leon3/muser-mode +MULTILIB_EXCEPTIONS += mcpu=leon3 +MULTILIB_EXCEPTIONS += muser-mode -- 1.7.7