This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[7/9] Specs cleanup: -v for assembler
The driver -v option is always converted to an assembler -v option for
the GNU assembler through a spec in asm_options. Thus, there is never
any need for %{v} or %{v:-v} or %{v:-V} in ASM_SPEC for the GNU
assembler. This patch removes such specs where I believe that only
the GNU assembler will be used for the specs in question.
Cases where the same spec also mishandles -V as a GCC option are
covered in patch 8.
2010-12-02 Joseph Myers <joseph@codesourcery.com>
* config/arc/arc.h (ASM_SPEC): Remove %{v}.
* config/bfin/bfin.h (ASM_SPEC): Remove %{v}.
* config/cris/cris.h (ASM_SPEC): Remove %{v:-v}.
* config/fr30/fr30.h (ASM_SPEC): Remove %{v}.
* config/frv/frv.h (ASM_SPEC): Remove %{v}.
* config/i386/linux.h (ASM_SPEC): Remove %{v}.
* config/i386/linux64.h (ASM_SPEC): Remove %{v}.
* config/i386/mingw-w64.h (ASM_SPEC): Remove %{v}.
* config/i386/sol2-10.h (ASM_SPEC): Remove %{v}.
* config/i386/vxworks.h (ASM_SPEC): Remove %{v}.
* config/i386/x86-64.h (ASM_SPEC): Remove %{v}.
* config/lm32/lm32.h (ASM_SPEC): Remove %{v}.
* config/m32r/m32r.h (ASM_SPEC): Remove %{v}.
* config/m68k/linux.h (ASM_SPEC): Remove %{v:-V}.
* config/microblaze/microblaze.h (ASM_SPEC): Remove %{v}.
* config/mips/mips.h (ASM_SPEC): Remove %{v}.
* config/mips/vxworks.h (ASM_SPEC): Remove %{v}.
* config/pa/pa-linux.h (ASM_SPEC): Remove %{v:-V}.
* config/rs6000/freebsd.h (SVR4_ASM_SPEC): Remove %{v}.
* config/rs6000/linux64.h (ASM_SPEC): Remove %{v:-V}.
* config/rs6000/vxworks.h (ASM_SPEC): Remove %{v:-v}.
* config/sparc/openbsd64.h (ASM_SPEC): Remove %{v:-V}.
* config/svr4.h (SVR4_ASM_SPEC): Remove %{v:-V}.
* config/xtensa/elf.h (ASM_SPEC): Remove %{v}.
* config/xtensa/linux.h (ASM_SPEC): Remove %{v}.
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/arc/arc.h gcc-mainline/gcc/config/arc/arc.h
--- gcc-mainline-6/gcc/config/arc/arc.h 2010-11-22 05:28:25.000000000 -0800
+++ gcc-mainline/gcc/config/arc/arc.h 2010-12-01 17:39:58.000000000 -0800
@@ -62,7 +62,7 @@ along with GCC; see the file COPYING3.
%{EB:-mbig-endian} %{EL:-mlittle-endian} \
"
-#define ASM_SPEC "%{v} %{EB} %{EL}"
+#define ASM_SPEC "%{EB} %{EL}"
#define LINK_SPEC "%{v} %{EB} %{EL}"
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/bfin/bfin.h gcc-mainline/gcc/config/bfin/bfin.h
--- gcc-mainline-6/gcc/config/bfin/bfin.h 2010-12-01 16:52:22.000000000 -0800
+++ gcc-mainline/gcc/config/bfin/bfin.h 2010-12-01 17:40:18.000000000 -0800
@@ -248,7 +248,7 @@ extern unsigned int bfin_workarounds;
Defined in svr4.h. */
#undef ASM_SPEC
#define ASM_SPEC "\
-%{v} %{Ym,*} %{Yd,*} \
+%{Ym,*} %{Yd,*} \
%{mno-fdpic:-mnopic} %{mfdpic}"
#define LINK_SPEC "\
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/cris/cris.h gcc-mainline/gcc/config/cris/cris.h
--- gcc-mainline-6/gcc/config/cris/cris.h 2010-11-22 05:28:24.000000000 -0800
+++ gcc-mainline/gcc/config/cris/cris.h 2010-12-01 17:49:52.000000000 -0800
@@ -192,8 +192,7 @@ extern int cris_cpu_version;
#undef ASM_SPEC
#define ASM_SPEC \
MAYBE_AS_NO_MUL_BUG_ABORT \
- "%{v:-v}\
- %(asm_subtarget)\
+ "%(asm_subtarget)\
%{march=*:%{cpu=*:%edo not specify both -march=... and -mcpu=...}}\
%{march=v32:--march=v32} %{mcpu=v32:--march=v32}"
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/fr30/fr30.h gcc-mainline/gcc/config/fr30/fr30.h
--- gcc-mainline-6/gcc/config/fr30/fr30.h 2010-11-22 05:28:24.000000000 -0800
+++ gcc-mainline/gcc/config/fr30/fr30.h 2010-12-01 17:40:45.000000000 -0800
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.
/*{{{ Run-time target specifications. */
#undef ASM_SPEC
-#define ASM_SPEC "%{v}"
+#define ASM_SPEC ""
/* Define this to be a string constant containing `-D' options to define the
predefined macros that identify this machine and system. These macros will
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/frv/frv.h gcc-mainline/gcc/config/frv/frv.h
--- gcc-mainline-6/gcc/config/frv/frv.h 2010-12-01 16:52:36.000000000 -0800
+++ gcc-mainline/gcc/config/frv/frv.h 2010-12-01 17:40:54.000000000 -0800
@@ -71,7 +71,7 @@
Defined in svr4.h. */
#undef ASM_SPEC
#define ASM_SPEC "\
-%{G*} %{v} %{Ym,*} %{Yd,*} \
+%{G*} %{Ym,*} %{Yd,*} \
%{mtomcat-stats} \
%{!mno-eflags: \
%{mcpu=*} \
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/i386/linux.h gcc-mainline/gcc/config/i386/linux.h
--- gcc-mainline-6/gcc/config/i386/linux.h 2010-12-01 17:09:15.000000000 -0800
+++ gcc-mainline/gcc/config/i386/linux.h 2010-12-01 17:41:29.000000000 -0800
@@ -104,7 +104,7 @@ along with GCC; see the file COPYING3.
#undef ASM_SPEC
#define ASM_SPEC \
- "%{v} --32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
+ "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/i386/linux64.h gcc-mainline/gcc/config/i386/linux64.h
--- gcc-mainline-6/gcc/config/i386/linux64.h 2010-12-01 17:09:15.000000000 -0800
+++ gcc-mainline/gcc/config/i386/linux64.h 2010-12-01 17:41:35.000000000 -0800
@@ -71,7 +71,7 @@ see the files COPYING3 and COPYING.RUNTI
#endif
#undef ASM_SPEC
-#define ASM_SPEC "%{v} %{" SPEC_32 ":--32} %{" SPEC_64 ":--64} \
+#define ASM_SPEC "%{" SPEC_32 ":--32} %{" SPEC_64 ":--64} \
%{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
#undef LINK_SPEC
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/i386/mingw-w64.h gcc-mainline/gcc/config/i386/mingw-w64.h
--- gcc-mainline-6/gcc/config/i386/mingw-w64.h 2010-12-01 05:44:20.000000000 -0800
+++ gcc-mainline/gcc/config/i386/mingw-w64.h 2010-12-01 17:41:51.000000000 -0800
@@ -2,7 +2,7 @@
hosting on Windows 32/64 via mingw-w64 runtime, using GNU tools and
the Windows API Library.
Copyright (C) 2009,
- 2009 Free Software Foundation, Inc.
+ 2010 Free Software Foundation, Inc.
This file is part of GCC.
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3.
/* Enable multilib. */
#undef ASM_SPEC
-#define ASM_SPEC "%{v} %{m32:--32} %{m64:--64}"
+#define ASM_SPEC "%{m32:--32} %{m64:--64}"
#undef SPEC_32
#undef SPEC_64
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/i386/sol2-10.h gcc-mainline/gcc/config/i386/sol2-10.h
--- gcc-mainline-6/gcc/config/i386/sol2-10.h 2010-12-01 16:53:00.000000000 -0800
+++ gcc-mainline/gcc/config/i386/sol2-10.h 2010-12-01 17:42:05.000000000 -0800
@@ -26,7 +26,7 @@ along with GCC; see the file COPYING3.
assembler requires -xarch=generic or -xarch=generic64 instead. */
#undef ASM_SPEC
#ifdef USE_GAS
-#define ASM_SPEC "%{v} %{m32:--32} %{m64:--64} -s %(asm_cpu)"
+#define ASM_SPEC "%{m32:--32} %{m64:--64} -s %(asm_cpu)"
#else
#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*} " \
"%{m32:-xarch=generic} %{m64:-xarch=generic64} " \
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/i386/vxworks.h gcc-mainline/gcc/config/i386/vxworks.h
--- gcc-mainline-6/gcc/config/i386/vxworks.h 2010-12-01 05:44:20.000000000 -0800
+++ gcc-mainline/gcc/config/i386/vxworks.h 2010-12-01 17:42:19.000000000 -0800
@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3.
#define TARGET_VERSION fprintf (stderr, " (80586, VxWorks syntax)");
#undef ASM_SPEC
-#define ASM_SPEC "%{v}"
+#define ASM_SPEC ""
#define TARGET_OS_CPP_BUILTINS() \
do \
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/i386/x86-64.h gcc-mainline/gcc/config/i386/x86-64.h
--- gcc-mainline-6/gcc/config/i386/x86-64.h 2010-12-01 05:44:20.000000000 -0800
+++ gcc-mainline/gcc/config/i386/x86-64.h 2010-12-01 17:42:26.000000000 -0800
@@ -52,7 +52,7 @@ see the files COPYING3 and COPYING.RUNTI
#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
#undef ASM_SPEC
-#define ASM_SPEC "%{v} %{m32:--32} %{m64:--64}"
+#define ASM_SPEC "%{m32:--32} %{m64:--64}"
#undef ASM_OUTPUT_ALIGNED_BSS
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/lm32/lm32.h gcc-mainline/gcc/config/lm32/lm32.h
--- gcc-mainline-6/gcc/config/lm32/lm32.h 2010-11-09 18:02:41.000000000 -0800
+++ gcc-mainline/gcc/config/lm32/lm32.h 2010-12-01 17:42:39.000000000 -0800
@@ -55,7 +55,6 @@
%{mbarrel-shift-enabled} \
%{msign-extend-enabled} \
%{muser-extend-enabled} \
-%{v} \
"
/* Let link script define all link options.
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/m32r/m32r.h gcc-mainline/gcc/config/m32r/m32r.h
--- gcc-mainline-6/gcc/config/m32r/m32r.h 2010-11-22 05:28:24.000000000 -0800
+++ gcc-mainline/gcc/config/m32r/m32r.h 2010-12-01 17:42:57.000000000 -0800
@@ -168,7 +168,7 @@
/* Options to pass on to the assembler. */
#undef ASM_SPEC
-#define ASM_SPEC "%{v} %(asm_cpu) %(relax) %{fpic|fpie:-K PIC} %{fPIC|fPIE:-K PIC}"
+#define ASM_SPEC "%(asm_cpu) %(relax) %{fpic|fpie:-K PIC} %{fPIC|fPIE:-K PIC}"
#define LINK_SPEC "%{v} %(link_cpu) %(relax)"
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/m68k/linux.h gcc-mainline/gcc/config/m68k/linux.h
--- gcc-mainline-6/gcc/config/m68k/linux.h 2010-12-01 17:10:16.000000000 -0800
+++ gcc-mainline/gcc/config/m68k/linux.h 2010-12-01 17:43:16.000000000 -0800
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.
/* Add %(asm_cpu_spec) to the svr4.h definition of ASM_SPEC. */
#undef ASM_SPEC
#define ASM_SPEC "%(asm_cpu_spec) %(asm_pcrel_spec) \
- %{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*}"
+ %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*}"
#undef PREFERRED_STACK_BOUNDARY
#define PREFERRED_STACK_BOUNDARY 32
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/microblaze/microblaze.h gcc-mainline/gcc/config/microblaze/microblaze.h
--- gcc-mainline-6/gcc/config/microblaze/microblaze.h 2010-12-01 16:24:53.000000000 -0800
+++ gcc-mainline/gcc/config/microblaze/microblaze.h 2010-12-01 17:43:27.000000000 -0800
@@ -74,7 +74,7 @@ extern enum pipeline_type microblaze_pip
/* Assembler specs. */
-#define TARGET_ASM_SPEC "%{v}"
+#define TARGET_ASM_SPEC ""
#define ASM_SPEC "\
%{microblaze1} \
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/mips/mips.h gcc-mainline/gcc/config/mips/mips.h
--- gcc-mainline-6/gcc/config/mips/mips.h 2010-11-22 05:28:25.000000000 -0800
+++ gcc-mainline/gcc/config/mips/mips.h 2010-12-01 17:43:41.000000000 -0800
@@ -1141,7 +1141,7 @@ enum mips_code_readable_setting {
%{mfp32} %{mfp64} \
%{mshared} %{mno-shared} \
%{msym32} %{mno-sym32} \
-%{mtune=*} %{v} \
+%{mtune=*} \
%(subtarget_asm_spec)"
/* Extra switches sometimes passed to the linker. */
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/mips/vxworks.h gcc-mainline/gcc/config/mips/vxworks.h
--- gcc-mainline-6/gcc/config/mips/vxworks.h 2010-10-24 09:35:46.000000000 -0700
+++ gcc-mainline/gcc/config/mips/vxworks.h 2010-12-01 17:43:48.000000000 -0800
@@ -29,7 +29,7 @@ along with GCC; see the file COPYING3.
%(subtarget_asm_debugging_spec) \
%{mabi=*} %{!mabi*: %(asm_abi_default_spec)} \
%{mgp32} %{mgp64} %{march=*} %{mxgot:-xgot} \
-%{mtune=*} %{v} \
+%{mtune=*} \
%(subtarget_asm_spec)"
#undef LINK_SPEC
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/pa/pa-linux.h gcc-mainline/gcc/config/pa/pa-linux.h
--- gcc-mainline-6/gcc/config/pa/pa-linux.h 2010-12-01 17:09:16.000000000 -0800
+++ gcc-mainline/gcc/config/pa/pa-linux.h 2010-12-01 17:43:58.000000000 -0800
@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.
#undef ASM_SPEC
#define ASM_SPEC \
- "%{v:-V} %{Ym,*} %{Yd,*}"
+ "%{Ym,*} %{Yd,*}"
/* Define this for shared library support because it isn't in the main
linux.h file. */
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/rs6000/freebsd.h gcc-mainline/gcc/config/rs6000/freebsd.h
--- gcc-mainline-6/gcc/config/rs6000/freebsd.h 2010-12-01 16:26:32.000000000 -0800
+++ gcc-mainline/gcc/config/rs6000/freebsd.h 2010-12-01 17:44:10.000000000 -0800
@@ -71,4 +71,4 @@
#define ASM_APP_OFF "#NO_APP\n"
/* Define SVR4_ASM_SPEC, we use GAS by default. See svr4.h for details. */
#define SVR4_ASM_SPEC \
- "%{v:-V}"
+ ""
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/rs6000/linux64.h gcc-mainline/gcc/config/rs6000/linux64.h
--- gcc-mainline-6/gcc/config/rs6000/linux64.h 2010-12-01 17:09:16.000000000 -0800
+++ gcc-mainline/gcc/config/rs6000/linux64.h 2010-12-01 17:44:23.000000000 -0800
@@ -207,7 +207,7 @@ extern int dot_symbols;
#define ASM_SPEC_COMMON "%(asm_cpu) \
%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
-%{v:-V} %{Qy:} %{!Qn:-Qy} \
+%{Qy:} %{!Qn:-Qy} \
%{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}"
#undef SUBSUBTARGET_EXTRA_SPECS
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/rs6000/vxworks.h gcc-mainline/gcc/config/rs6000/vxworks.h
--- gcc-mainline-6/gcc/config/rs6000/vxworks.h 2010-12-01 16:54:09.000000000 -0800
+++ gcc-mainline/gcc/config/rs6000/vxworks.h 2010-12-01 17:44:47.000000000 -0800
@@ -87,7 +87,7 @@ VXWORKS_ADDITIONAL_CPP_SPEC
#define ASM_SPEC \
"%(asm_cpu) \
%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
- %{v:-v} %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*} \
+ %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*} \
%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} -mbig"
#undef LIB_SPEC
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/sparc/openbsd64.h gcc-mainline/gcc/config/sparc/openbsd64.h
--- gcc-mainline-6/gcc/config/sparc/openbsd64.h 2010-12-01 17:29:28.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/openbsd64.h 2010-12-01 17:48:09.000000000 -0800
@@ -55,7 +55,7 @@ along with GCC; see the file COPYING3.
#undef ASM_SPEC
#define ASM_SPEC "\
-%{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
+-s %{fpic|fPIC|fpie|fPIE:-K PIC} \
%{mlittle-endian:-EL} \
%(asm_cpu) %(asm_arch) \
"
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/svr4.h gcc-mainline/gcc/config/svr4.h
--- gcc-mainline-6/gcc/config/svr4.h 2010-12-01 16:52:13.000000000 -0800
+++ gcc-mainline/gcc/config/svr4.h 2010-12-01 17:38:50.000000000 -0800
@@ -63,7 +63,7 @@ see the files COPYING3 and COPYING.RUNTI
#ifdef USE_GAS
#define SVR4_ASM_SPEC \
- "%{v:-V}"
+ ""
#else
#define SVR4_ASM_SPEC \
"%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*}"
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/xtensa/elf.h gcc-mainline/gcc/config/xtensa/elf.h
--- gcc-mainline-6/gcc/config/xtensa/elf.h 2010-11-19 13:28:10.000000000 -0800
+++ gcc-mainline/gcc/config/xtensa/elf.h 2010-12-01 17:48:43.000000000 -0800
@@ -43,8 +43,7 @@ along with GCC; see the file COPYING3.
#undef ASM_SPEC
#define ASM_SPEC \
- "%{v} \
- %{mtext-section-literals:--text-section-literals} \
+ "%{mtext-section-literals:--text-section-literals} \
%{mno-text-section-literals:--no-text-section-literals} \
%{mtarget-align:--target-align} \
%{mno-target-align:--no-target-align} \
diff -rupN --exclude=.svn gcc-mainline-6/gcc/config/xtensa/linux.h gcc-mainline/gcc/config/xtensa/linux.h
--- gcc-mainline-6/gcc/config/xtensa/linux.h 2010-12-01 17:18:28.000000000 -0800
+++ gcc-mainline/gcc/config/xtensa/linux.h 2010-12-01 17:48:53.000000000 -0800
@@ -35,8 +35,7 @@ along with GCC; see the file COPYING3.
#undef ASM_SPEC
#define ASM_SPEC \
- "%{v} \
- %{mtext-section-literals:--text-section-literals} \
+ "%{mtext-section-literals:--text-section-literals} \
%{mno-text-section-literals:--no-text-section-literals} \
%{mtarget-align:--target-align} \
%{mno-target-align:--no-target-align} \
--
Joseph S. Myers
joseph@codesourcery.com