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]

[csl-arm-branch] More configure defaults.


More configure time defaults:
- I missed a few -s' in my previous patch.
- Make -mfloat-abi work properly.
- Use -mfloat-abi instead of -m{hard,soft}-float when --with-float is
specified
- Add --with-fpu=, corresponding to -mfpu= at compile time.

Tested with cross compiler to arm-none-elf.
Ok?

Paul

2004-01-14  Paul Brook  <paul@codesourcery.com>

	* config.gcc: Add with_fpu.  Allow with-float=softfp.
	* config/arm/arm.c (arm_override_options): Rename *-s to *s.
	Break out of look when we find a float-abi.  Fix typo.
	* arm.h (OPTION_DEFAULT_SPECS): Set -mfloat-abi=.  Add "fpu".
	* install.texi: Document --with-fpu=.

Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.405.4.2
diff -u -p -r1.405.4.2 config.gcc
--- gcc/config.gcc	14 Jan 2004 13:40:55 -0000	1.405.4.2
+++ gcc/config.gcc	14 Jan 2004 16:04:41 -0000
@@ -2399,7 +2399,7 @@ fi
 		;;
 
 	arm*-*-*)
-		supported_defaults="arch cpu float tune"
+		supported_defaults="arch cpu float tune fpu"
 		for which in cpu tune; do
 			eval "val=\$with_$which"
 			case "$val" in
@@ -2438,7 +2438,7 @@ fi
 
 		case "$with_float" in
 		"" \
-		| soft | hard)
+		| soft | hard | softfp)
 			# OK
 			;;
 		*)
@@ -2447,6 +2447,17 @@ fi
 			;;
 		esac
 
+		case "$with_fpu" in
+		"" \
+		| fpa | fpe2 | fpe3 | maverick | vfp )
+			# OK
+			;;
+		*)
+			echo "Unknown fpu used in --with-fpu=$fpu" 2>&1
+			exit 1
+			;;
+		esac
+
 		if test "x$with_arch" != x && test "x$with_cpu" != x; then
 			echo "Warning: --with-arch overrides --with-cpu" 1>&2
 		fi
@@ -2732,7 +2743,7 @@ fi
 	esac
 
 	t=
-	all_defaults="abi cpu arch tune schedule float mode"
+	all_defaults="abi cpu arch tune schedule float mode fpu"
 	for option in $all_defaults
 	do
 		eval "val=\$with_$option"
Index: gcc/config/arm/arm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.303.2.14
diff -u -p -r1.303.2.14 arm.c
--- gcc/config/arm/arm.c	14 Jan 2004 13:40:59 -0000	1.303.2.14
+++ gcc/config/arm/arm.c	14 Jan 2004 16:04:45 -0000
@@ -589,10 +589,10 @@ arm_override_options (void)
 	{ TARGET_CPU_xscale,    "xscale" },
 	{ TARGET_CPU_ep9312,    "ep9312" },
 	{ TARGET_CPU_iwmmxt,    "iwmmxt" },
-	{ TARGET_CPU_arm926ejs, "arm926ej-s" },
-	{ TARGET_CPU_arm1026ejs, "arm1026ej-s" },
-	{ TARGET_CPU_arm1136js, "arm1136j-s" },
-	{ TARGET_CPU_arm1136jfs, "arm1136jf-s" },
+	{ TARGET_CPU_arm926ejs, "arm926ejs" },
+	{ TARGET_CPU_arm1026ejs, "arm1026ejs" },
+	{ TARGET_CPU_arm1136js, "arm1136js" },
+	{ TARGET_CPU_arm1136jfs, "arm1136jfs" },
 	{ TARGET_CPU_generic,   "arm" },
 	{ 0, 0 }
       };
@@ -860,10 +860,13 @@ arm_override_options (void)
       for (i = 0; i < ARRAY_SIZE (all_float_abis); i++)
 	{
 	  if (streq (all_float_abis[i].name, target_float_abi_name))
-	    arm_float_abi = all_float_abis[i].abi_type;
+	    {
+	      arm_float_abi = all_float_abis[i].abi_type;
+	      break;
+	    }
 	}
       if (i == ARRAY_SIZE (all_float_abis))
-	error ("invalud floating point abi: -ffloat-abi=%s",
+	error ("invalid floating point abi: -mfloat-abi=%s",
 	       target_float_abi_name);
     }
   else
Index: gcc/config/arm/arm.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.h,v
retrieving revision 1.210.2.15
diff -u -p -r1.210.2.15 arm.h
--- gcc/config/arm/arm.h	14 Jan 2004 13:40:59 -0000	1.210.2.15
+++ gcc/config/arm/arm.h	14 Jan 2004 16:04:46 -0000
@@ -586,13 +586,16 @@ extern GTY(()) rtx aof_pic_label;
     by --with-arch.
    --with-tune is ignored if -mtune or -mcpu are specified (but not affected
      by -march).
-   --with-float is ignored if -mhard-float or -msoft-float are
-    specified.  */
+   --with-float is ignored if -mhard-float, -msoft-float or -mfloat-abi are
+   specified.
+   --with-fpu is ignored if -mfpu is specified.  */
 #define OPTION_DEFAULT_SPECS \
   {"arch", "%{!march=*:%{!mcpu=*:-march=%(VALUE)}}" }, \
   {"cpu", "%{!march=*:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \
   {"tune", "%{!mcpu=*:%{!mtune=*:-mtune=%(VALUE)}}" }, \
-  {"float", "%{!msoft-float:%{!mhard-float:-m%(VALUE)-float}}" }
+  {"float", \
+    "%{!msoft-float:%{!mhard-float:%{!mfloat-abi=*:-mfloat-abi=%(VALUE)}}}" }, \
+  {"fpu", "%{!mfpu=*:-mfpu=%(VALUE)}"},
 
 struct arm_cpu_select
 {
Index: gcc/doc/install.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/install.texi,v
retrieving revision 1.230.4.2
diff -u -p -r1.230.4.2 install.texi
--- gcc/doc/install.texi	31 Dec 2003 00:44:36 -0000	1.230.4.2
+++ gcc/doc/install.texi	14 Jan 2004 16:04:49 -0000
@@ -925,12 +925,13 @@ and SPARC@.
 @itemx --with-arch=@var{cpu}
 @itemx --with-tune=@var{cpu}
 @itemx --with-abi=@var{abi}
+@itemx --with-fpu=@var{type}
 @itemx --with-float=@var{type}
 These configure options provide default values for the @option{-mschedule=},
-@option{-march=}, @option{-mtune=}, and @option{-mabi=} 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.
+@option{-march=}, @option{-mtune=}, @option{-mabi=}, and @option{-mfpu=}
+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 --enable-altivec
 Specify that the target supports AltiVec vector enhancements.  This


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