diff mbox

svr4.h avoidance: sparc

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

Commit Message

Joseph Myers Dec. 14, 2010, 7:44 p.m. UTC
This patch in the series removing svr4.h from the headers used by
particular targets in GCC stops sparc*-* targets from using svr4.h.

There are eleven config.gcc stanzas involved here, every SPARC stanza
apart from sparc64-*-freebsd*|ultrasparc-*-freebsd*.  All SPARC
stanzas use sparc/sysv4.h, after svr4.h for all those using svr4.h.
That overrides three of the macros from svr4.h (ASM_SPEC, SIZE_TYPE,
PTRDIFF_TYPE).  The remaining macros from svr4.h all end up overridden
by one header or another for all eleven stanzas, so all this patch
needs to do is change config.gcc without any changes needed to the
configuration headers themselves.

Tested building cc1 and xgcc for crosses to: sparc-elf sparc-rtems
sparc-linux-gnu sparc-netbsdelf sparc-sun-solaris2.10
sparc-wrs-vxworks sparc64-elf sparc64-rtems sparc64-linux-gnu
sparc64-netbsdelf sparc64-openbsd.  OK to commit?

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

	* config.gcc (sparc-*-elf*, sparc-*-rtems*, sparc-*-linux*,
	sparc-*-netbsdelf*, sparc*-*-solaris2*, sparc-wrs-vxworks,
	sparc64-*-elf*, sparc64-*-rtems*, sparc64-*-linux*,
	sparc64-*-netbsd*, sparc64-*-openbsd*): Don't use svr4.h.

Comments

David Miller Dec. 14, 2010, 8:02 p.m. UTC | #1
From: "Joseph S. Myers" <joseph@codesourcery.com>
Date: Tue, 14 Dec 2010 19:44:58 +0000 (UTC)

> This patch in the series removing svr4.h from the headers used by
> particular targets in GCC stops sparc*-* targets from using svr4.h.
> 
> There are eleven config.gcc stanzas involved here, every SPARC stanza
> apart from sparc64-*-freebsd*|ultrasparc-*-freebsd*.  All SPARC
> stanzas use sparc/sysv4.h, after svr4.h for all those using svr4.h.
> That overrides three of the macros from svr4.h (ASM_SPEC, SIZE_TYPE,
> PTRDIFF_TYPE).  The remaining macros from svr4.h all end up overridden
> by one header or another for all eleven stanzas, so all this patch
> needs to do is change config.gcc without any changes needed to the
> configuration headers themselves.
> 
> Tested building cc1 and xgcc for crosses to: sparc-elf sparc-rtems
> sparc-linux-gnu sparc-netbsdelf sparc-sun-solaris2.10
> sparc-wrs-vxworks sparc64-elf sparc64-rtems sparc64-linux-gnu
> sparc64-netbsdelf sparc64-openbsd.  OK to commit?

This looks good to me.
diff mbox

Patch

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 167746)
+++ gcc/config.gcc	(working copy)
@@ -2455,17 +2455,17 @@  sh-wrs-vxworks)
 	tm_file="${tm_file} elfos.h svr4.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
 	;;
 sparc-*-elf*)
-	tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h svr4.h sparc/sysv4.h sparc/sp-elf.h"
+	tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h"
 	tmake_file="sparc/t-elf sparc/t-crtfm"
 	extra_parts="crti.o crtn.o crtbegin.o crtend.o"
 	;;
 sparc-*-rtems*)
-	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
+	tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
 	tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
 	extra_parts="crti.o crtn.o crtbegin.o crtend.o"
 	;;
 sparc-*-linux*)
-	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h glibc-stdint.h"
+	tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h linux.h glibc-stdint.h"
 	extra_options="${extra_options} sparc/long-double-switch.opt"
 	tmake_file="${tmake_file} sparc/t-linux"
 	if test x$enable_targets = xall; then
@@ -2477,11 +2477,11 @@  sparc-*-linux*)
 	tmake_file="${tmake_file} sparc/t-crtfm"
 	;;
 sparc-*-netbsdelf*)
-	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
+	tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
 	extra_options="${extra_options} sparc/long-double-switch.opt"
 	;;
 sparc*-*-solaris2*)
-	tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h"
+	tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sol2.h"
 	case ${target} in
 	    *-*-solaris2.1[0-9]*)
 		tm_file="${tm_file} sol2-10.h"
@@ -2532,23 +2532,23 @@  sparc*-*-solaris2*)
 	esac
 	;;
 sparc-wrs-vxworks)
-	tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
+	tm_file="${tm_file} elfos.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
 	tmake_file="${tmake_file} sparc/t-vxworks"
 	;;
 sparc64-*-elf*)
-	tm_file="${tm_file} dbxelf.h elfos.h svr4.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
+	tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
 	extra_options="${extra_options} sparc/little-endian.opt"
 	tmake_file="${tmake_file} sparc/t-crtfm"
 	extra_parts="crtbegin.o crtend.o"
 	;;
 sparc64-*-rtems*)
-	tm_file="${tm_file} dbxelf.h elfos.h svr4.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
+	tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
 	extra_options="${extra_options} sparc/little-endian.opt"
 	tmake_file="${tmake_file} sparc/t-crtfm t-rtems"
 	extra_parts="crtbegin.o crtend.o"
 	;;
 sparc64-*-linux*)
-	tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h glibc-stdint.h sparc/linux64.h"
+	tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h linux.h glibc-stdint.h sparc/linux64.h"
 	extra_options="${extra_options} sparc/long-double-switch.opt"
 	tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm"
 	;;
@@ -2564,12 +2564,12 @@  sparc64-*-freebsd*|ultrasparc-*-freebsd*
 	;;
 sparc64-*-netbsd*)
 	tm_file="sparc/biarch64.h ${tm_file}"
-	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
+	tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
 	extra_options="${extra_options} sparc/long-double-switch.opt"
 	tmake_file="${tmake_file} sparc/t-netbsd64"
 	;;
 sparc64-*-openbsd*)
-	tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp64-elf.h"
+	tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
 	tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
 	extra_options="${extra_options} sparc/little-endian.opt"
 	gas=yes gnu_ld=yes