This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: PATCH to generate libraries with mrenesas option for SH targets.


Hi Joern,

As per your suggestion, I have written a patch for SH target, which adds
the new configuration 
option "--enable-mrenesas" to build the mrenesas libraries. 
By default, libraries with "mrenesas" will not get built.

=============================Start Of
Patch================================================
gcc\ChangeLog

2005-06-24  Nitin Shah <nitins2@kpitcummins.com>
	* configure.in: Add --enable-mrenesas configure switch to build
mrenesas libraries.
	* configure: Regenerate.
	* config/sh/t-sh: Changed rule to generate libraries for
mrenesas compiler option for SH
	big endian as well as little endian supported targets.
	* Makefile.in (BASE_FLAGS_TO_PASS): Add
MULTILIB_MRENESAS_OPTION.

========================================================================
===================
--- gcc-4.1-20050611/configure.in.orig	2005-06-23 18:39:37.000000000
+0530
+++ gcc-4.1-20050611/configure.in	2005-06-23 18:41:37.000000000
+0530
@@ -2296,4 +2296,15 @@ case ${enable_werror} in
 esac
 AC_SUBST(stage2_werror_flag)
 
+AC_ARG_ENABLE(mrenesas,
+[  --enable-mrenesas    enable make rules to create mrenesas
libraries],
+      CREATE_MRENESAS_LIB=$enableval,
+      CREATE_MRENESAS_LIB=no)
+if test "$CREATE_MRENESAS_LIB" = yes; then
+  MULTILIB_MRENESAS_OPTION=mrenesas
+else
+  MULTILIB_MRENESAS_OPTION=
+fi
+AC_SUBST(MULTILIB_MRENESAS_OPTION)
+
 AC_OUTPUT(Makefile)
--- gcc-4.1-20050611/Makefile.in.orig	2005-06-23 18:39:46.000000000
+0530
+++ gcc-4.1-20050611/Makefile.in	2005-06-23 18:43:15.000000000
+0530
@@ -231,6 +231,9 @@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
 
 CXX_FOR_BUILD = $(CXX)
 
+# Use to create the mrenesas libraries
+MULTILIB_MRENESAS_OPTION =@MULTILIB_MRENESAS_OPTION@
+
 # Special variables passed down in EXTRA_GCC_FLAGS.  They are defined
 # here so that they can be overridden by Makefile fragments.
 BUILD_PREFIX = @BUILD_PREFIX@
@@ -575,6 +578,7 @@ BASE_FLAGS_TO_PASS = \
 	"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
 	"WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
 	"CONFIG_SHELL=$(SHELL)" \
+	"MULTILIB_MRENESAS_OPTION=$(MULTILIB_MRENESAS_OPTION)" \
 	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" 
 
 # For any flags above that may contain shell code that varies from one
--- gcc-4.1-20050611/gcc/config/sh/t-sh.orig	2005-06-23
18:40:04.000000000 +0530
+++ gcc-4.1-20050611/gcc/config/sh/t-sh	2005-06-23 18:45:46.000000000
+0530
@@ -22,9 +22,10 @@ fp-bit.c: $(srcdir)/config/fp-bit.c
 	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
 
 MULTILIB_ENDIAN = ml/mb
+MULTILIB_MRENESAS_OPTION =@MULTILIB_MRENESAS_OPTION@
 MULTILIB_CPUS=
$(ML_sh1)$(ML_sh2a)$(ML_sh2a_nofpu)$(ML_sh2a_single_only)$(ML_sh2a_singl
e)$(ML_sh2e)$(ML_sh2)$(ML_sh3e)$(ML_sh3)$(ML_sh4_nofpu)$(ML_sh4_single_o
nly)$(ML_sh4_single)$(ML_sh4)$(ML_sh4a_nofpu)$(ML_sh4a_single_only)$(ML_
sh4a_single)$(ML_sh4a)$(ML_sh5_32media)$(ML_sh5_32media_nofpu)$(ML_sh5_c
ompact)$(ML_sh5_compact_nofpu)$(ML_sh5_64media)$(ML_sh5_64media_nofpu)
 
-MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) $(MULTILIB_CPUS:/=)
+MULTILIB_OPTIONS= $(MULTILIB_MRENESAS_OPTION) $(MULTILIB_ENDIAN)
$(MULTILIB_CPUS:/=)
 MULTILIB_DIRNAMES= 
 
 # The separate entries for m2a-nofpu and m2a-single-only with
@@ -48,8 +49,8 @@ MULTILIB_MATCHES = $(shell \
     done \
   done)
 
-# SH1 only supports big endian.
-MULTILIB_EXCEPTIONS = ml/m1 ml/m2a*
+# SH1 and SH2a only supports big endian.
+MULTILIB_EXCEPTIONS = ml/m1 ml/m2a* $(MULTILIB_MRENESAS_OPTION)/ml
$(MULTILIB_MRENESAS_OPTION)/ml/m2a*
 
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib

==============================End Of
Patch==================================================

Regards,
Nitin Shah,
KPIT Cummins InfoSystems Ltd.
Pune, India

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free download of GNU based tool-chains for Renesas' SH and H8 Series.
The following site also offers free technical support to its users. 
Visit http://www.kpitgnutools.com for details. 
Latest versions of KPIT GNU tools were released on June 1, 2005.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

-----Original Message-----
From: Joern RENNECKE [mailto:joern.rennecke@st.com] 
Sent: Tuesday, March 08, 2005 5:15 AM
To: Nitin Shah
Cc: gcc-patches@gcc.gnu.org
Subject: Re: PATCH to generate libraries with mrenesas option for SH
targets.

> 005-03-07  Nitin Shah <nitins2@kpitcummins.com>
> 	* config/sh/t-sh : Changed rule to generate libraries built with
for 
> "mrenesas" compiler option for SH
> 	big endian as well as little endian targets.

Rejected.  We already build 13 multilibs by default for sh-elf - or
rather 14 at the moment, there seems to be a bug in MULTILIB_EXCEPTIONS.
I don't want to inflate this to 21 or 22. You can have a new sutarget
and/or new configuration options to build the -mrenesas libraries in
addition to or instead of the ordinary ones, but 22 libraries for a
'standard' configuration is getting out of hand.  The -mhitachi /
-mrenesas option has a long history of being not fully supported, and
never being quite compatible with the Hitachi / Renesas compiler, and
thus the implemented ABI is changed from time to time to get closer to
the (AFAICT nowhere publically documented) ABI of the Hitachi / Renesas
compiler.  All of these reasons mean that automatic regression tests are
bound to be slowed down and derailed by including -mrenesas libraries
into sh-elf.  Moreover, AFAICT the GNU ABIs give overall better code
than -mrenesas, so there is no compelling reason why someone who wants
to try an SH core / processor without any Renesas specific libraries
would want the -mrenesas libraries.  And if Renesas wants to bundle GNU
tools with together with their libraries / tools so that they
interoperate, they can select a configuration so that the required
libraries will be build. 




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