diff mbox

RTEMS: select SPARC multilibs

Message ID 1415288178-15157-1-git-send-email-daniel@gaisler.com
State New
Headers show

Commit Message

Daniel Hellstrom Nov. 6, 2014, 3:36 p.m. UTC
Recent support for mcpu=leon3v7 and muser-mode were added
to GCC. Update the RTEMS multilib for sparc to the
following combinations:

v7                            - ./
leon3 muser-mode              - leon3/user-mode/
leon3v7 muser-mode            - leon3v7/user-mode/
v8                            - v8/
v7 soft-float                 - soft/
leon3 soft-float muser-mode   - soft/leon3/user-mode/
leon3v7 soft-float muser-mode - soft/leon3v7/user-mode/
v8 soft-float                 - soft/v8/

I think this would be good for 4.8, 4.9 and trunk.

2014-11-06  Daniel Hellstrom  <daniel@gaisler.com>

	* config.gcc (sparc-*-rtems*): Clean away unused t-elf
	* config/sparc/t-rtems: Add leon3v7 and muser-mode multilibs
---
 gcc/config.gcc           |    2 +-
 gcc/config/sparc/t-rtems |   13 +++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

Comments

Sebastian Huber Nov. 7, 2014, 8:26 a.m. UTC | #1
Hello Daniel,

thanks for the patch.

On 06/11/14 16:36, Daniel Hellstrom wrote:
> Recent support for mcpu=leon3v7 and muser-mode were added
> to GCC. Update the RTEMS multilib for sparc to the
> following combinations:
>
> v7                            - ./
> leon3 muser-mode              - leon3/user-mode/
> leon3v7 muser-mode            - leon3v7/user-mode/
> v8                            - v8/
> v7 soft-float                 - soft/
> leon3 soft-float muser-mode   - soft/leon3/user-mode/
> leon3v7 soft-float muser-mode - soft/leon3v7/user-mode/
> v8 soft-float                 - soft/v8/
>
> I think this would be good for 4.8, 4.9 and trunk.
>
> 2014-11-06  Daniel Hellstrom<daniel@gaisler.com>
>
> 	* config.gcc (sparc-*-rtems*): Clean away unused t-elf
> 	* config/sparc/t-rtems: Add leon3v7 and muser-mode multilibs

I tested this patch with the GCC 4.9 branch and it yields exactly the set of 
multilibs we need in RTEMS to support the currently available hardware.

I compiled the RTEMS testsuite with this compiler and run it on an NGMP board. 
  The results are all right.
Eric Botcazou Nov. 7, 2014, 8:40 a.m. UTC | #2
> I think this would be good for 4.8, 4.9 and trunk.
> 
> 2014-11-06  Daniel Hellstrom  <daniel@gaisler.com>
> 
> 	* config.gcc (sparc-*-rtems*): Clean away unused t-elf
> 	* config/sparc/t-rtems: Add leon3v7 and muser-mode multilibs

OK everywhere as far as I'm concerned but the RTEMS folks have the final say.
Joel Sherrill Nov. 7, 2014, 12:25 p.m. UTC | #3
On November 7, 2014 2:40:43 AM CST, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> I think this would be good for 4.8, 4.9 and trunk.
>> 
>> 2014-11-06  Daniel Hellstrom  <daniel@gaisler.com>
>> 
>> 	* config.gcc (sparc-*-rtems*): Clean away unused t-elf
>> 	* config/sparc/t-rtems: Add leon3v7 and muser-mode multilibs
>
>OK everywhere as far as I'm concerned but the RTEMS folks have the
>final say.

Fine with me.

Does spatc-elf need a refresh on its multilibs?

--joel
Daniel Hellstrom Nov. 7, 2014, 1:36 p.m. UTC | #4
Hi,

Thanks for review and testing! Then I will apply it.

Thanks for bringing up the sparc-elf. I think we would want the LEON3 in the t-elf, however I have to verify the LEON newlib C state and mflat etc. before activating that.

DanielH

On 11/07/2014 01:25 PM, Joel Sherrill wrote:
>
> On November 7, 2014 2:40:43 AM CST, Eric Botcazou <ebotcazou@adacore.com> wrote:
>>> I think this would be good for 4.8, 4.9 and trunk.
>>>
>>> 2014-11-06  Daniel Hellstrom  <daniel@gaisler.com>
>>>
>>> 	* config.gcc (sparc-*-rtems*): Clean away unused t-elf
>>> 	* config/sparc/t-rtems: Add leon3v7 and muser-mode multilibs
>> OK everywhere as far as I'm concerned but the RTEMS folks have the
>> final say.
> Fine with me.
>
> Does spatc-elf need a refresh on its multilibs?
>
> --joel
diff mbox

Patch

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 9d3fa57..39cd227 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2662,7 +2662,7 @@  sparc-*-elf*)
 	;;
 sparc-*-rtems*)
 	tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
-	tmake_file="${tmake_file} sparc/t-sparc sparc/t-elf sparc/t-rtems"
+	tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems"
 	;;
 sparc-*-linux*)
 	tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
diff --git a/gcc/config/sparc/t-rtems b/gcc/config/sparc/t-rtems
index 86a2302..ae7a33a 100644
--- a/gcc/config/sparc/t-rtems
+++ b/gcc/config/sparc/t-rtems
@@ -17,6 +17,15 @@ 
 # <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/mcpu=leon3v7 muser-mode
+MULTILIB_DIRNAMES = soft v8 leon3 leon3v7 user-mode
 MULTILIB_MATCHES = msoft-float=mno-fpu
+
+MULTILIB_EXCEPTIONS = muser-mode
+MULTILIB_EXCEPTIONS += mcpu=leon3
+MULTILIB_EXCEPTIONS += mcpu=leon3v7
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3v7
+MULTILIB_EXCEPTIONS += msoft-float/muser-mode
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=v8/muser-mode
+MULTILIB_EXCEPTIONS += mcpu=v8/muser-mode