This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GAS patch for sh*-unknown-linux-gnu


Michael Eager wrote:
 > We patch binutils/gcc configure to support the following configurations:
 > 
 >          sh4el-unknown-linux-gnu
 >          sh4eb-unknown-linux-gnu
 >          sh3el-unknown-linux-gnu
 >          sh3eb-unknown-linux-gnu
 > 
 > I don't think that defaulting to big or little endian is a good idea.
 > It leads to unnecessary confusion.  (As if there ever is necessary
 > confusion. :-)) 
 > 
 > There is no preferred endianity, explicit is better, IMO.

It's somewhat too late to change CPU name in the triple.  Kernel does
return sh3 or sh4 (not sh3el or sh4el) and config.{guess,sub} support
them.  I mean, native configuration should work well and CPU name is
sh3/sh4/sh3eb/sh4eb.

Here's a patch to enable sh3/sh4/sh3eb/sh4eb.
Well, actually, it will work sh3el/sh4el/sh3eb/sh4eb...

And the documentation of SH options.

2001-10-29  NIIBE Yutaka  <gniibe@m17n.org>

	* configure.in: Handle sh*eb-*-linux* and sh*-*-linux*.
	* doc/c-sh.texi (SH Options): Added descriptions.

Index: gas/configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.80
diff -u -3 -p -r1.80 configure.in
--- configure.in	2001/10/17 05:38:41	1.80
+++ configure.in	2001/10/29 09:13:59
@@ -393,7 +393,8 @@ changequote([,])dnl
       s390x-*-linux-gnu*)   fmt=elf em=linux ;;
       s390-*-linux-gnu*)    fmt=elf em=linux ;;
 
-      sh-*-linux*)	    fmt=elf em=linux ;;
+      sh*eb-*-linux*)	    fmt=elf em=linux endian=big ;;
+      sh*-*-linux*)	    fmt=elf em=linux endian=little ;;
       sh-*-elf*)	    fmt=elf ;;
       sh-*-coff*)           fmt=coff bfd_gas=yes;;
       sh-*-pe*)             fmt=coff em=pe bfd_gas=yes endian=little ;;
Index: gas/doc/c-sh.texi
===================================================================
RCS file: /cvs/src/src/gas/doc/c-sh.texi,v
retrieving revision 1.2
diff -u -3 -p -r1.2 c-sh.texi
--- c-sh.texi	2001/03/08 23:24:26	1.2
+++ c-sh.texi	2001/10/29 09:13:59
@@ -18,10 +18,28 @@
 @node SH Options
 @section Options
 
-@cindex SH options (none)
-@cindex options, SH (none)
-@code{@value{AS}} has no additional command-line options for the Hitachi
+@cindex SH options
+@cindex options, SH
+@code{@value{AS}} has following command-line options for the Hitachi
 SH family.
+
+@table @code
+@kindex -little
+@kindex -big
+@kindex -relax
+@kindex -small
+@kindex -dsp
+@item -little
+Generate little endian code.
+@item -big
+Generate big endian code.
+@item -relax
+Alter jump instructions for long displacements.
+@item -small
+Align sections to 4 byte boundaries, not 16.
+@item -dsp
+Enable sh-dsp insns, and disable sh3e / sh4 insns.
+@end table
 
 @node SH Syntax
 @section Syntax
-- 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]