2009-04-17 Andrew Stubbs <ams@codesourcery.com>
authorams <ams@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Apr 2009 17:32:00 +0000 (17 17:32 +0000)
committerams <ams@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Apr 2009 17:32:00 +0000 (17 17:32 +0000)
* 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 (TM_ENDIAN_CONFIG): Define.
(TM_MULTILIB_CONFIG, TM_MULTILIB_EXCEPTIONS_CONFIG): Define.
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146278 138bc75d-0d04-0410-961f-82ee72b054a4

33 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/config.gcc
gcc/config/sh/t-1e [deleted file]
gcc/config/sh/t-linux
gcc/config/sh/t-mlib-sh1 [deleted file]
gcc/config/sh/t-mlib-sh2 [deleted file]
gcc/config/sh/t-mlib-sh2a [deleted file]
gcc/config/sh/t-mlib-sh2a-nofpu [deleted file]
gcc/config/sh/t-mlib-sh2a-single [deleted file]
gcc/config/sh/t-mlib-sh2a-single-only [deleted file]
gcc/config/sh/t-mlib-sh2e [deleted file]
gcc/config/sh/t-mlib-sh3 [deleted file]
gcc/config/sh/t-mlib-sh3e [deleted file]
gcc/config/sh/t-mlib-sh4 [deleted file]
gcc/config/sh/t-mlib-sh4-nofpu [deleted file]
gcc/config/sh/t-mlib-sh4-single [deleted file]
gcc/config/sh/t-mlib-sh4-single-only [deleted file]
gcc/config/sh/t-mlib-sh4a [deleted file]
gcc/config/sh/t-mlib-sh4a-nofpu [deleted file]
gcc/config/sh/t-mlib-sh4a-single [deleted file]
gcc/config/sh/t-mlib-sh4a-single-only [deleted file]
gcc/config/sh/t-mlib-sh4al [deleted file]
gcc/config/sh/t-mlib-sh5-32media [deleted file]
gcc/config/sh/t-mlib-sh5-32media-nofpu [deleted file]
gcc/config/sh/t-mlib-sh5-64media [deleted file]
gcc/config/sh/t-mlib-sh5-64media-nofpu [deleted file]
gcc/config/sh/t-mlib-sh5-compact [deleted file]
gcc/config/sh/t-mlib-sh5-compact-nofpu [deleted file]
gcc/config/sh/t-sh
gcc/configure
gcc/configure.ac
gcc/doc/install.texi

index a269b1c..69aaa37 100644 (file)
@@ -1,3 +1,51 @@
+2009-04-17  Andrew Stubbs  <ams@codesourcery.com>
+
+       * 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 (TM_ENDIAN_CONFIG): Define.
+       (TM_MULTILIB_CONFIG, TM_MULTILIB_EXCEPTIONS_CONFIG): Define.
+       * 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.
+
 2009-04-17  Rafael Avila de Espindola  <espindola@google.com>
 
        * Makefile.in (REVISION_s): Always include quotes. Change ifdef to use
index 9236f14..43532b0 100644 (file)
@@ -403,6 +403,9 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
 
 xmake_file=@xmake_file@
 tmake_file=@tmake_file@
+TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
+TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
+TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
 out_file=$(srcdir)/config/@out_file@
 out_object_file=@out_object_file@
 md_file=$(srcdir)/config/@md_file@
index 1016526..a2c7032 100644 (file)
@@ -1989,9 +1989,14 @@ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
                *)                                 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]*-*-symbianelf* | \
        *)      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]*-*-symbianelf* | \
        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
diff --git a/gcc/config/sh/t-1e b/gcc/config/sh/t-1e
deleted file mode 100644 (file)
index 74b0f9a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-MULTILIB_ENDIAN =
index b7a3d7c..13ff848 100644 (file)
@@ -4,6 +4,5 @@ LIB2FUNCS_EXTRA= $(srcdir)/config/sh/linux-atomic.asm
 
 MULTILIB_DIRNAMES= 
 MULTILIB_MATCHES = 
-MULTILIB_EXCEPTIONS=
 
 EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
diff --git a/gcc/config/sh/t-mlib-sh1 b/gcc/config/sh/t-mlib-sh1
deleted file mode 100644 (file)
index 9ba7054..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh1=m1/
diff --git a/gcc/config/sh/t-mlib-sh2 b/gcc/config/sh/t-mlib-sh2
deleted file mode 100644 (file)
index d8857ba..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2=m2/
diff --git a/gcc/config/sh/t-mlib-sh2a b/gcc/config/sh/t-mlib-sh2a
deleted file mode 100644 (file)
index e276ac9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2a=m2a/
diff --git a/gcc/config/sh/t-mlib-sh2a-nofpu b/gcc/config/sh/t-mlib-sh2a-nofpu
deleted file mode 100644 (file)
index a84874e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2a_nofpu=m2a-nofpu/
diff --git a/gcc/config/sh/t-mlib-sh2a-single b/gcc/config/sh/t-mlib-sh2a-single
deleted file mode 100644 (file)
index b3432fa..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2a_single=m2a-single/
diff --git a/gcc/config/sh/t-mlib-sh2a-single-only b/gcc/config/sh/t-mlib-sh2a-single-only
deleted file mode 100644 (file)
index e34afe2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2a_single_only=m2a-single-only/
diff --git a/gcc/config/sh/t-mlib-sh2e b/gcc/config/sh/t-mlib-sh2e
deleted file mode 100644 (file)
index 5884132..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2e=m2e/
diff --git a/gcc/config/sh/t-mlib-sh3 b/gcc/config/sh/t-mlib-sh3
deleted file mode 100644 (file)
index 2c89d74..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh3=m3/
diff --git a/gcc/config/sh/t-mlib-sh3e b/gcc/config/sh/t-mlib-sh3e
deleted file mode 100644 (file)
index ca18b1b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh3e=m3e/
diff --git a/gcc/config/sh/t-mlib-sh4 b/gcc/config/sh/t-mlib-sh4
deleted file mode 100644 (file)
index be7f5c4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4=m4/
diff --git a/gcc/config/sh/t-mlib-sh4-nofpu b/gcc/config/sh/t-mlib-sh4-nofpu
deleted file mode 100644 (file)
index fa12433..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4_nofpu=m4-nofpu/
diff --git a/gcc/config/sh/t-mlib-sh4-single b/gcc/config/sh/t-mlib-sh4-single
deleted file mode 100644 (file)
index f81bddd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4_single=m4-single/
diff --git a/gcc/config/sh/t-mlib-sh4-single-only b/gcc/config/sh/t-mlib-sh4-single-only
deleted file mode 100644 (file)
index 121d598..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4_single_only=m4-single-only/
diff --git a/gcc/config/sh/t-mlib-sh4a b/gcc/config/sh/t-mlib-sh4a
deleted file mode 100644 (file)
index 788b852..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4a=m4a/
diff --git a/gcc/config/sh/t-mlib-sh4a-nofpu b/gcc/config/sh/t-mlib-sh4a-nofpu
deleted file mode 100644 (file)
index c9dc28b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4a_nofpu=m4a-nofpu/
diff --git a/gcc/config/sh/t-mlib-sh4a-single b/gcc/config/sh/t-mlib-sh4a-single
deleted file mode 100644 (file)
index 036a4cc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4a_single=m4a-single/
diff --git a/gcc/config/sh/t-mlib-sh4a-single-only b/gcc/config/sh/t-mlib-sh4a-single-only
deleted file mode 100644 (file)
index 5709e8e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4a_single_only=m4a-single-only/
diff --git a/gcc/config/sh/t-mlib-sh4al b/gcc/config/sh/t-mlib-sh4al
deleted file mode 100644 (file)
index e8e36ba..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4al=m4al/
diff --git a/gcc/config/sh/t-mlib-sh5-32media b/gcc/config/sh/t-mlib-sh5-32media
deleted file mode 100644 (file)
index f03fd29..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_32media=m5-32media/
diff --git a/gcc/config/sh/t-mlib-sh5-32media-nofpu b/gcc/config/sh/t-mlib-sh5-32media-nofpu
deleted file mode 100644 (file)
index 0d84f0e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_32media_nofpu=m5-32media-nofpu/
diff --git a/gcc/config/sh/t-mlib-sh5-64media b/gcc/config/sh/t-mlib-sh5-64media
deleted file mode 100644 (file)
index d324f62..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_64media=m5-64media/
diff --git a/gcc/config/sh/t-mlib-sh5-64media-nofpu b/gcc/config/sh/t-mlib-sh5-64media-nofpu
deleted file mode 100644 (file)
index 127bc47..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_64media_nofpu=m5-64media-nofpu/
diff --git a/gcc/config/sh/t-mlib-sh5-compact b/gcc/config/sh/t-mlib-sh5-compact
deleted file mode 100644 (file)
index e330c25..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_compact=m5-compact/
diff --git a/gcc/config/sh/t-mlib-sh5-compact-nofpu b/gcc/config/sh/t-mlib-sh5-compact-nofpu
deleted file mode 100644 (file)
index cf6afdc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_compact_nofpu=m5-compact-nofpu/
index 5f1e8fb..1511d2f 100644 (file)
@@ -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 dbe7426..6d1b6e0 100755 (executable)
@@ -458,7 +458,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump gcc_cv_readelf libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines use_gcc_stdint c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC pluginlibs enable_plugin LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump gcc_cv_readelf libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file TM_ENDIAN_CONFIG TM_MULTILIB_CONFIG TM_MULTILIB_EXCEPTIONS_CONFIG extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines use_gcc_stdint c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC pluginlibs enable_plugin LIBOBJS LTLIBOBJS'
 ac_subst_files='language_hooks'
 ac_pwd=`pwd`
 
@@ -1108,6 +1108,7 @@ Optional Packages:
   --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
   --with-pkgversion=PKG   Use PKG in the version string in place of "GCC"
   --with-bugurl=URL       Direct users to URL to report a bug
+  --with-multilib-list    Select multilibs (SH only)
   --with-gnu-ld           assume the C compiler uses GNU ld default=no
   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
@@ -8138,6 +8139,15 @@ fi;
 
 
 
+
+# Check whether --with-multilib-list or --without-multilib-list was given.
+if test "${with_multilib_list+set}" = set; then
+  withval="$with_multilib_list"
+  :
+else
+  with_multilib_list=default
+fi;
+
 # -------------------------
 # Checks for other programs
 # -------------------------
@@ -14349,13 +14359,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:14352: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:14362: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:14355: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:14365: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:14358: output\"" >&5)
+  (eval echo "\"\$as_me:14368: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -15512,7 +15522,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 15515 "configure"' > conftest.$ac_ext
+  echo '#line 15525 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -16811,11 +16821,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16814: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16824: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16818: \$? = $ac_status" >&5
+   echo "$as_me:16828: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17150,11 +17160,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17153: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17163: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17157: \$? = $ac_status" >&5
+   echo "$as_me:17167: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17255,11 +17265,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17258: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17268: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17262: \$? = $ac_status" >&5
+   echo "$as_me:17272: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -17310,11 +17320,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17313: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17323: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17317: \$? = $ac_status" >&5
+   echo "$as_me:17327: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -20122,7 +20132,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 20125 "configure"
+#line 20135 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -20218,7 +20228,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 20221 "configure"
+#line 20231 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -24647,6 +24657,9 @@ fi;
 
 
 
+
+
+
 # Echo link setup.
 if test x${build} = x${host} ; then
   if test x${host} = x${target} ; then
@@ -25696,6 +25709,9 @@ s,@check_languages@,$check_languages,;t t
 s,@cpp_install_dir@,$cpp_install_dir,;t t
 s,@xmake_file@,$xmake_file,;t t
 s,@tmake_file@,$tmake_file,;t t
+s,@TM_ENDIAN_CONFIG@,$TM_ENDIAN_CONFIG,;t t
+s,@TM_MULTILIB_CONFIG@,$TM_MULTILIB_CONFIG,;t t
+s,@TM_MULTILIB_EXCEPTIONS_CONFIG@,$TM_MULTILIB_EXCEPTIONS_CONFIG,;t t
 s,@extra_gcc_objs@,$extra_gcc_objs,;t t
 s,@extra_headers_list@,$extra_headers_list,;t t
 s,@extra_objs@,$extra_objs,;t t
index 07e4c6d..51e1a74 100644 (file)
@@ -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 07b807b..7cba4d3 100644 (file)
@@ -983,6 +983,57 @@ sysv, aix.
 
 @end table
 
+@item --with-multilib-list=@var{list}
+@itemx --without-multilib-list
+Specify what multilibs to build.
+Currently only 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