This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Cleanup PPC target headers include scheme
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] Cleanup PPC target headers include scheme
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Tue, 9 Jan 2001 02:30:29 +0100
Hi,
another longstanding item to delete from my TODO list, this patch converts
the PPC backend to use the tm.h based "new-style" include scheme. It's mostly
a boring search-and-replace patch. I didn't convert the (unmaintained?) Mach
and Lynx headers, they seem to be completely out-of-date.
The patch passed a bootstrap on powerpc-linux-gnu and the generated tm.h was
generated as expected.
OK to commit?
Franz.
* config.gcc (powerpc-*-beos*): Include ${tm_file} and rs6000/aix.h.
(rs6000-ibm-aix3.[01]*): Likewise.
(rs6000-ibm-aix3.2.[456789]*, powerpc-ibm-aix3.2.[456789]*): Likewise.
(rs6000-ibm-aix4.[12]*, powerpc-ibm-aix4.[12]*): Likewise.
(rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*): Likewise.
(rs6000-ibm-aix[56789].*,powerpc-ibm-aix[56789].*): Likewise.
(powerpc-*-sysv*): Include {tm_file}. svr4.h and rs6000/sysv4.h.
(powerpc-*-eabiaix*): Likewise.
(powerpc-*-eabisim*): Likewise.
(powerpc-*-elf*): Likewise.
(powerpc-*-eabi*): Likewise.
(powerpc-*-rtems*): Likewise.
(powerpc-*-linux*libc1): Likewise.
(powerpc-*-linux*): Likewise.
(powerpc-wrs-vxworks*): Likewise.
(powerpcle-wrs-vxworks*): Likewise.
(powerpcle-*-sysv*): Likewise.
(powerpcle-*-elf*): Likewise.
(powerpcle-*-eabisim*): Likewise.
(powerpcle-*-eabi*): Likewise.
(powerpcle-*-solaris2*): Likewise.
* config/rs6000/aix31.h: Delete includes.
* config/rs6000/aix3newas.h: Likewise.
* config/rs6000/aix41.h: Likewise.
* config/rs6000/aix43.h: Likewise.
* config/rs6000/beos.h: Likewise.
* config/rs6000/rtems.h: Likewise.
* config/rs6000/sysv4.h: Likewise.
Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.17
diff -u -p -r1.17 config.gcc
--- gcc/config.gcc 2001/01/02 02:53:47 1.17
+++ gcc/config.gcc 2001/01/09 00:49:55
@@ -2722,7 +2722,7 @@ powerpc-*-openbsd*)
;;
powerpc-*-beos*)
cpu_type=rs6000
- tm_file=rs6000/beos.h
+ tm_file="${tm_file} rs6000/aix.h rs6000/beos.h"
xm_file=rs6000/xm-beos.h
tmake_file=rs6000/t-beos
xmake_file=rs6000/x-beos
@@ -2732,7 +2732,7 @@ powerpc-*-darwin*)
xmake_file=rs6000/x-darwin
;;
powerpc-*-sysv*)
- tm_file=rs6000/sysv4.h
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h"
xm_file="rs6000/xm-sysv4.h"
xm_defines="USG POSIX"
extra_headers=ppc-asm.h
@@ -2740,27 +2740,27 @@ powerpc-*-sysv*)
xmake_file=rs6000/x-sysv4
;;
powerpc-*-eabiaix*)
- tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h"
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h"
tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
extra_headers=ppc-asm.h
;;
powerpc-*-eabisim*)
- tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
extra_headers=ppc-asm.h
;;
powerpc-*-elf*)
- tm_file="rs6000/sysv4.h"
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h"
tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
extra_headers=ppc-asm.h
;;
powerpc-*-eabi*)
- tm_file="rs6000/sysv4.h rs6000/eabi.h"
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/eabi.h"
tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
extra_headers=ppc-asm.h
;;
powerpc-*-rtems*)
- tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h"
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/eabi.h rtems.h rs6000/rtems.h"
tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
extra_headers=ppc-asm.h
if test x$enable_threads = xyes; then
@@ -2768,7 +2768,7 @@ powerpc-*-rtems*)
fi
;;
powerpc-*-linux*libc1)
- tm_file="rs6000/sysv4.h rs6000/linux.h"
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/linux.h"
xm_file=rs6000/xm-sysv4.h
out_file=rs6000/rs6000.c
tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
@@ -2779,7 +2779,7 @@ powerpc-*-linux*libc1)
fi
;;
powerpc-*-linux*)
- tm_file="rs6000/sysv4.h rs6000/linux.h"
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/linux.h"
xm_file="rs6000/xm-sysv4.h"
xm_defines="USG ${xm_defines}"
out_file=rs6000/rs6000.c
@@ -2794,7 +2794,7 @@ powerpc-wrs-vxworks*)
cpu_type=rs6000
xm_file="rs6000/xm-sysv4.h"
xm_defines="USG POSIX"
- tm_file="rs6000/sysv4.h rs6000/vxppc.h"
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/vxppc.h"
tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
extra_headers=ppc-asm.h
thread_file='vxworks'
@@ -2803,13 +2803,13 @@ powerpcle-wrs-vxworks*)
cpu_type=rs6000
xm_file="rs6000/xm-sysv4.h"
xm_defines="USG POSIX"
- tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/vxppc.h"
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/vxppc.h"
tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
extra_headers=ppc-asm.h
thread_file='vxworks'
;;
powerpcle-*-sysv*)
- tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/sysv4le.h"
xm_file="rs6000/xm-sysv4.h"
xm_defines="USG POSIX"
tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
@@ -2817,22 +2817,22 @@ powerpcle-*-sysv*)
extra_headers=ppc-asm.h
;;
powerpcle-*-elf*)
- tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/sysv4le.h"
tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
extra_headers=ppc-asm.h
;;
powerpcle-*-eabisim*)
- tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
extra_headers=ppc-asm.h
;;
powerpcle-*-eabi*)
- tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
extra_headers=ppc-asm.h
;;
powerpcle-*-solaris2*)
- tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/sol2.h"
+ tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/sol2.h"
xm_file="rs6000/xm-sysv4.h"
xm_defines="USG POSIX"
tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
@@ -2840,13 +2840,13 @@ powerpcle-*-solaris2*)
extra_headers=ppc-asm.h
;;
rs6000-ibm-aix3.[01]*)
- tm_file=rs6000/aix31.h
+ tm_file="${tm_file} rs6000/aix.h rs6000/aix31.h"
xmake_file=rs6000/x-aix31
float_format=none
use_collect2=yes
;;
rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
- tm_file=rs6000/aix3newas.h
+ tm_file="${tm_file} rs6000/aix.h rs6000/aix3newas.h"
if test x$host != x$target
then
tmake_file=rs6000/t-xnewas
@@ -2857,7 +2857,7 @@ rs6000-ibm-aix3.2.[456789]* | powerpc-ib
use_collect2=yes
;;
rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
- tm_file=rs6000/aix41.h
+ tm_file="${tm_file} rs6000/aix.h rs6000/aix41.h"
if test x$host != x$target
then
tmake_file=rs6000/t-xnewas
@@ -2875,7 +2875,7 @@ rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4
use_collect2=yes
;;
rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
- tm_file=rs6000/aix43.h
+ tm_file="${tm_file} rs6000/aix.h rs6000/aix43.h"
tmake_file=rs6000/t-aix43
xmake_file=rs6000/x-aix41
float_format=none
@@ -2883,7 +2883,7 @@ rs6000-ibm-aix4.[3456789]* | powerpc-ibm
thread_file='aix'
;;
rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
- tm_file=rs6000/aix43.h
+ tm_file="${tm_file} rs6000/aix.h rs6000/aix43.h"
tmake_file=rs6000/t-aix43
xmake_file=rs6000/x-aix41
float_format=none
Index: gcc/config/rs6000/aix31.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/aix31.h,v
retrieving revision 1.4
diff -u -p -r1.4 aix31.h
--- gcc/config/rs6000/aix31.h 2000/11/02 23:29:12 1.4
+++ gcc/config/rs6000/aix31.h 2001/01/09 00:50:08
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 running AIX version 3.1.
- Copyright (C) 1993,1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1993,1997, 2000, 2001 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@nyu.edu)
This file is part of GNU CC.
@@ -20,9 +20,6 @@ along with GNU CC; see the file COPYING.
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-
-#include "rs6000/rs6000.h"
-#include "rs6000/aix.h"
/* Output something to declare an external symbol to the assembler. Most
assemblers don't need this.
Index: gcc/config/rs6000/aix3newas.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/aix3newas.h,v
retrieving revision 1.3
diff -u -p -r1.3 aix3newas.h
--- gcc/config/rs6000/aix3newas.h 2000/03/16 03:16:40 1.3
+++ gcc/config/rs6000/aix3newas.h 2001/01/09 00:50:09
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 POWER running AIX version 3.x with the fixed assembler.
- Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 2000, 2001 Free Software Foundation, Inc.
Contributed by Jason Merrill (jason@cygnus.com).
This file is part of GNU CC.
@@ -20,9 +20,6 @@ along with GNU CC; see the file COPYING.
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-
-#include "rs6000/rs6000.h"
-#include "rs6000/aix.h"
/* Tell the assembler to assume that all undefined names are external. */
Index: gcc/config/rs6000/aix41.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/aix41.h,v
retrieving revision 1.14
diff -u -p -r1.14 aix41.h
--- gcc/config/rs6000/aix41.h 2000/12/07 01:58:24 1.14
+++ gcc/config/rs6000/aix41.h 2001/01/09 00:50:09
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 POWER running AIX version 4.1.
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Contributed by David Edelsohn (edelsohn@gnu.org).
@@ -21,9 +21,6 @@ along with GNU CC; see the file COPYING.
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-
-#include "rs6000/rs6000.h"
-#include "rs6000/aix.h"
#undef SUBSUBTARGET_SWITCHES
#define SUBSUBTARGET_SWITCHES \
Index: gcc/config/rs6000/aix43.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/aix43.h,v
retrieving revision 1.16
diff -u -p -r1.16 aix43.h
--- gcc/config/rs6000/aix43.h 2000/11/02 23:29:12 1.16
+++ gcc/config/rs6000/aix43.h 2001/01/09 00:50:09
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 POWER running AIX version 4.3.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by David Edelsohn (edelsohn@gnu.org).
This file is part of GNU CC.
@@ -20,9 +20,6 @@ along with GNU CC; see the file COPYING.
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-
-#include "rs6000/rs6000.h"
-#include "rs6000/aix.h"
/* AIX 4.3 and above support 64-bit executables. */
#undef SUBSUBTARGET_SWITCHES
Index: gcc/config/rs6000/beos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/beos.h,v
retrieving revision 1.5
diff -u -p -r1.5 beos.h
--- gcc/config/rs6000/beos.h 2000/11/02 23:29:12 1.5
+++ gcc/config/rs6000/beos.h 2001/01/09 00:50:09
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for BeOS.
- Copyright (C) 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc.
Contributed by Fred Fish (fnf@cygnus.com), based on aix41.h
from David Edelsohn (edelsohn@npac.syr.edu).
@@ -20,9 +20,6 @@ along with GNU CC; see the file COPYING.
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-
-#include "rs6000/rs6000.h"
-#include "rs6000/aix.h"
/* Enable AIX XL compiler calling convention breakage compatibility. */
#define MASK_XL_CALL 0x40000000
Index: gcc/config/rs6000/rtems.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rtems.h,v
retrieving revision 1.11
diff -u -p -r1.11 rtems.h
--- gcc/config/rs6000/rtems.h 2000/11/02 23:29:12 1.11
+++ gcc/config/rs6000/rtems.h 2001/01/09 00:50:09
@@ -1,5 +1,5 @@
/* Definitions for rtems targeting a PowerPC using elf.
- Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
Contributed by Joel Sherrill (joel@OARcorp.com).
This file is part of GNU CC.
@@ -32,6 +32,3 @@ Boston, MA 02111-1307, USA. */
#undef STARTFILE_DEFAULT_SPEC
#define STARTFILE_DEFAULT_SPEC "crt0.o%s"
-
-/* Get machine-independent configuration parameters for RTEMS. */
-#include <rtems.h>
Index: gcc/config/rs6000/sysv4.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/sysv4.h,v
retrieving revision 1.40
diff -u -p -r1.40 sysv4.h
--- gcc/config/rs6000/sysv4.h 2001/01/07 09:17:23 1.40
+++ gcc/config/rs6000/sysv4.h 2001/01/09 00:50:11
@@ -1,5 +1,6 @@
/* Target definitions for GNU compiler for PowerPC running System V.4
- Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GNU CC.
@@ -19,11 +20,6 @@ along with GNU CC; see the file COPYING.
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "rs6000/rs6000.h"
-
-/* Use the regular svr4 definitions. */
-
-#include "svr4.h"
/* Yes! We are ELF. */
#define TARGET_OBJECT_FORMAT OBJECT_ELF