svr4.h avoidance: mips

Submitted by Joseph S. Myers on Dec. 9, 2010, 5:37 p.m.

Details

Message ID Pine.LNX.4.64.1012091736500.22364@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph S. Myers Dec. 9, 2010, 5:37 p.m.
This patch in the series removing svr4.h from the headers used by
particular targets in GCC stops MIPS targets from using that header.

The only macro in svr4.h that ends up affecting the configuration of
any MIPS target is the undefine of DBX_REGISTER_NUMBER, which affects
mips-wrs-vxworks because that target includes svr4.h after mips.h.
This patch preserves those semantics, though I don't know if it's
deliberate or if anything is relying on that undefine for that target.

Tested building cc1 and xgcc for crosses to mips-linux-gnu,
mips64-linux-gnu and mips-wrs-vxworks.  OK to commit?

2010-12-09  Joseph Myers  <joseph@codesourcery.com>

	* config/mips/vxworks.h (DBX_REGISTER_NUMBER): Undefine.
	* config.gcc (mips64*-*-linux* | mipsisa64*-*-linux*,
	mips*-*-linux*, mips-wrs-vxworks): Don't use svr4.h.

Patch hide | download patch | download mbox

diff -rupN --exclude=.svn gcc-mainline-3/gcc/config/mips/vxworks.h gcc-mainline/gcc/config/mips/vxworks.h
--- gcc-mainline-3/gcc/config/mips/vxworks.h	2010-12-09 05:50:24.000000000 -0800
+++ gcc-mainline/gcc/config/mips/vxworks.h	2010-12-09 09:15:46.000000000 -0800
@@ -80,3 +80,5 @@  VXWORKS_LINK_SPEC
 
 #undef SUBTARGET_OVERRIDE_OPTIONS
 #define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS
+
+#undef DBX_REGISTER_NUMBER
diff -rupN --exclude=.svn gcc-mainline-3/gcc/config.gcc gcc-mainline/gcc/config.gcc
--- gcc-mainline-3/gcc/config.gcc	2010-12-09 05:50:25.000000000 -0800
+++ gcc-mainline/gcc/config.gcc	2010-12-09 09:15:26.000000000 -0800
@@ -1811,7 +1811,7 @@  mips*-*-netbsd*)			# NetBSD/mips, either
 	tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
 	;;
 mips64*-*-linux* | mipsisa64*-*-linux*)
-	tm_file="dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h ${tm_file} mips/linux.h mips/linux64.h"
+	tm_file="dbxelf.h elfos.h linux.h glibc-stdint.h ${tm_file} mips/linux.h mips/linux64.h"
 	tmake_file="${tmake_file} mips/t-linux64 mips/t-libgcc-mips16"
 	tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
 	case ${target} in
@@ -1833,7 +1833,7 @@  mips64*-*-linux* | mipsisa64*-*-linux*)
 	test x$with_llsc != x || with_llsc=yes
 	;;
 mips*-*-linux*)				# Linux MIPS, either endian.
-        tm_file="dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h ${tm_file} mips/linux.h"
+        tm_file="dbxelf.h elfos.h linux.h glibc-stdint.h ${tm_file} mips/linux.h"
 	tmake_file="${tmake_file} mips/t-libgcc-mips16"
 	case ${target} in
         mipsisa32r2*)
@@ -1961,7 +1961,7 @@  mips*-*-rtems*)
 	tmake_file="mips/t-elf mips/t-libgcc-mips16 t-rtems mips/t-rtems"
 	;;
 mips-wrs-vxworks)
-	tm_file="elfos.h ${tm_file} svr4.h mips/elf.h vx-common.h vxworks.h mips/vxworks.h"
+	tm_file="elfos.h ${tm_file} mips/elf.h vx-common.h vxworks.h mips/vxworks.h"
 	tmake_file="${tmake_file} mips/t-vxworks"
 	;;
 mipstx39-*-elf* | mipstx39el-*-elf*)