diff mbox

[SH,committed] Setting MULTILIB_EXCEPTIONS in gcc/config/sh/t-linux causes problems

Message ID 1427356282.19113.8.camel@yam-132-YW-E178-FTW
State New
Headers show

Commit Message

Oleg Endo March 26, 2015, 7:51 a.m. UTC
On Thu, 2015-03-26 at 09:45 +0900, Kaz Kojima wrote:
> Oleg Endo <oleg.endo@t-online.de> wrote:
> > Sorry, I'm a bit confused.  Do you mean something like the attached
> > patch?  If so, it means that the original patch for this problem
> > https://gcc.gnu.org/ml/gcc-patches/2015-03/msg00424.html
> > should have been in t-sh and not in t-linux, right?
> 
> Yes, I think so.  Even sh-elf configured with --with-endian='little,big'
> failed to build with the similar 'SH2a does not support little-endian'
> error.

I've committed the attached patches on trunk (r221685), 4.9 (r221686)
and 4.8 (r221687).

Cheers,
Oleg

Comments

David Howells March 26, 2015, 10:02 a.m. UTC | #1
> [1. text/x-patch; sh_multilib_sh1_sh2a_ml_1.patch]   

This works, thanks.  I see the following produced:

  vega>rpm -qlp gcc-sh-linux-gnu-5.0.0-0.1.fc23.x86_64.rpm | grep libgcc
  /usr/lib/gcc/sh-linux-gnu/5.0.0/libgcc.a
  /usr/lib/gcc/sh-linux-gnu/5.0.0/m2/libgcc.a
  /usr/lib/gcc/sh-linux-gnu/5.0.0/m2e/libgcc.a
  /usr/lib/gcc/sh-linux-gnu/5.0.0/m4-single-only/libgcc.a
  /usr/lib/gcc/sh-linux-gnu/5.0.0/m4-single/libgcc.a
  /usr/lib/gcc/sh-linux-gnu/5.0.0/m4/libgcc.a
  /usr/lib/gcc/sh-linux-gnu/5.0.0/mb/libgcc.a
  /usr/lib/gcc/sh-linux-gnu/5.0.0/mb/m2/libgcc.a
  /usr/lib/gcc/sh-linux-gnu/5.0.0/mb/m2a-single/libgcc.a
  /usr/lib/gcc/sh-linux-gnu/5.0.0/mb/m2a/libgcc.a
  /usr/lib/gcc/sh-linux-gnu/5.0.0/mb/m2e/libgcc.a
  /usr/lib/gcc/sh-linux-gnu/5.0.0/mb/m4-single-only/libgcc.a
  /usr/lib/gcc/sh-linux-gnu/5.0.0/mb/m4-single/libgcc.a
  /usr/lib/gcc/sh-linux-gnu/5.0.0/mb/m4/libgcc.a

for:

  --with-multilib-list=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single

David
diff mbox

Patch

Index: gcc/config/sh/t-sh
===================================================================
--- gcc/config/sh/t-sh	(revision 221685)
+++ gcc/config/sh/t-sh	(working copy)
@@ -63,8 +63,12 @@ 
     done \
   done)
 
-# SH1 only supports big endian.
+# SH1 and SH2A support big endian only.
+ifeq ($(DEFAULT_ENDIAN),ml)
+MULTILIB_EXCEPTIONS = m1 ml/m1 m2a* ml/m2a* $(TM_MULTILIB_EXCEPTIONS_CONFIG)
+else
 MULTILIB_EXCEPTIONS = ml/m1 ml/m2a* $(TM_MULTILIB_EXCEPTIONS_CONFIG)
+endif
 
 MULTILIB_OSDIRNAMES = \
 	$(OTHER_ENDIAN)=!$(OTHER_ENDIAN) \