Patchwork svr4.h avoidance: pa

login
register
mail settings
Submitter Joseph S. Myers
Date Dec. 8, 2010, 2:32 p.m.
Message ID <Pine.LNX.4.64.1012081430410.1827@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/74723/
State New
Headers show

Comments

Joseph S. Myers - Dec. 8, 2010, 2:32 p.m.
This patch in the series removing svr4.h from the headers used by
particular targets in GCC stops hppa*64*-*-linux* and hppa*-*-linux*
from using svr4.h.

hppa*64*-*-linux* did not use any of the macros left in svr4.h after
the three per-macro cleanup patches preliminary to this series.
hppa*-*-linux* used only WCHAR_TYPE and WCHAR_TYPE_SIZE (though the
definitions of SIZE_TYPE and PTRDIFF_TYPE from svr4.h were also in
effect for this target, those definitions were identical to those in
pa.h so do not need to be duplicated when removing the use of svr4.h).

Tested building cc1 and xgcc for crosses to hppa-linux-gnu and
hppa64-linux-gnu.  OK to commit?

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

	* config/pa/pa32-linux.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Define.
	* config.gcc (hppa*64*-*-linux*, hppa*-*-linux*): Don't use
	svr4.h.

Patch

diff -rupN --exclude=.svn gcc-mainline-3/gcc/config/pa/pa32-linux.h gcc-mainline/gcc/config/pa/pa32-linux.h
--- gcc-mainline-3/gcc/config/pa/pa32-linux.h	2010-06-04 02:30:31.000000000 -0700
+++ gcc-mainline/gcc/config/pa/pa32-linux.h	2010-12-08 05:54:31.000000000 -0800
@@ -1,5 +1,6 @@ 
 /* Definitions for PA_RISC with ELF-32 format
-   Copyright (C) 2000, 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002, 2004, 2006, 2007, 2010
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -57,4 +58,10 @@  call_ ## FUNC (void)					\
 }
 #endif
 
+#undef  WCHAR_TYPE
+#define WCHAR_TYPE "long int"
+
+#undef  WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE BITS_PER_WORD
+
 #define MD_UNWIND_SUPPORT "config/pa/linux-unwind.h"
diff -rupN --exclude=.svn gcc-mainline-3/gcc/config.gcc gcc-mainline/gcc/config.gcc
--- gcc-mainline-3/gcc/config.gcc	2010-12-06 03:31:49.000000000 -0800
+++ gcc-mainline/gcc/config.gcc	2010-12-08 05:53:30.000000000 -0800
@@ -1006,7 +1006,7 @@  h8300-*-elf*)
 	;;
 hppa*64*-*-linux*)
 	target_cpu_default="MASK_PA_11|MASK_PA_20"
-	tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h svr4.h linux.h \
+	tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h linux.h \
 		 glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \
 		 pa/pa64-linux.h"
 	tmake_file="${tmake_file} pa/t-linux64"
@@ -1015,7 +1015,7 @@  hppa*64*-*-linux*)
 	;;
 hppa*-*-linux*)
 	target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
-	tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h pa/pa-linux.h \
+	tm_file="${tm_file} dbxelf.h elfos.h linux.h glibc-stdint.h pa/pa-linux.h \
 		 pa/pa32-regs.h pa/pa32-linux.h"
 	tmake_file="${tmake_file} pa/t-linux t-slibgcc-libgcc"
 	# Set the libgcc version number