This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Enabled arm-gas warning about deprecated command line options


Hi Guys,

  I am thinking about applying the patches below to enable ARM-GAS
  to issue warning messages when deprecated command line options
  are used.  (ie -marm... instead of -mcpu=arm... or -march=arm...).
  Most of the patch is actually fixing up all the places I could find
  where the old options were used.

  Any objections to my applying this patch ?

Cheers
        Nick

gas/ChangeLog
2002-05-20  Nick Clifton  <nickc@cambridge.redhat.com>

	* config/tc-arm.c (WARN_DEPRECATED): Enable.

gas/testsuite/ChangeLog
2002-05-20  Nick Clifton  <nickc@cambridge.redhat.com>

	* gas/arm/arm.exp: Replace deprecated command line switches
	with their modern equivalents.
	* gas/arm/arm7t.d: As above.
	* gas/arm/armv1.d: As above.
	* gas/arm/fpa-dyadic.d: As above.
	* gas/arm/fpa-mem.d: As above.
	* gas/arm/fpa-monadic.d: As above.
	* gas/arm/inst.d: As above.
	* gas/arm/ldconst.d: As above.
	* gas/arm/xscale.d: As above.

gcc/ChangeLog
2002-05-20  Nick Clifton  <nickc@cambridge.redhat.com>

	* config/arm/arm-wince-pe.h (ASM_SPEC): Pass -mcpu and -march
	switches straight on to the assembler, do not abbreviate them.
	* config/arm/elf.h (ASM_SPEC): As above.
	* config/arm/semi.h (ASM_SPEC): As above.
	* config/arm/unknown-elf-oabi.h (ASM_SPEC): As above.
	* config/arm/xscale-coff.h (SUBTARGET_ASM_SPEC): Pass
	-mcpu=xscale on to the assembler by default.
	* config/arm/xscale-elf.h (SUBTARGET_ASM_SPEC): As above.


Index: gas/config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.121
diff -c -3 -p -w -r1.121 tc-arm.c
*** gas/config/tc-arm.c	14 May 2002 20:40:30 -0000	1.121
--- gas/config/tc-arm.c	20 May 2002 13:39:13 -0000
***************
*** 39,46 ****
  #include "dwarf2dbg.h"
  #endif
  
! /* XXX Set this to 1 after the next binutils release */
! #define WARN_DEPRECATED 0
  
  /* The following bitmasks control CPU extensions:  */
  #define ARM_EXT_V1	 0x00000001	/* All processors (core set).  */
--- 39,46 ----
  #include "dwarf2dbg.h"
  #endif
  
! /* Warn about deprecated options.  */
! #define WARN_DEPRECATED 1
  
  /* The following bitmasks control CPU extensions:  */
  #define ARM_EXT_V1	 0x00000001	/* All processors (core set).  */

Index: gas/testsuite/gas/arm/arm.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/arm.exp,v
retrieving revision 1.13
diff -c -3 -p -w -r1.13 arm.exp
*** gas/testsuite/gas/arm/arm.exp	19 Jan 2002 14:25:48 -0000	1.13
--- gas/testsuite/gas/arm/arm.exp	20 May 2002 13:39:13 -0000
*************** if {[istarget *arm*-*-*] || [istarget "x
*** 21,39 ****
  
      run_dump_test "armv1"
  
!     run_errors_test "armv1-bad" "-marm1" "ARM v1 errors"
  
!     gas_test "arm3.s" "-marm3" $stdoptlist "Arm 3 instructions"
  
!     gas_test "arm6.s" "-marm6" $stdoptlist "Arm 6 instructions"
  
!     gas_test "arm7dm.s" "-marm7dm" $stdoptlist "Arm 7DM instructions"
  
      run_dump_test "arm7t"
  
!     gas_test "thumb.s" "-marm7t" $stdoptlist "Thumb instructions"
  
!     gas_test "arch4t.s" "-marmv4t" $stdoptlist "Arm architecture 4t instructions"
  
      run_dump_test "arch5tej"
  
--- 21,39 ----
  
      run_dump_test "armv1"
  
!     run_errors_test "armv1-bad" "-mcpu=arm7m" "ARM v1 errors"
  
!     gas_test "arm3.s" "-mcpu=arm3" $stdoptlist "Arm 3 instructions"
  
!     gas_test "arm6.s" "-mcpu=arm6" $stdoptlist "Arm 6 instructions"
  
!     gas_test "arm7dm.s" "-mcpu=arm7dm" $stdoptlist "Arm 7DM instructions"
  
      run_dump_test "arm7t"
  
!     gas_test "thumb.s" "-mcpu=arm7t" $stdoptlist "Thumb instructions"
  
!     gas_test "arch4t.s" "-march=armv4t" $stdoptlist "Arm architecture 4t instructions"
  
      run_dump_test "arch5tej"
  
Index: gas/testsuite/gas/arm/arm7t.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/arm7t.d,v
retrieving revision 1.7
diff -c -3 -p -w -r1.7 arm7t.d
*** gas/testsuite/gas/arm/arm7t.d	2 May 2002 09:11:14 -0000	1.7
--- gas/testsuite/gas/arm/arm7t.d	20 May 2002 13:39:13 -0000
***************
*** 1,6 ****
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: ARM arm7t
! #as: -marm7t -EL
  
  # Test the halfword and signextend memory transfers:
  
--- 1,6 ----
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: ARM arm7t
! #as: -mcpu=arm7t -EL
  
  # Test the halfword and signextend memory transfers:
  
Index: gas/testsuite/gas/arm/armv1.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/armv1.d,v
retrieving revision 1.1
diff -c -3 -p -w -r1.1 armv1.d
*** gas/testsuite/gas/arm/armv1.d	14 Jan 2002 17:39:02 -0000	1.1
--- gas/testsuite/gas/arm/armv1.d	20 May 2002 13:39:13 -0000
***************
*** 1,6 ****
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: ARM v1 instructions
! #as: -marm1
  
  # Test the ARM v1 instructions
  
--- 1,6 ----
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: ARM v1 instructions
! #as: -mcpu=arm7t
  
  # Test the ARM v1 instructions
  
Index: gas/testsuite/gas/arm/fpa-dyadic.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/fpa-dyadic.d,v
retrieving revision 1.1
diff -c -3 -p -w -r1.1 fpa-dyadic.d
*** gas/testsuite/gas/arm/fpa-dyadic.d	14 Jan 2002 17:39:02 -0000	1.1
--- gas/testsuite/gas/arm/fpa-dyadic.d	20 May 2002 13:39:13 -0000
***************
*** 1,6 ****
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: FPA Dyadic instructions
! #as: -mfpe-old
  
  # Test FPA Dyadic instructions
  # This test should work for both big and little-endian assembly.
--- 1,6 ----
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: FPA Dyadic instructions
! #as: -mfpu=fpa -mcpu=arm7m
  
  # Test FPA Dyadic instructions
  # This test should work for both big and little-endian assembly.
Index: gas/testsuite/gas/arm/fpa-mem.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/fpa-mem.d,v
retrieving revision 1.1
diff -c -3 -p -w -r1.1 fpa-mem.d
*** gas/testsuite/gas/arm/fpa-mem.d	14 Jan 2002 17:39:02 -0000	1.1
--- gas/testsuite/gas/arm/fpa-mem.d	20 May 2002 13:39:13 -0000
***************
*** 1,6 ****
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: FPA memory insructions
! #as: -mfpa10
  
  # Test FPA memory instructions
  # This test should work for both big and little-endian assembly.
--- 1,6 ----
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: FPA memory insructions
! #as: -mfpu=fpa10 -mcpu=arm7m
  
  # Test FPA memory instructions
  # This test should work for both big and little-endian assembly.
Index: gas/testsuite/gas/arm/fpa-monadic.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/fpa-monadic.d,v
retrieving revision 1.1
diff -c -3 -p -w -r1.1 fpa-monadic.d
*** gas/testsuite/gas/arm/fpa-monadic.d	14 Jan 2002 17:39:02 -0000	1.1
--- gas/testsuite/gas/arm/fpa-monadic.d	20 May 2002 13:39:13 -0000
***************
*** 1,6 ****
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: FPA Monadic instructions
! #as: -mfpe-old
  
  # Test FPA Monadic instructions
  # This test should work for both big and little-endian assembly.
--- 1,6 ----
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: FPA Monadic instructions
! #as: -mfpu=fpa -mcpu=arm7m
  
  # Test FPA Monadic instructions
  # This test should work for both big and little-endian assembly.
Index: gas/testsuite/gas/arm/inst.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/inst.d,v
retrieving revision 1.9
diff -c -3 -p -w -r1.9 inst.d
*** gas/testsuite/gas/arm/inst.d	16 Jul 2001 19:06:09 -0000	1.9
--- gas/testsuite/gas/arm/inst.d	20 May 2002 13:39:13 -0000
***************
*** 1,6 ****
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: ARM basic instructions
! #as: -marm2 -EL
  
  # Test the standard ARM instructions:
  
--- 1,6 ----
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: ARM basic instructions
! #as: -mcpu=arm7m -EL
  
  # Test the standard ARM instructions:
  
Index: gas/testsuite/gas/arm/ldconst.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/ldconst.d,v
retrieving revision 1.1
diff -c -3 -p -w -r1.1 ldconst.d
*** gas/testsuite/gas/arm/ldconst.d	11 Jan 2002 18:00:17 -0000	1.1
--- gas/testsuite/gas/arm/ldconst.d	20 May 2002 13:39:13 -0000
***************
*** 1,6 ****
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: ARM ldr with immediate constant
! #as: -marm2 -EL
  
  .*: +file format .*arm.*
  
--- 1,6 ----
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: ARM ldr with immediate constant
! #as: -mcpu=arm7m -EL
  
  .*: +file format .*arm.*
  
Index: gas/testsuite/gas/arm/xscale.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/xscale.d,v
retrieving revision 1.4
diff -c -3 -p -w -r1.4 xscale.d
*** gas/testsuite/gas/arm/xscale.d	5 Dec 2001 11:58:39 -0000	1.4
--- gas/testsuite/gas/arm/xscale.d	20 May 2002 13:39:13 -0000
***************
*** 1,6 ****
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: XScale instructions
! #as: -mxscale -EL
  
  # Test the XScale instructions:
  
--- 1,6 ----
  #objdump: -dr --prefix-addresses --show-raw-insn
  #name: XScale instructions
! #as: -mcpu=xscale -EL
  
  # Test the XScale instructions:
  
Index: gcc/config/arm/arm-wince-pe.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm-wince-pe.h,v
retrieving revision 1.2
diff -c -3 -p -w -r1.2 arm-wince-pe.h
*** gcc/config/arm/arm-wince-pe.h	29 Feb 2000 00:34:46 -0000	1.2
--- gcc/config/arm/arm-wince-pe.h	20 May 2002 13:37:57 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 51,58 ****
  #undef  ASM_SPEC
  #define ASM_SPEC "			\
  %{mbig-endian:-EB}			\
! %{mcpu=*:-m%*}				\
! %{march=*:-m%*}				\
  %{mapcs-*:-mapcs-%*}			\
  %{mthumb-interwork:-mthumb-interwork}	\
  %{!mapcs-32:%{!mapcs-26:-mapcs-32}}	\
--- 51,58 ----
  #undef  ASM_SPEC
  #define ASM_SPEC "			\
  %{mbig-endian:-EB}			\
! %{mcpu=*:-mcpu=%*}			\
! %{march=*:-march=%*}			\
  %{mapcs-*:-mapcs-%*}			\
  %{mthumb-interwork:-mthumb-interwork}	\
  %{!mapcs-32:%{!mapcs-26:-mapcs-32}}	\

Index: gcc/config/arm/elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/elf.h,v
retrieving revision 1.33
diff -c -3 -p -w -r1.33 elf.h
*** gcc/config/arm/elf.h	18 Mar 2002 11:26:24 -0000	1.33
--- gcc/config/arm/elf.h	20 May 2002 13:37:57 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 46,53 ****
  #ifndef ASM_SPEC
  #define ASM_SPEC "\
  %{mbig-endian:-EB} \
! %{mcpu=*:-m%*} \
! %{march=*:-m%*} \
  %{mapcs-*:-mapcs-%*} \
  %{mapcs-float:-mfloat} \
  %{msoft-float:-mno-fpu} \
--- 46,53 ----
  #ifndef ASM_SPEC
  #define ASM_SPEC "\
  %{mbig-endian:-EB} \
! %{mcpu=*:-mcpu=%*} \
! %{march=*:-march=%*} \
  %{mapcs-*:-mapcs-%*} \
  %{mapcs-float:-mfloat} \
  %{msoft-float:-mno-fpu} \

Index: gcc/config/arm/semi.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/semi.h,v
retrieving revision 1.8
diff -c -3 -p -w -r1.8 semi.h
*** gcc/config/arm/semi.h	16 Nov 2001 21:23:16 -0000	1.8
--- gcc/config/arm/semi.h	20 May 2002 13:37:57 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 61,68 ****
  #define ASM_SPEC "\
  %{fpic: -k} %{fPIC: -k} \
  %{mbig-endian:-EB} \
! %{mcpu=*:-m%*} \
! %{march=*:-m%*} \
  %{mapcs-float:-mfloat} \
  %{msoft-float:-mno-fpu} \
  %{mthumb-interwork:-mthumb-interwork} \
--- 61,68 ----
  #define ASM_SPEC "\
  %{fpic: -k} %{fPIC: -k} \
  %{mbig-endian:-EB} \
! %{mcpu=*:-mcpu=%*} \
! %{march=*:-march=%*} \
  %{mapcs-float:-mfloat} \
  %{msoft-float:-mno-fpu} \
  %{mthumb-interwork:-mthumb-interwork} \

Index: gcc/config/arm/unknown-elf-oabi.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/unknown-elf-oabi.h,v
retrieving revision 1.5
diff -c -3 -p -w -r1.5 unknown-elf-oabi.h
*** gcc/config/arm/unknown-elf-oabi.h	14 May 2002 17:35:49 -0000	1.5
--- gcc/config/arm/unknown-elf-oabi.h	20 May 2002 13:37:57 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 24,29 ****
  #define TARGET_VERSION	fputs (" (ARM/ELF non-Linux old abi)", stderr);
  
  #undef  ASM_SPEC
! #define ASM_SPEC "-moabi %{mbig-endian:-EB} %{mcpu=*:-m%*} %{march=*:-m%*} \
   %{mapcs-*:-mapcs-%*} %{mthumb-interwork:-mthumb-interwork}"
  
--- 24,29 ----
  #define TARGET_VERSION	fputs (" (ARM/ELF non-Linux old abi)", stderr);
  
  #undef  ASM_SPEC
! #define ASM_SPEC "-moabi %{mbig-endian:-EB} %{mcpu=*:-mcpu=%*} %{march=*:-march=%*} \
   %{mapcs-*:-mapcs-%*} %{mthumb-interwork:-mthumb-interwork}"
  
Index: gcc/config/arm/xscale-coff.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/xscale-coff.h,v
retrieving revision 1.3
diff -c -3 -p -w -r1.3 xscale-coff.h
*** gcc/config/arm/xscale-coff.h	23 Nov 2001 09:13:14 -0000	1.3
--- gcc/config/arm/xscale-coff.h	20 May 2002 13:37:57 -0000
***************
*** 24,30 ****
  #define SUBTARGET_CPU_DEFAULT 		TARGET_CPU_xscale
  
  #undef  SUBTARGET_EXTRA_ASM_SPEC
! #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mxscale}"
  
  #undef  MULTILIB_DEFAULTS
  #define MULTILIB_DEFAULTS \
--- 24,30 ----
  #define SUBTARGET_CPU_DEFAULT 		TARGET_CPU_xscale
  
  #undef  SUBTARGET_EXTRA_ASM_SPEC
! #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale}"
  
  #undef  MULTILIB_DEFAULTS
  #define MULTILIB_DEFAULTS \

Index: gcc/config/arm/xscale-elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/xscale-elf.h,v
retrieving revision 1.3
diff -c -3 -p -w -r1.3 xscale-elf.h
*** gcc/config/arm/xscale-elf.h	19 Dec 2001 15:27:22 -0000	1.3
--- gcc/config/arm/xscale-elf.h	20 May 2002 13:37:57 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 28,34 ****
  #define SUBTARGET_CPU_DEFAULT 		TARGET_CPU_xscale
  #endif
  
! #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mxscale} %{!mhard-float:-mno-fpu}"
  
  #ifndef MULTILIB_DEFAULTS
  #define MULTILIB_DEFAULTS \
--- 28,34 ----
  #define SUBTARGET_CPU_DEFAULT 		TARGET_CPU_xscale
  #endif
  
! #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} %{!mhard-float:-mno-fpu}"
  
  #ifndef MULTILIB_DEFAULTS
  #define MULTILIB_DEFAULTS \


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