From 086571a4b1555c2ad4267c8eeae1903d9344f1f3 Mon Sep 17 00:00:00 2001 From: pbrook Date: Fri, 17 Mar 2006 14:48:58 +0000 Subject: [PATCH] 2006-03-17 Paul Brook * doc/install.texi: Docuemnt --with-mode. * config.gcc: Add --with-mode for arm*-*-*. * config/arm/arm.h (OPTION_DEFAULT_SPECS): Add "mode". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112174 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config.gcc | 13 ++++++++++++- gcc/config/arm/arm.h | 3 ++- gcc/doc/install.texi | 4 ++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 865f926a44e..bc62af968a2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-03-17 Paul Brook + + * doc/install.texi: Docuemnt --with-mode. + * config.gcc: Add --with-mode for arm*-*-*. + * config/arm/arm.h (OPTION_DEFAULT_SPECS): Add "mode". + 2006-03-17 J"orn Rennecke * sh.c (max_labelno_before_reorg): New variable. diff --git a/gcc/config.gcc b/gcc/config.gcc index 0af55a57ad0..121315697e9 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2564,7 +2564,7 @@ case "${target}" in ;; arm*-*-*) - supported_defaults="arch cpu float tune fpu abi" + supported_defaults="arch cpu float tune fpu abi mode" for which in cpu tune; do # See if it matches any of the entries in arm-cores.def eval "val=\$with_$which" @@ -2632,6 +2632,17 @@ case "${target}" in ;; esac + case "$with_mode" in + "" \ + | arm | thumb ) + #OK + ;; + *) + echo "Unknown mode used in --with-mode=$with_mode" + exit 1 + ;; + esac + if test "x$with_arch" != x && test "x$with_cpu" != x; then echo "Warning: --with-arch overrides --with-cpu=$with_cpu" 1>&2 fi diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index e2826dce49a..6cc612b0d9f 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -220,7 +220,8 @@ extern GTY(()) rtx aof_pic_label; {"float", \ "%{!msoft-float:%{!mhard-float:%{!mfloat-abi=*:-mfloat-abi=%(VALUE)}}}" }, \ {"fpu", "%{!mfpu=*:-mfpu=%(VALUE)}"}, \ - {"abi", "%{!mabi=*:-mabi=%(VALUE)}"}, + {"abi", "%{!mabi=*:-mabi=%(VALUE)}"}, \ + {"mode", "%{!marm:%{!mthumb:-m%(VALUE)}}"}, /* Which floating point model to use. */ enum arm_fp_model diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 3eb837effdc..19201b85819 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -995,6 +995,10 @@ options and for @option{-mhard-float} or @option{-msoft-float}. As with @option{--with-cpu}, which switches will be accepted and acceptable values of the arguments depend on the target. +@item --with-mode=@var{mode} +Specify if the compiler should default to @option{-marm} or @option{-mthumb}. +This option is only supported on ARM targets. + @item --with-divide=@var{type} Specify how the compiler should generate code for checking for division by zero. This option is only supported on the MIPS target. -- 2.11.4.GIT