public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [4.7] Make ARM -mhard-float and -msoft-float into proper -mfloat-abi= aliases
@ 2011-03-02  2:01 Joseph S. Myers
  2011-03-02  9:36 ` Richard Earnshaw
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph S. Myers @ 2011-03-02  2:01 UTC (permalink / raw)
  To: gcc-patches; +Cc: nickc, richard.earnshaw, paul, ramana.radhakrishnan

This patch, for 4.7 and relative to a tree with
<http://gcc.gnu.org/ml/gcc-patches/2011-02/msg01709.html> applied,
converts the ARM -mhard-float and -msoft-float options, documented as
aliases of -mfloat-abi=hard and -mfloat-abi=soft, into .opt file
aliases, so simplifying arm_handle_option.  Being .opt aliases means
that specs need only handle the -mfloat-abi forms and that multilib
configuration must only use those forms, so this patch makes the
associated changes in those areas.  The patch arose out of eliminating
global state from target option handlers, but was done as a separate
patch as those changes (moving -march, -mcpu and -mtune handling to
use the Enum machinery) will be quite complicated and it seems best to
separate the two sets of largely independent changes.

Tested building cc1 and xgcc for crosses to: arm-eabi
arm-linux-gnueabi arm-netbsdelf arm-rtems arm-wince-pe arm-freebsd8.
Will commit to trunk for 4.7 in the absence of target maintainer
objections.

2011-03-01  Joseph Myers  <joseph@codesourcery.com>

	* config/arm/arm.opt (mhard-float, msoft-float): Use Alias.
	* config/arm/arm.c (arm_handle_option): Don't handle -mhard-float
	or -msoft-float here.
	* config/arm/arm.h (CPP_SPEC): Handle -mfloat-abi=*, not
	-msoft-float and -mhard-float.
	(OPTION_DEFAULT_SPECS): Don't handle -mhard-float and
	-msoft-float.
	* config/arm/coff.h (MULTILIB_DEFAULTS): Use mfloat-abi=soft, not
	msoft-float.
	* config/arm/elf.h (ASM_SPEC): Don't handle -mhard-float and
	-msoft-float.
	(MULTILIB_DEFAULTS): Use mfloat-abi=soft, not msoft-float.
	* config/arm/linux-elf.h (MULTILIB_DEFAULTS): Use mfloat-abi=hard,
	not mhard-float.
	(LIBGCC_SPEC): Don't handle -msoft-float.
	* config/arm/netbsd-elf.h (SUBTARGET_ASM_FLOAT_SPEC): Don't handle
	-mhard-float.
	* config/arm/pe.h (MULTILIB_DEFAULTS): Use mfloat-abi=soft, not
	msoft-float.
	* config/arm/rtems-elf.h (SUBTARGET_EXTRA_ASM_SPEC): Handle
	-mfloat-abi=*, not -msoft-float and -mhard-float.
	* config/arm/semi.h((ASM_SPEC): Don't handle -mhard-float and
	-msoft-float.
	* config/arm/t-arm-elf (MULTILIB_OPTIONS, MULTILIB_EXCEPTIONS):
	Use mfloat-abi=hard and mfloat-abi=soft in comments, not
	mhard-float and msoft-float.
	* config/arm/t-linux (MULTILIB_OPTIONS): Use mfloat-abi=hard and
	mfloat-abi=soft in comments, not mhard-float and msoft-float.
	* config/arm/t-pe (MULTILIB_OPTIONS): Use mfloat-abi=hard, not
	mhard-float.
	* config/arm/t-rtems (MULTILIB_OPTIONS, MULTILIB_EXCEPTIONS): Use
	mfloat-abi=soft and mfloat-abi=hard, not msoft-float and
	mhard-float.
	* config/arm/t-strongarm-elf (MULTILIB_OPTIONS): Use
	mfloat-abi=hard and mfloat-abi=soft, not mhard-float and
	msoft-float.
	* config/arm/t-wince-pe (MULTILIB_OPTIONS): Use mfloat-abi=hard,
	not mhard-float.
	* config/arm/wince-pe.h (MULTILIB_DEFAULTS): Use mfloat-abi=soft,
	not msoft-float.

diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/arm.c gcc-mainline/gcc/config/arm/arm.c
--- gcc-mainline-1/gcc/config/arm/arm.c	2011-02-23 13:55:18.000000000 -0800
+++ gcc-mainline/gcc/config/arm/arm.c	2011-03-01 15:26:24.000000000 -0800
@@ -1355,14 +1355,6 @@ arm_handle_option (struct gcc_options *o
       arm_selected_cpu = arm_find_cpu(arg, all_cores, "-mcpu");
       return true;
 
-    case OPT_mhard_float:
-      target_float_abi_name = "hard";
-      return true;
-
-    case OPT_msoft_float:
-      target_float_abi_name = "soft";
-      return true;
-
     case OPT_mtune_:
       arm_selected_tune = arm_find_cpu(arg, all_cores, "-mtune");
       return true;
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/arm.h gcc-mainline/gcc/config/arm/arm.h
--- gcc-mainline-1/gcc/config/arm/arm.h	2011-02-02 13:22:56.000000000 -0800
+++ gcc-mainline/gcc/config/arm/arm.h	2011-03-01 15:42:16.000000000 -0800
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, for ARM.
    Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
    and Martin Simmons (@harleqn.co.uk).
@@ -174,8 +174,8 @@ extern void (*arm_lang_output_object_att
 
 #undef  CPP_SPEC
 #define CPP_SPEC "%(subtarget_cpp_spec)					\
-%{msoft-float:%{mhard-float:						\
-	%e-msoft-float and -mhard_float may not be used together}}	\
+%{mfloat-abi=soft:%{mfloat-abi=hard:					\
+	%e-mfloat-abi=soft and -mfloat-abi=hard may not be used together}} \
 %{mbig-endian:%{mlittle-endian:						\
 	%e-mbig-endian and -mlittle-endian may not be used together}}"
 
@@ -317,16 +317,14 @@ extern void (*arm_lang_output_object_att
     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, -msoft-float or -mfloat-abi are
-   specified.
+   --with-float is ignored if -mfloat-abi is specified.
    --with-fpu is ignored if -mfpu is specified.
    --with-abi is ignored is -mabi 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:%{!mfloat-abi=*:-mfloat-abi=%(VALUE)}}}" }, \
+  {"float", "%{!mfloat-abi=*:-mfloat-abi=%(VALUE)}" }, \
   {"fpu", "%{!mfpu=*:-mfpu=%(VALUE)}"}, \
   {"abi", "%{!mabi=*:-mabi=%(VALUE)}"}, \
   {"mode", "%{!marm:%{!mthumb:-m%(VALUE)}}"},
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/arm.opt gcc-mainline/gcc/config/arm/arm.opt
--- gcc-mainline-1/gcc/config/arm/arm.opt	2009-07-02 08:25:53.000000000 -0700
+++ gcc-mainline/gcc/config/arm/arm.opt	2011-03-01 15:25:51.000000000 -0800
@@ -94,7 +94,7 @@ Target RejectNegative Joined Var(target_
 Specify the name of the target floating point hardware/format
 
 mhard-float
-Target RejectNegative
+Target RejectNegative Alias(mfloat-abi=, hard)
 Alias for -mfloat-abi=hard
 
 mlittle-endian
@@ -122,7 +122,7 @@ Target Report Mask(SINGLE_PIC_BASE)
 Do not load the PIC register in function prologues
 
 msoft-float
-Target RejectNegative
+Target RejectNegative Alias(mfloat-abi=, soft)
 Alias for -mfloat-abi=soft
 
 mstructure-size-boundary=
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/coff.h gcc-mainline/gcc/config/arm/coff.h
--- gcc-mainline-1/gcc/config/arm/coff.h	2009-07-02 08:25:53.000000000 -0700
+++ gcc-mainline/gcc/config/arm/coff.h	2011-03-01 15:40:01.000000000 -0800
@@ -1,7 +1,7 @@
 /* Definitions of target machine for GNU compiler.
    For ARM with COFF object format.
    Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005,
-   2007 Free Software Foundation, Inc.
+   2007, 2009, 2011 Free Software Foundation, Inc.
    Contributed by Doug Evans (devans@cygnus.com).
    
    This file is part of GCC.
@@ -37,7 +37,7 @@
 
 #ifndef MULTILIB_DEFAULTS
 #define MULTILIB_DEFAULTS \
-  { "marm", "mlittle-endian", "msoft-float", "mno-thumb-interwork" }
+  { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork" }
 #endif
 \f
 /* This is COFF, but prefer stabs.  */
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/elf.h gcc-mainline/gcc/config/arm/elf.h
--- gcc-mainline-1/gcc/config/arm/elf.h	2009-07-02 08:25:53.000000000 -0700
+++ gcc-mainline/gcc/config/arm/elf.h	2011-03-01 15:39:33.000000000 -0800
@@ -1,7 +1,7 @@
 /* Definitions of target machine for GNU compiler.
    For ARM with ELF obj format.
    Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2004, 2005, 2007,
-   2008 Free Software Foundation, Inc.
+   2008, 2009, 2011 Free Software Foundation, Inc.
    Contributed by Philip Blundell <philb@gnu.org> and
    Catherine Moore <clm@cygnus.com>
    
@@ -61,7 +61,6 @@
 %{mapcs-*:-mapcs-%*} \
 %(subtarget_asm_float_spec) \
 %{mthumb-interwork:-mthumb-interwork} \
-%{msoft-float:-mfloat-abi=soft} %{mhard-float:-mfloat-abi=hard} \
 %{mfloat-abi=*} %{mfpu=*} \
 %(subtarget_extra_asm_spec)"
 #endif
@@ -119,7 +118,7 @@
 
 #ifndef MULTILIB_DEFAULTS
 #define MULTILIB_DEFAULTS \
-  { "marm", "mlittle-endian", "msoft-float", "mno-thumb-interwork", "fno-leading-underscore" }
+  { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork", "fno-leading-underscore" }
 #endif
 \f
 #define TARGET_ASM_FILE_START_APP_OFF true
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/linux-elf.h gcc-mainline/gcc/config/arm/linux-elf.h
--- gcc-mainline-1/gcc/config/arm/linux-elf.h	2011-01-26 16:28:20.000000000 -0800
+++ gcc-mainline/gcc/config/arm/linux-elf.h	2011-03-01 15:37:25.000000000 -0800
@@ -51,7 +51,7 @@
 
 #undef  MULTILIB_DEFAULTS
 #define MULTILIB_DEFAULTS \
-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
+	{ "marm", "mlittle-endian", "mfloat-abi=hard", "mno-thumb-interwork" }
 
 /* Now we define the strings used to build the spec file.  */
 #undef  LIB_SPEC
@@ -60,7 +60,7 @@
    %{shared:-lc} \
    %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
 
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
+#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
 
 #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/netbsd-elf.h gcc-mainline/gcc/config/arm/netbsd-elf.h
--- gcc-mainline-1/gcc/config/arm/netbsd-elf.h	2009-12-30 09:05:39.000000000 -0800
+++ gcc-mainline/gcc/config/arm/netbsd-elf.h	2011-03-01 16:27:05.000000000 -0800
@@ -1,5 +1,6 @@
 /* Definitions of target machine for GNU compiler, NetBSD/arm ELF version.
-   Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009, 2011
+   Free Software Foundation, Inc.
    Contributed by Wasabi Systems, Inc.
 
    This file is part of GCC.
@@ -54,11 +55,10 @@
 #define SUBTARGET_EXTRA_ASM_SPEC	\
   "-matpcs %{fpic|fpie:-k} %{fPIC|fPIE:-k}"
 
-/* Default to full VFP if -mhard-float is specified.  */
+/* Default to full VFP if -mfloat-abi=hard is specified.  */
 #undef SUBTARGET_ASM_FLOAT_SPEC
 #define SUBTARGET_ASM_FLOAT_SPEC	\
-  "%{mhard-float:{!mfpu=*:-mfpu=vfp}}   \
-   %{mfloat-abi=hard:{!mfpu=*:-mfpu=vfp}}"
+  "%{mfloat-abi=hard:{!mfpu=*:-mfpu=vfp}}"
 
 #undef SUBTARGET_EXTRA_SPECS
 #define SUBTARGET_EXTRA_SPECS				\
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/pe.h gcc-mainline/gcc/config/arm/pe.h
--- gcc-mainline-1/gcc/config/arm/pe.h	2009-03-28 00:38:45.000000000 -0700
+++ gcc-mainline/gcc/config/arm/pe.h	2011-03-01 15:35:09.000000000 -0800
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler, for ARM with PE obj format.
-   Copyright (C) 1995, 1996, 1999, 2000, 2002, 2003, 2004, 2005, 2007
+   Copyright (C) 1995, 1996, 1999, 2000, 2002, 2003, 2004, 2005, 2007, 2011
    Free Software Foundation, Inc.
    Contributed by Doug Evans (dje@cygnus.com).
    
@@ -49,7 +49,7 @@
 
 #undef  MULTILIB_DEFAULTS
 #define MULTILIB_DEFAULTS \
-  { "marm", "mlittle-endian", "msoft-float", "mno-thumb-interwork" }  
+  { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork" }  
 \f
 #undef  WCHAR_TYPE
 #define WCHAR_TYPE 	"short unsigned int"
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/rtems-elf.h gcc-mainline/gcc/config/arm/rtems-elf.h
--- gcc-mainline-1/gcc/config/arm/rtems-elf.h	2009-03-28 00:38:45.000000000 -0700
+++ gcc-mainline/gcc/config/arm/rtems-elf.h	2011-03-01 15:34:36.000000000 -0800
@@ -1,5 +1,6 @@
 /* Definitions for RTEMS based ARM systems using ELF
-   Copyright (C) 2000, 2002, 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002, 2005, 2007, 2008, 2009, 2011
+   Free Software Foundation, Inc.
  
    This file is part of GCC.
  
@@ -36,7 +37,7 @@
  */
 #undef SUBTARGET_EXTRA_ASM_SPEC
 #define SUBTARGET_EXTRA_ASM_SPEC "\
-  %{!mhard-float: %{!msoft-float:-mfpu=softfpa}}"
+  %{!mfloat-abi=hard: %{!mfloat-abi=soft:-mfpu=softfpa}}"
 
 /*
  *  The default includes --start-group and --end-group which conflicts
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/semi.h gcc-mainline/gcc/config/arm/semi.h
--- gcc-mainline-1/gcc/config/arm/semi.h	2009-03-28 00:38:45.000000000 -0700
+++ gcc-mainline/gcc/config/arm/semi.h	2011-03-01 15:33:18.000000000 -0800
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  ARM on semi-hosted platform
-   Copyright (C) 1994, 1995, 1996, 1997, 2001, 2004, 2005, 2007
+   Copyright (C) 1994, 1995, 1996, 1997, 2001, 2004, 2005, 2007, 2011
    Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (richard.earnshaw@arm.com)
 
@@ -68,7 +68,6 @@
 %{mcpu=*:-mcpu=%*} \
 %{march=*:-march=%*} \
 %{mapcs-float:-mfloat} \
-%{msoft-float:-mfloat-abi=soft} %{mhard-float:-mfloat-abi=hard} \
 %{mfloat-abi=*} %{mfpu=*} \
 %{mthumb-interwork:-mthumb-interwork} \
 %(subtarget_extra_asm_spec)"
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/t-arm-elf gcc-mainline/gcc/config/arm/t-arm-elf
--- gcc-mainline-1/gcc/config/arm/t-arm-elf	2011-01-04 03:50:58.000000000 -0800
+++ gcc-mainline/gcc/config/arm/t-arm-elf	2011-03-01 15:27:26.000000000 -0800
@@ -1,5 +1,5 @@
 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-# 2008, 2010 Free Software Foundation, Inc.
+# 2008, 2010, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -67,9 +67,9 @@ MULTILIB_EXCEPTIONS    += *mthumb/*mfloa
 # MULTILIB_DIRNAMES    += le be
 # MULTILIB_MATCHES     += mbig-endian=mbe mlittle-endian=mle
 # 
-# MULTILIB_OPTIONS    += mhard-float/msoft-float
+# MULTILIB_OPTIONS    += mfloat-abi=hard/mfloat-abi=soft
 # MULTILIB_DIRNAMES   += fpu soft
-# MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
+# MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
 # 
 # MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
 # MULTILIB_DIRNAMES   += normal interwork
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/t-linux gcc-mainline/gcc/config/arm/t-linux
--- gcc-mainline-1/gcc/config/arm/t-linux	2009-04-24 16:20:51.000000000 -0700
+++ gcc-mainline/gcc/config/arm/t-linux	2011-03-01 15:28:16.000000000 -0800
@@ -1,5 +1,5 @@
 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2006,
-# 2008 Free Software Foundation, Inc.
+# 2008, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -25,7 +25,7 @@ LIB1ASMSRC = arm/lib1funcs.asm
 LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
 	_arm_addsubdf3 _arm_addsubsf3
 
-# MULTILIB_OPTIONS = mhard-float/msoft-float
+# MULTILIB_OPTIONS = mfloat-abi=hard/mfloat-abi=soft
 # MULTILIB_DIRNAMES = hard-float soft-float
 
 # EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/t-pe gcc-mainline/gcc/config/arm/t-pe
--- gcc-mainline-1/gcc/config/arm/t-pe	2010-11-29 10:43:41.000000000 -0800
+++ gcc-mainline/gcc/config/arm/t-pe	2011-03-01 15:28:41.000000000 -0800
@@ -1,5 +1,5 @@
 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2008, 2009,
-# 2010
+# 2010, 2011
 # Free Software Foundation, Inc.
 #
 # This file is part of GCC.
@@ -44,7 +44,7 @@ pe.o: $(srcdir)/config/arm/pe.c $(CONFIG
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
 		$(srcdir)/config/arm/pe.c
 
-MULTILIB_OPTIONS = mhard-float mthumb
+MULTILIB_OPTIONS = mfloat-abi=hard mthumb
 MULTILIB_DIRNAMES = fpu thumb
 
 LIBGCC = stmp-multilib
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/t-rtems gcc-mainline/gcc/config/arm/t-rtems
--- gcc-mainline-1/gcc/config/arm/t-rtems	2009-03-28 00:38:45.000000000 -0700
+++ gcc-mainline/gcc/config/arm/t-rtems	2011-03-01 15:29:09.000000000 -0800
@@ -5,6 +5,6 @@ MULTILIB_DIRNAMES    = arm thumb
 MULTILIB_EXCEPTIONS  = 
 MULTILIB_MATCHES     = marm=mno-thumb
 
-MULTILIB_OPTIONS    += msoft-float/mhard-float
+MULTILIB_OPTIONS    += mfloat-abi=soft/mfloat-abi=hard
 MULTILIB_DIRNAMES   += soft fpu
-MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
+MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/t-strongarm-elf gcc-mainline/gcc/config/arm/t-strongarm-elf
--- gcc-mainline-1/gcc/config/arm/t-strongarm-elf	2009-07-02 08:25:53.000000000 -0700
+++ gcc-mainline/gcc/config/arm/t-strongarm-elf	2011-03-01 15:30:09.000000000 -0800
@@ -1,4 +1,5 @@
-# Copyright (C) 2000, 2001, 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2006, 2008, 2009, 2011
+# Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -37,7 +38,7 @@ dp-bit.c: $(srcdir)/config/fp-bit.c
 	echo '#endif' >> dp-bit.c
 	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
 
-MULTILIB_OPTIONS     = mlittle-endian/mbig-endian mhard-float/msoft-float
+MULTILIB_OPTIONS     = mlittle-endian/mbig-endian mfloat-abi=hard/mfloat-abi=soft
 MULTILIB_DIRNAMES    = le be fpu soft
 MULTILIB_EXCEPTIONS  =
 MULTILIB_MATCHES     = mbig-endian=mbe mlittle-endian=mle
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/t-wince-pe gcc-mainline/gcc/config/arm/t-wince-pe
--- gcc-mainline-1/gcc/config/arm/t-wince-pe	2010-11-29 10:44:00.000000000 -0800
+++ gcc-mainline/gcc/config/arm/t-wince-pe	2011-03-01 15:30:27.000000000 -0800
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2004, 2006, 2008, 2009, 2010
+# Copyright (C) 2003, 2004, 2006, 2008, 2009, 2010, 2011
 # Free Software Foundation, Inc.
 #
 # This file is part of GCC.
@@ -43,7 +43,7 @@ pe.o: $(srcdir)/config/arm/pe.c $(CONFIG
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
 		$(srcdir)/config/arm/pe.c
 
-MULTILIB_OPTIONS = mhard-float
+MULTILIB_OPTIONS = mfloat-abi=hard
 MULTILIB_DIRNAMES = fpu
 # Note - Thumb multilib omitted because Thumb support for
 # arm-wince-pe target does not appear to be working in binutils
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/wince-pe.h gcc-mainline/gcc/config/arm/wince-pe.h
--- gcc-mainline-1/gcc/config/arm/wince-pe.h	2009-03-28 00:38:45.000000000 -0700
+++ gcc-mainline/gcc/config/arm/wince-pe.h	2011-03-01 15:33:16.000000000 -0800
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler, for ARM with WINCE-PE obj format.
-   Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005, 2007, 2011 Free Software Foundation, Inc.
    Contributed by Nick Clifton <nickc@redhat.com>
    
    This file is part of GCC.
@@ -23,4 +23,4 @@
 
 #undef  MULTILIB_DEFAULTS
 #define MULTILIB_DEFAULTS \
-  { "marm", "mlittle-endian", "msoft-float", "mno-thumb-interwork" }  
+  { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork" }  

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [4.7] Make ARM -mhard-float and -msoft-float into proper -mfloat-abi= aliases
  2011-03-02  2:01 [4.7] Make ARM -mhard-float and -msoft-float into proper -mfloat-abi= aliases Joseph S. Myers
@ 2011-03-02  9:36 ` Richard Earnshaw
  2011-03-30 20:30   ` Joseph S. Myers
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Earnshaw @ 2011-03-02  9:36 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches, nickc, paul, ramana.radhakrishnan


On Wed, 2011-03-02 at 02:00 +0000, Joseph S. Myers wrote:
> This patch, for 4.7 and relative to a tree with
> <http://gcc.gnu.org/ml/gcc-patches/2011-02/msg01709.html> applied,
> converts the ARM -mhard-float and -msoft-float options, documented as
> aliases of -mfloat-abi=hard and -mfloat-abi=soft, into .opt file
> aliases, so simplifying arm_handle_option.  Being .opt aliases means
> that specs need only handle the -mfloat-abi forms and that multilib
> configuration must only use those forms, so this patch makes the
> associated changes in those areas.  The patch arose out of eliminating
> global state from target option handlers, but was done as a separate
> patch as those changes (moving -march, -mcpu and -mtune handling to
> use the Enum machinery) will be quite complicated and it seems best to
> separate the two sets of largely independent changes.
> 
> Tested building cc1 and xgcc for crosses to: arm-eabi
> arm-linux-gnueabi arm-netbsdelf arm-rtems arm-wince-pe arm-freebsd8.
> Will commit to trunk for 4.7 in the absence of target maintainer
> objections.
> 

This is OK.

Could you remove the documentation entries for the hard/soft-float
aliases please?  They're really only there for legacy reasons.

R.

> 2011-03-01  Joseph Myers  <joseph@codesourcery.com>
> 
> 	* config/arm/arm.opt (mhard-float, msoft-float): Use Alias.
> 	* config/arm/arm.c (arm_handle_option): Don't handle -mhard-float
> 	or -msoft-float here.
> 	* config/arm/arm.h (CPP_SPEC): Handle -mfloat-abi=*, not
> 	-msoft-float and -mhard-float.
> 	(OPTION_DEFAULT_SPECS): Don't handle -mhard-float and
> 	-msoft-float.
> 	* config/arm/coff.h (MULTILIB_DEFAULTS): Use mfloat-abi=soft, not
> 	msoft-float.
> 	* config/arm/elf.h (ASM_SPEC): Don't handle -mhard-float and
> 	-msoft-float.
> 	(MULTILIB_DEFAULTS): Use mfloat-abi=soft, not msoft-float.
> 	* config/arm/linux-elf.h (MULTILIB_DEFAULTS): Use mfloat-abi=hard,
> 	not mhard-float.
> 	(LIBGCC_SPEC): Don't handle -msoft-float.
> 	* config/arm/netbsd-elf.h (SUBTARGET_ASM_FLOAT_SPEC): Don't handle
> 	-mhard-float.
> 	* config/arm/pe.h (MULTILIB_DEFAULTS): Use mfloat-abi=soft, not
> 	msoft-float.
> 	* config/arm/rtems-elf.h (SUBTARGET_EXTRA_ASM_SPEC): Handle
> 	-mfloat-abi=*, not -msoft-float and -mhard-float.
> 	* config/arm/semi.h((ASM_SPEC): Don't handle -mhard-float and
> 	-msoft-float.
> 	* config/arm/t-arm-elf (MULTILIB_OPTIONS, MULTILIB_EXCEPTIONS):
> 	Use mfloat-abi=hard and mfloat-abi=soft in comments, not
> 	mhard-float and msoft-float.
> 	* config/arm/t-linux (MULTILIB_OPTIONS): Use mfloat-abi=hard and
> 	mfloat-abi=soft in comments, not mhard-float and msoft-float.
> 	* config/arm/t-pe (MULTILIB_OPTIONS): Use mfloat-abi=hard, not
> 	mhard-float.
> 	* config/arm/t-rtems (MULTILIB_OPTIONS, MULTILIB_EXCEPTIONS): Use
> 	mfloat-abi=soft and mfloat-abi=hard, not msoft-float and
> 	mhard-float.
> 	* config/arm/t-strongarm-elf (MULTILIB_OPTIONS): Use
> 	mfloat-abi=hard and mfloat-abi=soft, not mhard-float and
> 	msoft-float.
> 	* config/arm/t-wince-pe (MULTILIB_OPTIONS): Use mfloat-abi=hard,
> 	not mhard-float.
> 	* config/arm/wince-pe.h (MULTILIB_DEFAULTS): Use mfloat-abi=soft,
> 	not msoft-float.
> 
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/arm.c gcc-mainline/gcc/config/arm/arm.c
> --- gcc-mainline-1/gcc/config/arm/arm.c	2011-02-23 13:55:18.000000000 -0800
> +++ gcc-mainline/gcc/config/arm/arm.c	2011-03-01 15:26:24.000000000 -0800
> @@ -1355,14 +1355,6 @@ arm_handle_option (struct gcc_options *o
>        arm_selected_cpu = arm_find_cpu(arg, all_cores, "-mcpu");
>        return true;
>  
> -    case OPT_mhard_float:
> -      target_float_abi_name = "hard";
> -      return true;
> -
> -    case OPT_msoft_float:
> -      target_float_abi_name = "soft";
> -      return true;
> -
>      case OPT_mtune_:
>        arm_selected_tune = arm_find_cpu(arg, all_cores, "-mtune");
>        return true;
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/arm.h gcc-mainline/gcc/config/arm/arm.h
> --- gcc-mainline-1/gcc/config/arm/arm.h	2011-02-02 13:22:56.000000000 -0800
> +++ gcc-mainline/gcc/config/arm/arm.h	2011-03-01 15:42:16.000000000 -0800
> @@ -1,6 +1,6 @@
>  /* Definitions of target machine for GNU compiler, for ARM.
>     Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
> -   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
> +   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
>     Free Software Foundation, Inc.
>     Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
>     and Martin Simmons (@harleqn.co.uk).
> @@ -174,8 +174,8 @@ extern void (*arm_lang_output_object_att
>  
>  #undef  CPP_SPEC
>  #define CPP_SPEC "%(subtarget_cpp_spec)					\
> -%{msoft-float:%{mhard-float:						\
> -	%e-msoft-float and -mhard_float may not be used together}}	\
> +%{mfloat-abi=soft:%{mfloat-abi=hard:					\
> +	%e-mfloat-abi=soft and -mfloat-abi=hard may not be used together}} \
>  %{mbig-endian:%{mlittle-endian:						\
>  	%e-mbig-endian and -mlittle-endian may not be used together}}"
>  
> @@ -317,16 +317,14 @@ extern void (*arm_lang_output_object_att
>      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, -msoft-float or -mfloat-abi are
> -   specified.
> +   --with-float is ignored if -mfloat-abi is specified.
>     --with-fpu is ignored if -mfpu is specified.
>     --with-abi is ignored is -mabi 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:%{!mfloat-abi=*:-mfloat-abi=%(VALUE)}}}" }, \
> +  {"float", "%{!mfloat-abi=*:-mfloat-abi=%(VALUE)}" }, \
>    {"fpu", "%{!mfpu=*:-mfpu=%(VALUE)}"}, \
>    {"abi", "%{!mabi=*:-mabi=%(VALUE)}"}, \
>    {"mode", "%{!marm:%{!mthumb:-m%(VALUE)}}"},
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/arm.opt gcc-mainline/gcc/config/arm/arm.opt
> --- gcc-mainline-1/gcc/config/arm/arm.opt	2009-07-02 08:25:53.000000000 -0700
> +++ gcc-mainline/gcc/config/arm/arm.opt	2011-03-01 15:25:51.000000000 -0800
> @@ -94,7 +94,7 @@ Target RejectNegative Joined Var(target_
>  Specify the name of the target floating point hardware/format
>  
>  mhard-float
> -Target RejectNegative
> +Target RejectNegative Alias(mfloat-abi=, hard)
>  Alias for -mfloat-abi=hard
>  
>  mlittle-endian
> @@ -122,7 +122,7 @@ Target Report Mask(SINGLE_PIC_BASE)
>  Do not load the PIC register in function prologues
>  
>  msoft-float
> -Target RejectNegative
> +Target RejectNegative Alias(mfloat-abi=, soft)
>  Alias for -mfloat-abi=soft
>  
>  mstructure-size-boundary=
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/coff.h gcc-mainline/gcc/config/arm/coff.h
> --- gcc-mainline-1/gcc/config/arm/coff.h	2009-07-02 08:25:53.000000000 -0700
> +++ gcc-mainline/gcc/config/arm/coff.h	2011-03-01 15:40:01.000000000 -0800
> @@ -1,7 +1,7 @@
>  /* Definitions of target machine for GNU compiler.
>     For ARM with COFF object format.
>     Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005,
> -   2007 Free Software Foundation, Inc.
> +   2007, 2009, 2011 Free Software Foundation, Inc.
>     Contributed by Doug Evans (devans@cygnus.com).
>     
>     This file is part of GCC.
> @@ -37,7 +37,7 @@
>  
>  #ifndef MULTILIB_DEFAULTS
>  #define MULTILIB_DEFAULTS \
> -  { "marm", "mlittle-endian", "msoft-float", "mno-thumb-interwork" }
> +  { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork" }
>  #endif
>  \f
>  /* This is COFF, but prefer stabs.  */
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/elf.h gcc-mainline/gcc/config/arm/elf.h
> --- gcc-mainline-1/gcc/config/arm/elf.h	2009-07-02 08:25:53.000000000 -0700
> +++ gcc-mainline/gcc/config/arm/elf.h	2011-03-01 15:39:33.000000000 -0800
> @@ -1,7 +1,7 @@
>  /* Definitions of target machine for GNU compiler.
>     For ARM with ELF obj format.
>     Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2004, 2005, 2007,
> -   2008 Free Software Foundation, Inc.
> +   2008, 2009, 2011 Free Software Foundation, Inc.
>     Contributed by Philip Blundell <philb@gnu.org> and
>     Catherine Moore <clm@cygnus.com>
>     
> @@ -61,7 +61,6 @@
>  %{mapcs-*:-mapcs-%*} \
>  %(subtarget_asm_float_spec) \
>  %{mthumb-interwork:-mthumb-interwork} \
> -%{msoft-float:-mfloat-abi=soft} %{mhard-float:-mfloat-abi=hard} \
>  %{mfloat-abi=*} %{mfpu=*} \
>  %(subtarget_extra_asm_spec)"
>  #endif
> @@ -119,7 +118,7 @@
>  
>  #ifndef MULTILIB_DEFAULTS
>  #define MULTILIB_DEFAULTS \
> -  { "marm", "mlittle-endian", "msoft-float", "mno-thumb-interwork", "fno-leading-underscore" }
> +  { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork", "fno-leading-underscore" }
>  #endif
>  \f
>  #define TARGET_ASM_FILE_START_APP_OFF true
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/linux-elf.h gcc-mainline/gcc/config/arm/linux-elf.h
> --- gcc-mainline-1/gcc/config/arm/linux-elf.h	2011-01-26 16:28:20.000000000 -0800
> +++ gcc-mainline/gcc/config/arm/linux-elf.h	2011-03-01 15:37:25.000000000 -0800
> @@ -51,7 +51,7 @@
>  
>  #undef  MULTILIB_DEFAULTS
>  #define MULTILIB_DEFAULTS \
> -	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
> +	{ "marm", "mlittle-endian", "mfloat-abi=hard", "mno-thumb-interwork" }
>  
>  /* Now we define the strings used to build the spec file.  */
>  #undef  LIB_SPEC
> @@ -60,7 +60,7 @@
>     %{shared:-lc} \
>     %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
>  
> -#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
> +#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
>  
>  #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
>  
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/netbsd-elf.h gcc-mainline/gcc/config/arm/netbsd-elf.h
> --- gcc-mainline-1/gcc/config/arm/netbsd-elf.h	2009-12-30 09:05:39.000000000 -0800
> +++ gcc-mainline/gcc/config/arm/netbsd-elf.h	2011-03-01 16:27:05.000000000 -0800
> @@ -1,5 +1,6 @@
>  /* Definitions of target machine for GNU compiler, NetBSD/arm ELF version.
> -   Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
> +   Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009, 2011
> +   Free Software Foundation, Inc.
>     Contributed by Wasabi Systems, Inc.
>  
>     This file is part of GCC.
> @@ -54,11 +55,10 @@
>  #define SUBTARGET_EXTRA_ASM_SPEC	\
>    "-matpcs %{fpic|fpie:-k} %{fPIC|fPIE:-k}"
>  
> -/* Default to full VFP if -mhard-float is specified.  */
> +/* Default to full VFP if -mfloat-abi=hard is specified.  */
>  #undef SUBTARGET_ASM_FLOAT_SPEC
>  #define SUBTARGET_ASM_FLOAT_SPEC	\
> -  "%{mhard-float:{!mfpu=*:-mfpu=vfp}}   \
> -   %{mfloat-abi=hard:{!mfpu=*:-mfpu=vfp}}"
> +  "%{mfloat-abi=hard:{!mfpu=*:-mfpu=vfp}}"
>  
>  #undef SUBTARGET_EXTRA_SPECS
>  #define SUBTARGET_EXTRA_SPECS				\
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/pe.h gcc-mainline/gcc/config/arm/pe.h
> --- gcc-mainline-1/gcc/config/arm/pe.h	2009-03-28 00:38:45.000000000 -0700
> +++ gcc-mainline/gcc/config/arm/pe.h	2011-03-01 15:35:09.000000000 -0800
> @@ -1,5 +1,5 @@
>  /* Definitions of target machine for GNU compiler, for ARM with PE obj format.
> -   Copyright (C) 1995, 1996, 1999, 2000, 2002, 2003, 2004, 2005, 2007
> +   Copyright (C) 1995, 1996, 1999, 2000, 2002, 2003, 2004, 2005, 2007, 2011
>     Free Software Foundation, Inc.
>     Contributed by Doug Evans (dje@cygnus.com).
>     
> @@ -49,7 +49,7 @@
>  
>  #undef  MULTILIB_DEFAULTS
>  #define MULTILIB_DEFAULTS \
> -  { "marm", "mlittle-endian", "msoft-float", "mno-thumb-interwork" }  
> +  { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork" }  
>  \f
>  #undef  WCHAR_TYPE
>  #define WCHAR_TYPE 	"short unsigned int"
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/rtems-elf.h gcc-mainline/gcc/config/arm/rtems-elf.h
> --- gcc-mainline-1/gcc/config/arm/rtems-elf.h	2009-03-28 00:38:45.000000000 -0700
> +++ gcc-mainline/gcc/config/arm/rtems-elf.h	2011-03-01 15:34:36.000000000 -0800
> @@ -1,5 +1,6 @@
>  /* Definitions for RTEMS based ARM systems using ELF
> -   Copyright (C) 2000, 2002, 2005, 2007, 2008 Free Software Foundation, Inc.
> +   Copyright (C) 2000, 2002, 2005, 2007, 2008, 2009, 2011
> +   Free Software Foundation, Inc.
>   
>     This file is part of GCC.
>   
> @@ -36,7 +37,7 @@
>   */
>  #undef SUBTARGET_EXTRA_ASM_SPEC
>  #define SUBTARGET_EXTRA_ASM_SPEC "\
> -  %{!mhard-float: %{!msoft-float:-mfpu=softfpa}}"
> +  %{!mfloat-abi=hard: %{!mfloat-abi=soft:-mfpu=softfpa}}"
>  
>  /*
>   *  The default includes --start-group and --end-group which conflicts
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/semi.h gcc-mainline/gcc/config/arm/semi.h
> --- gcc-mainline-1/gcc/config/arm/semi.h	2009-03-28 00:38:45.000000000 -0700
> +++ gcc-mainline/gcc/config/arm/semi.h	2011-03-01 15:33:18.000000000 -0800
> @@ -1,5 +1,5 @@
>  /* Definitions of target machine for GNU compiler.  ARM on semi-hosted platform
> -   Copyright (C) 1994, 1995, 1996, 1997, 2001, 2004, 2005, 2007
> +   Copyright (C) 1994, 1995, 1996, 1997, 2001, 2004, 2005, 2007, 2011
>     Free Software Foundation, Inc.
>     Contributed by Richard Earnshaw (richard.earnshaw@arm.com)
>  
> @@ -68,7 +68,6 @@
>  %{mcpu=*:-mcpu=%*} \
>  %{march=*:-march=%*} \
>  %{mapcs-float:-mfloat} \
> -%{msoft-float:-mfloat-abi=soft} %{mhard-float:-mfloat-abi=hard} \
>  %{mfloat-abi=*} %{mfpu=*} \
>  %{mthumb-interwork:-mthumb-interwork} \
>  %(subtarget_extra_asm_spec)"
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/t-arm-elf gcc-mainline/gcc/config/arm/t-arm-elf
> --- gcc-mainline-1/gcc/config/arm/t-arm-elf	2011-01-04 03:50:58.000000000 -0800
> +++ gcc-mainline/gcc/config/arm/t-arm-elf	2011-03-01 15:27:26.000000000 -0800
> @@ -1,5 +1,5 @@
>  # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
> -# 2008, 2010 Free Software Foundation, Inc.
> +# 2008, 2010, 2011 Free Software Foundation, Inc.
>  #
>  # This file is part of GCC.
>  #
> @@ -67,9 +67,9 @@ MULTILIB_EXCEPTIONS    += *mthumb/*mfloa
>  # MULTILIB_DIRNAMES    += le be
>  # MULTILIB_MATCHES     += mbig-endian=mbe mlittle-endian=mle
>  # 
> -# MULTILIB_OPTIONS    += mhard-float/msoft-float
> +# MULTILIB_OPTIONS    += mfloat-abi=hard/mfloat-abi=soft
>  # MULTILIB_DIRNAMES   += fpu soft
> -# MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
> +# MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
>  # 
>  # MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
>  # MULTILIB_DIRNAMES   += normal interwork
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/t-linux gcc-mainline/gcc/config/arm/t-linux
> --- gcc-mainline-1/gcc/config/arm/t-linux	2009-04-24 16:20:51.000000000 -0700
> +++ gcc-mainline/gcc/config/arm/t-linux	2011-03-01 15:28:16.000000000 -0800
> @@ -1,5 +1,5 @@
>  # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2006,
> -# 2008 Free Software Foundation, Inc.
> +# 2008, 2011 Free Software Foundation, Inc.
>  #
>  # This file is part of GCC.
>  #
> @@ -25,7 +25,7 @@ LIB1ASMSRC = arm/lib1funcs.asm
>  LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
>  	_arm_addsubdf3 _arm_addsubsf3
>  
> -# MULTILIB_OPTIONS = mhard-float/msoft-float
> +# MULTILIB_OPTIONS = mfloat-abi=hard/mfloat-abi=soft
>  # MULTILIB_DIRNAMES = hard-float soft-float
>  
>  # EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/t-pe gcc-mainline/gcc/config/arm/t-pe
> --- gcc-mainline-1/gcc/config/arm/t-pe	2010-11-29 10:43:41.000000000 -0800
> +++ gcc-mainline/gcc/config/arm/t-pe	2011-03-01 15:28:41.000000000 -0800
> @@ -1,5 +1,5 @@
>  # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2008, 2009,
> -# 2010
> +# 2010, 2011
>  # Free Software Foundation, Inc.
>  #
>  # This file is part of GCC.
> @@ -44,7 +44,7 @@ pe.o: $(srcdir)/config/arm/pe.c $(CONFIG
>  	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
>  		$(srcdir)/config/arm/pe.c
>  
> -MULTILIB_OPTIONS = mhard-float mthumb
> +MULTILIB_OPTIONS = mfloat-abi=hard mthumb
>  MULTILIB_DIRNAMES = fpu thumb
>  
>  LIBGCC = stmp-multilib
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/t-rtems gcc-mainline/gcc/config/arm/t-rtems
> --- gcc-mainline-1/gcc/config/arm/t-rtems	2009-03-28 00:38:45.000000000 -0700
> +++ gcc-mainline/gcc/config/arm/t-rtems	2011-03-01 15:29:09.000000000 -0800
> @@ -5,6 +5,6 @@ MULTILIB_DIRNAMES    = arm thumb
>  MULTILIB_EXCEPTIONS  = 
>  MULTILIB_MATCHES     = marm=mno-thumb
>  
> -MULTILIB_OPTIONS    += msoft-float/mhard-float
> +MULTILIB_OPTIONS    += mfloat-abi=soft/mfloat-abi=hard
>  MULTILIB_DIRNAMES   += soft fpu
> -MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
> +MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/t-strongarm-elf gcc-mainline/gcc/config/arm/t-strongarm-elf
> --- gcc-mainline-1/gcc/config/arm/t-strongarm-elf	2009-07-02 08:25:53.000000000 -0700
> +++ gcc-mainline/gcc/config/arm/t-strongarm-elf	2011-03-01 15:30:09.000000000 -0800
> @@ -1,4 +1,5 @@
> -# Copyright (C) 2000, 2001, 2006, 2008 Free Software Foundation, Inc.
> +# Copyright (C) 2000, 2001, 2006, 2008, 2009, 2011
> +# Free Software Foundation, Inc.
>  #
>  # This file is part of GCC.
>  #
> @@ -37,7 +38,7 @@ dp-bit.c: $(srcdir)/config/fp-bit.c
>  	echo '#endif' >> dp-bit.c
>  	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
>  
> -MULTILIB_OPTIONS     = mlittle-endian/mbig-endian mhard-float/msoft-float
> +MULTILIB_OPTIONS     = mlittle-endian/mbig-endian mfloat-abi=hard/mfloat-abi=soft
>  MULTILIB_DIRNAMES    = le be fpu soft
>  MULTILIB_EXCEPTIONS  =
>  MULTILIB_MATCHES     = mbig-endian=mbe mlittle-endian=mle
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/t-wince-pe gcc-mainline/gcc/config/arm/t-wince-pe
> --- gcc-mainline-1/gcc/config/arm/t-wince-pe	2010-11-29 10:44:00.000000000 -0800
> +++ gcc-mainline/gcc/config/arm/t-wince-pe	2011-03-01 15:30:27.000000000 -0800
> @@ -1,4 +1,4 @@
> -# Copyright (C) 2003, 2004, 2006, 2008, 2009, 2010
> +# Copyright (C) 2003, 2004, 2006, 2008, 2009, 2010, 2011
>  # Free Software Foundation, Inc.
>  #
>  # This file is part of GCC.
> @@ -43,7 +43,7 @@ pe.o: $(srcdir)/config/arm/pe.c $(CONFIG
>  	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
>  		$(srcdir)/config/arm/pe.c
>  
> -MULTILIB_OPTIONS = mhard-float
> +MULTILIB_OPTIONS = mfloat-abi=hard
>  MULTILIB_DIRNAMES = fpu
>  # Note - Thumb multilib omitted because Thumb support for
>  # arm-wince-pe target does not appear to be working in binutils
> diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/arm/wince-pe.h gcc-mainline/gcc/config/arm/wince-pe.h
> --- gcc-mainline-1/gcc/config/arm/wince-pe.h	2009-03-28 00:38:45.000000000 -0700
> +++ gcc-mainline/gcc/config/arm/wince-pe.h	2011-03-01 15:33:16.000000000 -0800
> @@ -1,5 +1,5 @@
>  /* Definitions of target machine for GNU compiler, for ARM with WINCE-PE obj format.
> -   Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
> +   Copyright (C) 2003, 2004, 2005, 2007, 2011 Free Software Foundation, Inc.
>     Contributed by Nick Clifton <nickc@redhat.com>
>     
>     This file is part of GCC.
> @@ -23,4 +23,4 @@
>  
>  #undef  MULTILIB_DEFAULTS
>  #define MULTILIB_DEFAULTS \
> -  { "marm", "mlittle-endian", "msoft-float", "mno-thumb-interwork" }  
> +  { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork" }  



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [4.7] Make ARM -mhard-float and -msoft-float into proper -mfloat-abi= aliases
  2011-03-02  9:36 ` Richard Earnshaw
@ 2011-03-30 20:30   ` Joseph S. Myers
  2011-03-30 21:18     ` Richard Earnshaw
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph S. Myers @ 2011-03-30 20:30 UTC (permalink / raw)
  To: Richard Earnshaw; +Cc: gcc-patches, nickc, paul, ramana.radhakrishnan

On Wed, 2 Mar 2011, Richard Earnshaw wrote:

> Could you remove the documentation entries for the hard/soft-float
> aliases please?  They're really only there for legacy reasons.

Is this the change you want here?

2011-03-30  Joseph Myers  <joseph@codesourcery.com>

	* config/arm/arm.opt (mhard-float, msoft-float): Mark
	Undocumented.  Remove help text.
	* doc/invoke.texi (ARM Options): Don't document -msoft-float and
	-mhard-float.

Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi	(revision 171745)
+++ doc/invoke.texi	(working copy)
@@ -454,7 +454,7 @@
 -mapcs-reentrant  -mno-apcs-reentrant @gol
 -msched-prolog  -mno-sched-prolog @gol
 -mlittle-endian  -mbig-endian  -mwords-little-endian @gol
--mfloat-abi=@var{name}  -msoft-float  -mhard-float  -mfpe @gol
+-mfloat-abi=@var{name}  -mfpe @gol
 -mfp16-format=@var{name}
 -mthumb-interwork  -mno-thumb-interwork @gol
 -mcpu=@var{name}  -march=@var{name}  -mfpu=@var{name}  @gol
@@ -10079,14 +10079,6 @@
 compile your entire program with the same ABI, and link with a
 compatible set of libraries.
 
-@item -mhard-float
-@opindex mhard-float
-Equivalent to @option{-mfloat-abi=hard}.
-
-@item -msoft-float
-@opindex msoft-float
-Equivalent to @option{-mfloat-abi=soft}.
-
 @item -mlittle-endian
 @opindex mlittle-endian
 Generate code for a processor running in little-endian mode.  This is
Index: config/arm/arm.opt
===================================================================
--- config/arm/arm.opt	(revision 171745)
+++ config/arm/arm.opt	(working copy)
@@ -94,8 +94,7 @@
 Specify the name of the target floating point hardware/format
 
 mhard-float
-Target RejectNegative Alias(mfloat-abi=, hard)
-Alias for -mfloat-abi=hard
+Target RejectNegative Alias(mfloat-abi=, hard) Undocumented
 
 mlittle-endian
 Target Report RejectNegative InverseMask(BIG_END)
@@ -122,8 +121,7 @@
 Do not load the PIC register in function prologues
 
 msoft-float
-Target RejectNegative Alias(mfloat-abi=, soft)
-Alias for -mfloat-abi=soft
+Target RejectNegative Alias(mfloat-abi=, soft) Undocumented
 
 mstructure-size-boundary=
 Target RejectNegative Joined Var(structure_size_string)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [4.7] Make ARM -mhard-float and -msoft-float into proper -mfloat-abi= aliases
  2011-03-30 20:30   ` Joseph S. Myers
@ 2011-03-30 21:18     ` Richard Earnshaw
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Earnshaw @ 2011-03-30 21:18 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: Richard Earnshaw, gcc-patches, nickc, paul, ramana.radhakrishnan


On 30 Mar 2011, at 21:11, "Joseph S. Myers" <joseph@codesourcery.com> wrote:

> On Wed, 2 Mar 2011, Richard Earnshaw wrote:
> 
>> Could you remove the documentation entries for the hard/soft-float
>> aliases please?  They're really only there for legacy reasons.
> 
> Is this the change you want here?
> 
> 2011-03-30  Joseph Myers  <joseph@codesourcery.com>
> 
>    * config/arm/arm.opt (mhard-float, msoft-float): Mark
>    Undocumented.  Remove help text.
>    * doc/invoke.texi (ARM Options): Don't document -msoft-float and
>    -mhard-float.
> 

Yes, that's great.  Thanks.

R.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-30 20:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-02  2:01 [4.7] Make ARM -mhard-float and -msoft-float into proper -mfloat-abi= aliases Joseph S. Myers
2011-03-02  9:36 ` Richard Earnshaw
2011-03-30 20:30   ` Joseph S. Myers
2011-03-30 21:18     ` Richard Earnshaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).