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][SH] Multilib selection rework


On 09/04/09 18:26, Ralf Wildenhues wrote:
+ !*) # TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh

Quoting within shell 'case' patterns should be done with a backslash.

I've fixed this one.


+			# It is passed the MULTILIB_EXCEPTIONS verbatim.
+			TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;

This one is already quoted?


--- src/gcc-mainline/gcc/config/sh/t-sh.orig
+++ src/gcc-mainline/gcc/config/sh/t-sh

+MULTILIB_OSDIRNAMES = \
+	$(OTHER_ENDIAN)=!$(OTHER_ENDIAN) \

Here I guess you can just use single or double quotes.

This is not in a shell script, it's in a makefile. The make variable must be quoted before it's passed to any shell, or the spaces wouldn't work, so I think this is safe.


Is the attached patch OK? I really want to get this, or something like it, checked in.

Thanks

Andrew
2009-04-17  Andrew Stubbs  <ams@codesourcery.com>

	gcc/
	* configure.ac: Add new AC_SUBST for TM_ENDIAN_CONFIG,
	TM_MULTILIB_CONFIG and TM_MULTILIB_EXCEPTIONS_CONFIG.
	(--with-multilib-list): Add default value.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* config.gcc (sh-*-*): Switch to using TM_ENDIAN_CONFIG,
	TM_MULTILIB_CONFIG, and TM_MULTILIB_EXCEPTIONS_CONFIG.
	Don't add default cpu to multilib list unnecessarily, but do enable
	the relevant compiler option..
	Add support for --with-multilib-list=<blank> and
	--with-multilib-list=!<somelib> to supress unwanted multilibs.
	* config/sh/t-sh (DEFAULT_ENDIAN, OTHER_ENDIAN): New variables.
	(MULTILIB_ENDIAN, MULTILIB_CPUS): Delete variables.
	(MULTILIB_OPTIONS): Redefine using OTHER_ENDIAN and
	TM_MULTILIB_CONFIG.
	(MULTILIB_EXCEPTIONS): Add TM_MULTILIB_EXCEPTIONS_CONFIG.
	(MULTILIB_OSDIRNAMES): New variable.
	* config/sh/t-1e: Delete file.
	* config/sh/t-mlib-sh1: Delete file.
	* config/sh/t-mlib-sh2: Delete file.
	* config/sh/t-mlib-sh2a: Delete file.
	* config/sh/t-mlib-sh2a-nofpu: Delete file.
	* config/sh/t-mlib-sh2a-single: Delete file.
	* config/sh/t-mlib-sh2a-single-only: Delete file.
	* config/sh/t-mlib-sh2e: Delete file.
	* config/sh/t-mlib-sh3e: Delete file.
	* config/sh/t-mlib-sh4: Delete file.
	* config/sh/t-mlib-sh4-nofpu: Delete file.
	* config/sh/t-mlib-sh4-single: Delete file.
	* config/sh/t-mlib-sh4-single-only: Delete file.
	* config/sh/t-mlib-sh4a: Delete file.
	* config/sh/t-mlib-sh4a-nofpu: Delete file.
	* config/sh/t-mlib-sh4a-single: Delete file.
	* config/sh/t-mlib-sh4a-single-only: Delete file.
	* config/sh/t-mlib-sh4al: Delete file.
	* config/sh/t-mlib-sh5-32media: Delete file.
	* config/sh/t-mlib-sh5-32media-nofpu: Delete file.
	* config/sh/t-mlib-sh5-64media: Delete file.
	* config/sh/t-mlib-sh5-64media-nofpu: Delete file.
	* config/sh/t-mlib-sh5-compact: Delete file.
	* config/sh/t-mlib-sh5-compact-nofpu: Delete file.
	* config/sh/t-linux: Don't override MULTILIB_EXCEPTIONS.
	* doc/install.texi (Options specification): Add
	--with-multilib-list and --with-endian.

---
 src/gcc-mainline/gcc/Makefile.in                        |    3 
 src/gcc-mainline/gcc/config.gcc                         |   40 ++++++++----
 src/gcc-mainline/gcc/config/sh/t-1e                     |    1 
 src/gcc-mainline/gcc/config/sh/t-linux                  |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh1               |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh2               |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh2a              |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh2a-nofpu        |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh2a-single       |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh2a-single-only  |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh2e              |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh3               |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh3e              |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh4               |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh4-nofpu         |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh4-single        |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh4-single-only   |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh4a              |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh4a-nofpu        |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh4a-single       |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh4a-single-only  |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh4al             |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh5-32media       |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh5-32media-nofpu |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh5-64media       |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh5-64media-nofpu |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh5-compact       |    1 
 src/gcc-mainline/gcc/config/sh/t-mlib-sh5-compact-nofpu |    1 
 src/gcc-mainline/gcc/config/sh/t-sh                     |   35 +++++++++-
 src/gcc-mainline/gcc/configure                          |   46 +++++++++-----
 src/gcc-mainline/gcc/configure.ac                       |    8 ++
 src/gcc-mainline/gcc/doc/install.texi                   |   51 ++++++++++++++++
 32 files changed, 150 insertions(+), 59 deletions(-)

Index: src/gcc-mainline/gcc/config.gcc
===================================================================
--- src/gcc-mainline/gcc/config.gcc.orig
+++ src/gcc-mainline/gcc/config.gcc
@@ -1989,9 +1989,14 @@ sh-*-symbianelf* | sh[12346l]*-*-symbian
 		*)				   with_endian=big,little ;;
 		esac
 	fi
+	# TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
+	#  First word : the default endian.
+	#  Second word: the secondary endian (optional).
 	case ${with_endian} in
-	big|little)	tmake_file="${tmake_file} sh/t-1e" ;;
-	big,little|little,big) ;;
+	big)		TM_ENDIAN_CONFIG=mb ;;
+	little)		TM_ENDIAN_CONFIG=ml ;;
+	big,little)	TM_ENDIAN_CONFIG="mb ml" ;;
+	little,big)	TM_ENDIAN_CONFIG="ml mb" ;;
 	*)	echo "with_endian=${with_endian} not supported."; exit 1 ;;
 	esac
 	case ${with_endian} in
@@ -2101,7 +2106,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbian
 	*)	echo "with_cpu=$with_cpu not supported"; exit 1 ;;
 	esac
 	sh_multilibs=${with_multilib_list}
-	if test x${sh_multilibs} = x ; then
+	if test "$sh_multilibs" = "default" ; then
 		case ${target} in
 		sh64-superh-linux* | \
 		sh[1234]*)	sh_multilibs=${sh_cpu_target} ;;
@@ -2117,25 +2122,32 @@ sh-*-symbianelf* | sh[12346l]*-*-symbian
 	fi
 	target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
 	tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
-	sh_multilibs=`echo $sh_multilibs,$sh_cpu_default | sed -e 's/[ 	,/][ 	,]*/ /g' -e 's/ $//' -e 's/^m/sh/' -e 's/ m/ sh/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
+	tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
+	sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^sh/m/i' -e 's/ sh/ m/gi' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
 	for sh_multilib in ${sh_multilibs}; do
 		case ${sh_multilib} in
-		sh1 | sh2 | sh2e | sh3 | sh3e | \
-		sh4 | sh4-single | sh4-single-only | sh4-nofpu | sh4-300 |\
-		sh4a | sh4a-single | sh4a-single-only | sh4a-nofpu | sh4al | \
-		sh2a | sh2a-single | sh2a-single-only | sh2a-nofpu | \
-		sh5-64media | sh5-64media-nofpu | \
-		sh5-32media | sh5-32media-nofpu | \
-		sh5-compact | sh5-compact-nofpu)
-			tmake_file="${tmake_file} sh/t-mlib-${sh_multilib}"
-			tm_defines="$tm_defines SUPPORT_`echo $sh_multilib|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
-			;;
+		m1 | m2 | m2e | m3 | m3e | \
+		m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
+		m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
+		m2a | m2a-single | m2a-single-only | m2a-nofpu | \
+		m5-64media | m5-64media-nofpu | \
+		m5-32media | m5-32media-nofpu | \
+		m5-compact | m5-compact-nofpu)
+			# TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
+			# It is passed to MULTIILIB_OPTIONS verbatim.
+			TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
+			tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
+			;;
+		\!*)	# TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
+			# It is passed the MULTILIB_EXCEPTIONS verbatim.
+			TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
 		*)
 			echo "with_multilib_list=${sh_multilib} not supported."
 			exit 1
 			;;
 		esac
 	done
+	TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
 	if test x${enable_incomplete_targets} = xyes ; then
 		tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1"
 	fi
Index: src/gcc-mainline/gcc/config/sh/t-1e
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-1e
+++ /dev/null
@@ -1 +0,0 @@
-MULTILIB_ENDIAN =
Index: src/gcc-mainline/gcc/config/sh/t-linux
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-linux.orig
+++ src/gcc-mainline/gcc/config/sh/t-linux
@@ -4,6 +4,5 @@ LIB2FUNCS_EXTRA= $(srcdir)/config/sh/lin
 
 MULTILIB_DIRNAMES= 
 MULTILIB_MATCHES = 
-MULTILIB_EXCEPTIONS=
 
 EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh1
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh1
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh1=m1/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh2
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh2
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2=m2/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh2a
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh2a
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2a=m2a/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh2a-nofpu
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh2a-nofpu
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2a_nofpu=m2a-nofpu/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh2a-single
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh2a-single
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2a_single=m2a-single/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh2a-single-only
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh2a-single-only
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2a_single_only=m2a-single-only/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh2e
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh2e
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2e=m2e/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh3
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh3
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh3=m3/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh3e
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh3e
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh3e=m3e/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh4
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh4
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4=m4/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh4-nofpu
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh4-nofpu
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4_nofpu=m4-nofpu/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh4-single
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh4-single
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4_single=m4-single/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh4-single-only
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh4-single-only
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4_single_only=m4-single-only/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh4a
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh4a
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4a=m4a/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh4a-nofpu
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh4a-nofpu
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4a_nofpu=m4a-nofpu/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh4a-single
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh4a-single
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4a_single=m4a-single/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh4a-single-only
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh4a-single-only
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4a_single_only=m4a-single-only/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh4al
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh4al
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4al=m4al/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh5-32media
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh5-32media
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_32media=m5-32media/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh5-32media-nofpu
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh5-32media-nofpu
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_32media_nofpu=m5-32media-nofpu/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh5-64media
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh5-64media
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_64media=m5-64media/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh5-64media-nofpu
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh5-64media-nofpu
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_64media_nofpu=m5-64media-nofpu/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh5-compact
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh5-compact
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_compact=m5-compact/
Index: src/gcc-mainline/gcc/config/sh/t-mlib-sh5-compact-nofpu
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-mlib-sh5-compact-nofpu
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_compact_nofpu=m5-compact-nofpu/
Index: src/gcc-mainline/gcc/config/sh/t-sh
===================================================================
--- src/gcc-mainline/gcc/config/sh/t-sh.orig
+++ src/gcc-mainline/gcc/config/sh/t-sh
@@ -27,10 +27,10 @@ fp-bit.c: $(srcdir)/config/fp-bit.c
 	echo '#endif' 		>> fp-bit.c
 	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
 
-MULTILIB_ENDIAN = ml/mb
-MULTILIB_CPUS= $(ML_sh1)$(ML_sh2a)$(ML_sh2a_nofpu)$(ML_sh2a_single_only)$(ML_sh2a_single)$(ML_sh2e)$(ML_sh2)$(ML_sh3e)$(ML_sh3)$(ML_sh4_nofpu)$(ML_sh4_single_only)$(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_compact)$(ML_sh5_compact_nofpu)$(ML_sh5_64media)$(ML_sh5_64media_nofpu)
+DEFAULT_ENDIAN = $(word 1,$(TM_ENDIAN_CONFIG))
+OTHER_ENDIAN = $(word 2,$(TM_ENDIAN_CONFIG))
 
-MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) $(MULTILIB_CPUS:/=)
+MULTILIB_OPTIONS= $(OTHER_ENDIAN) $(TM_MULTILIB_CONFIG)
 MULTILIB_DIRNAMES= 
 
 # The separate entries for m2a-nofpu and m2a-single-only with
@@ -58,7 +58,34 @@ MULTILIB_MATCHES = $(shell \
   done)
 
 # SH1 only supports big endian.
-MULTILIB_EXCEPTIONS = ml/m1 ml/m2a*
+MULTILIB_EXCEPTIONS = ml/m1 ml/m2a* $(TM_MULTILIB_EXCEPTIONS_CONFIG)
+
+MULTILIB_OSDIRNAMES = \
+	$(OTHER_ENDIAN)=!$(OTHER_ENDIAN) \
+	m1=!m1 $(OTHER_ENDIAN)/m1=!$(OTHER_ENDIAN)/m1 \
+	m2a=!m2a $(OTHER_ENDIAN)/m2a=!$(OTHER_ENDIAN)/m2a \
+	m2a-nofpu=!m2a-nofpu $(OTHER_ENDIAN)/m2a-nofpu=!$(OTHER_ENDIAN)/m2a-nofpu \
+	m2a-single-only=!m2a-single-only $(OTHER_ENDIAN)/m2a-single-only=!$(OTHER_ENDIAN)/m2a-single-only \
+	m2a-single=!m2a-single $(OTHER_ENDIAN)/m2a-single=!$(OTHER_ENDIAN)/m2a-single \
+	m2e=!m2e $(OTHER_ENDIAN)/m2e=!$(OTHER_ENDIAN)/m2e \
+	m2=!m2 $(OTHER_ENDIAN)/m2=!$(OTHER_ENDIAN)/m2 \
+	m3e=!m3e $(OTHER_ENDIAN)/m3e=!$(OTHER_ENDIAN)/m3e \
+	m3=!m3 $(OTHER_ENDIAN)/m3=!$(OTHER_ENDIAN)/m3 \
+	m4-nofpu=!m4-nofpu $(OTHER_ENDIAN)/m4-nofpu=!$(OTHER_ENDIAN)/m4-nofpu \
+	m4-single-only=!m4-single-only $(OTHER_ENDIAN)/m4-single-only=!$(OTHER_ENDIAN)/m4-single-only \
+	m4-single=!m4-single $(OTHER_ENDIAN)/m4-single=!$(OTHER_ENDIAN)/m4-single \
+	m4=!m4 $(OTHER_ENDIAN)/m4=!$(OTHER_ENDIAN)/m4 \
+	m4a-nofpu=!m4a-nofpu $(OTHER_ENDIAN)/m4a-nofpu=!$(OTHER_ENDIAN)/m4a-nofpu \
+	m4a-single-only=!m4a-single-only $(OTHER_ENDIAN)/m4a-single-only=!$(OTHER_ENDIAN)/m4a-single-only \
+	m4a-single=!m4a-single $(OTHER_ENDIAN)/m4a-single=!$(OTHER_ENDIAN)/m4a-single \
+	m4a=!m4a $(OTHER_ENDIAN)/m4a=!$(OTHER_ENDIAN)/m4a \
+	m4al=!m4al $(OTHER_ENDIAN)/m4al=!$(OTHER_ENDIAN)/m4al \
+	m5-32media=!m5-32media $(OTHER_ENDIAN)/m5-32media=!$(OTHER_ENDIAN)/m5-32media \
+	m5-32media-nofpu=!m5-32media-nofpu $(OTHER_ENDIAN)/m5-32media-nofpu=!$(OTHER_ENDIAN)/m5-32media-nofpu \
+	m5-compact=!m5-compact $(OTHER_ENDIAN)/m5-compact=!$(OTHER_ENDIAN)/m5-compact \
+	m5-compact-nofpu=!m5-compact-nofpu $(OTHER_ENDIAN)/m5-compact-nofpu=!$(OTHER_ENDIAN)/m5-compact-nofpu \
+	m5-64media=!m5-64media $(OTHER_ENDIAN)/m5-64media=!$(OTHER_ENDIAN)/m5-64media \
+	m5-64media-nofpu=!m5-64media-nofpu $(OTHER_ENDIAN)/m5-64media-nofpu=!$(OTHER_ENDIAN)/m5-64media-nofpu
 
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib
Index: src/gcc-mainline/gcc/configure.ac
===================================================================
--- src/gcc-mainline/gcc/configure.ac.orig
+++ src/gcc-mainline/gcc/configure.ac
@@ -810,6 +810,11 @@ AC_SUBST(datarootdir)
 AC_SUBST(docdir)
 AC_SUBST(htmldir)
 
+AC_ARG_WITH(multilib-list,
+[  --with-multilib-list    Select multilibs (SH only)],
+:,
+with_multilib_list=default)
+
 # -------------------------
 # Checks for other programs
 # -------------------------
@@ -3879,6 +3884,9 @@ AC_SUBST(check_languages)
 AC_SUBST(cpp_install_dir)
 AC_SUBST(xmake_file)
 AC_SUBST(tmake_file)
+AC_SUBST(TM_ENDIAN_CONFIG)
+AC_SUBST(TM_MULTILIB_CONFIG)
+AC_SUBST(TM_MULTILIB_EXCEPTIONS_CONFIG)
 AC_SUBST(extra_gcc_objs)
 AC_SUBST(extra_headers_list)
 AC_SUBST(extra_objs)
Index: src/gcc-mainline/gcc/doc/install.texi
===================================================================
--- src/gcc-mainline/gcc/doc/install.texi.orig
+++ src/gcc-mainline/gcc/doc/install.texi
@@ -988,6 +988,57 @@ sysv, aix.
 
 @end table
 
+@item --with-multilib-list=@var{list}
+@itemx --without-multilib-list
+Specify what multilibs to build.
+Currently on implemented for sh*-*-*.
+
+@var{list} is a comma separated list of CPU names.  These must be of the
+form @code{sh*} or @code{m*} (in which case they match the compiler option
+for that processor).  The list should not contain any endian options -
+these are handled by @option{--with-endian}.
+
+If @var{list} is empty, then there will be no multilibs for extra
+processors.  The multilib for the secondary endian remains enabled.
+
+As a special case, if an entry in the list starts with a @code{!}
+(exclamation point), then it is added to the list of excluded multilibs.
+Entries of this sort should be compatible with @samp{MULTILIB_EXCLUDES}
+(once the leading @code{!} has been stripped).
+
+If @option{--with-multilib-list} is not given, then a default set of
+multilibs is selected based on the value of @option{--target}.  This is
+usually the complete set of libraries, but some targets imply a more
+specialized subset.
+
+Example 1: to configure a compiler for SH4A only, but supporting both
+endians, with little endian being the default:
+@smallexample
+--with-cpu=sh4a --with-endian=little,big --with-multilib-list=
+@end smallexample
+
+Example 2: to configure a compiler for both SH4A and SH4AL-DSP, but with
+only little endian SH4AL:
+@smallexample
+--with-cpu=sh4a --with-endian=little,big --with-multilib-list=sh4al,!mb/m4al
+@end smallexample
+
+@item --with-endian=@var{endians}
+Specify what endians to use.
+Currently only implemented for sh*-*-*.
+
+@var{endians} may be one of the following:
+@table @code
+@item big
+Use big endian exclusively.
+@item little
+Use little endian exclusively.
+@item big,little
+Use big endian by default.  Provide a multilib for little endian.
+@item little,big
+Use little endian by default.  Provide a multilib for big endian.
+@end table
+
 @item --enable-threads
 Specify that the target
 supports threads.  This affects the Objective-C compiler and runtime

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