[PATCH] Clean-up backend ASM_FINAL_SPEC usage
Roger Sayle
roger@eyesopen.com
Wed Jun 11 16:58:00 GMT 2003
The following patch cleans up most of the unnecessary references to
ASM_FINAL_SPEC in the various GCC back-ends. After this clean-up,
the only backends that define ASM_FINAL_SPEC are mips and alpha.
This makes is clearer that the ASM_FINAL_SPEC is currently only used
for invoking mips-tfile.
I'm investigating PR target/6077, which shows that the only non-empty
definitions of ASM_FINAL_SPEC are currently broken. One possible fix
may be to change the semantics of ASM_FINAL_SPEC or even remove it
completely, which is why cleaning up this area is an excellent first
step.
I am eternally grateful to Kaveh for testing this patch on his "farm",
by cross-compiling cc1 from sparc-sun-solaris2.7 to all of the affected
targets:
d30v-unknown-elf i386-unknown-netbsdelf m32r-unknown-elf
mn10300-unknown-elf v850-unknown-elf v850e-unknown-elf
vax-unknown-netbsdelf xstormy16-unknown-elf xtensa-unknown-elf
xtensa-unknown-linux-gnu
Ok for mainline?
2003-06-11 Roger Sayle <roger@eyesopen.com>
Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* config/d30v/d30v.h: Delete reference to ASM_FINAL_SPEC.
* config/i386/netbsd-elf.h: Likewise.
* config/m32r/m32r.h: Likewise.
* config/mn10300/mn10300.h: Likewise.
* config/stormy16/stormy16.h: Likewise.
* config/v850/v850.h: Likewise.
* config/vax/netbsd-elf.h: Likewise.
* config/xtensa/elf.h: Likewise.
* config/xtensa/linux.h: Likewise.
Index: d30v/d30v.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/d30v/d30v.h,v
retrieving revision 1.84
diff -c -3 -p -r1.84 d30v.h
*** d30v/d30v.h 1 Jun 2003 19:32:14 -0000 1.84
--- d30v/d30v.h 8 Jun 2003 21:09:38 -0000
***************
*** 43,51 ****
%{v} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
/* Defined in svr4.h. */
- /* #define ASM_FINAL_SPEC "" */
-
- /* Defined in svr4.h. */
#undef LINK_SPEC
#define LINK_SPEC "\
%{h*} %{v:-V} \
--- 43,48 ----
Index: i386/netbsd-elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/netbsd-elf.h,v
retrieving revision 1.16
diff -c -3 -p -r1.16 netbsd-elf.h
*** i386/netbsd-elf.h 4 Jun 2003 15:23:40 -0000 1.16
--- i386/netbsd-elf.h 8 Jun 2003 21:10:21 -0000
*************** Boston, MA 02111-1307, USA. */
*** 64,71 ****
#undef ASM_APP_OFF
#define ASM_APP_OFF "#NO_APP\n"
- #undef ASM_FINAL_SPEC
-
#undef ASM_COMMENT_START
#define ASM_COMMENT_START "#"
--- 64,69 ----
Index: m32r/m32r.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m32r/m32r.h,v
retrieving revision 1.83
diff -c -3 -p -r1.83 m32r.h
*** m32r/m32r.h 19 May 2003 00:31:07 -0000 1.83
--- m32r/m32r.h 8 Jun 2003 21:10:44 -0000
*************** Boston, MA 02111-1307, USA. */
*** 176,183 ****
#undef ASM_SPEC
#define ASM_SPEC "%{v} %(asm_cpu) %(relax)"
- #undef ASM_FINAL_SPEC
-
#define LINK_SPEC "%{v} %(link_cpu) %(relax)"
#undef STARTFILE_SPEC
--- 176,181 ----
Index: mn10300/mn10300.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mn10300/mn10300.h,v
retrieving revision 1.69
diff -c -3 -p -r1.69 mn10300.h
*** mn10300/mn10300.h 9 Mar 2003 22:01:15 -0000 1.69
--- mn10300/mn10300.h 8 Jun 2003 21:11:27 -0000
*************** Boston, MA 02111-1307, USA. */
*** 23,29 ****
#undef ASM_SPEC
- #undef ASM_FINAL_SPEC
#undef LIB_SPEC
#undef ENDFILE_SPEC
#undef LINK_SPEC
--- 23,28 ----
Index: stormy16/stormy16.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/stormy16/stormy16.h,v
retrieving revision 1.77
diff -c -3 -p -r1.77 stormy16.h
*** stormy16/stormy16.h 18 May 2003 16:05:33 -0000 1.77
--- stormy16/stormy16.h 8 Jun 2003 21:12:51 -0000
*************** Boston, MA 02111-1307, USA. */
*** 24,43 ****
/* Driver configuration */
/* Defined in svr4.h. */
- /* #define SWITCH_TAKES_ARG(CHAR) */
-
- /* Defined in svr4.h. */
- /* #define WORD_SWITCH_TAKES_ARG(NAME) */
-
- /* Defined in svr4.h. */
#undef ASM_SPEC
#define ASM_SPEC ""
-
- /* Defined in svr4.h. */
- /* #define ASM_FINAL_SPEC "" */
-
- /* Defined in svr4.h. */
- /* #define LINK_SPEC "" */
/* For xstormy16:
- If -msim is specified, everything is built and linked as for the sim.
--- 24,31 ----
Index: v850/v850.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/v850/v850.h,v
retrieving revision 1.85
diff -c -3 -p -r1.85 v850.h
*** v850/v850.h 14 May 2003 07:29:54 -0000 1.85
--- v850/v850.h 8 Jun 2003 21:12:56 -0000
***************
*** 23,30 ****
#ifndef GCC_V850_H
#define GCC_V850_H
! /* These are defiend in svr4.h but we want to override them. */
! #undef ASM_FINAL_SPEC
#undef LIB_SPEC
#undef ENDFILE_SPEC
#undef LINK_SPEC
--- 23,29 ----
#ifndef GCC_V850_H
#define GCC_V850_H
! /* These are defined in svr4.h but we want to override them. */
#undef LIB_SPEC
#undef ENDFILE_SPEC
#undef LINK_SPEC
Index: vax/netbsd-elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/vax/netbsd-elf.h,v
retrieving revision 1.2
diff -c -3 -p -r1.2 netbsd-elf.h
*** vax/netbsd-elf.h 13 Mar 2003 03:23:55 -0000 1.2
--- vax/netbsd-elf.h 8 Jun 2003 21:12:56 -0000
*************** the Free Software Foundation, 675 Mass A
*** 58,61 ****
#undef TARGET_DEFAULT
#define TARGET_DEFAULT 0
- #undef ASM_FINAL_SPEC
--- 58,60 ----
Index: xtensa/elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/xtensa/elf.h,v
retrieving revision 1.9
diff -c -3 -p -r1.9 elf.h
*** xtensa/elf.h 18 May 2003 09:46:21 -0000 1.9
--- xtensa/elf.h 8 Jun 2003 21:12:58 -0000
*************** Software Foundation, 59 Temple Place - S
*** 51,58 ****
%{mlongcalls:--longcalls} \
%{mno-longcalls:--no-longcalls}"
- #undef ASM_FINAL_SPEC
-
#undef LIB_SPEC
#define LIB_SPEC "-lc -lsim -lc -lhandlers-sim -lhal"
--- 51,56 ----
Index: xtensa/linux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/xtensa/linux.h,v
retrieving revision 1.11
diff -c -3 -p -r1.11 linux.h
*** xtensa/linux.h 18 May 2003 09:46:21 -0000 1.11
--- xtensa/linux.h 8 Jun 2003 21:12:59 -0000
*************** Software Foundation, 59 Temple Place - S
*** 48,55 ****
%{mlongcalls:--longcalls} \
%{mno-longcalls:--no-longcalls}"
- #undef ASM_FINAL_SPEC
-
#undef LINK_SPEC
#define LINK_SPEC \
"%{shared:-shared} \
--- 48,53 ----
Roger
--
Roger Sayle, E-mail: roger@eyesopen.com
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833
More information about the Gcc-patches
mailing list