Patchwork svr4.h avoidance: cris

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

Comments

Joseph S. Myers - Dec. 7, 2010, 2:44 p.m.
This patch in the series removing svr4.h from the headers used by
particular targets in GCC stops cris*-*-linux* from using svr4.h,
defining the two macros used from that header in cris/linux.h instead.

Tested building cc1 and xgcc for a cross to cris-linux-gnu.  OK to
commit?

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

	* config/cris/linux.h (SIZE_TYPE, PTRDIFF_TYPE): Define.
	* config.gcc (crisv32-*-linux* | cris-*-linux*): Don't use svr4.h.

Patch

diff -rupN --exclude=.svn gcc-mainline-3/gcc/config/cris/linux.h gcc-mainline/gcc/config/cris/linux.h
--- gcc-mainline-3/gcc/config/cris/linux.h	2010-12-02 09:39:19.000000000 -0800
+++ gcc-mainline/gcc/config/cris/linux.h	2010-12-07 06:36:17.000000000 -0800
@@ -132,7 +132,14 @@  along with GCC; see the file COPYING3.  
 	builtin_define ("__NO_UNDERSCORES__");	\
     }						\
   while (0)
+
+/* Node: Type Layout */
      
+#undef SIZE_TYPE
+#define SIZE_TYPE "unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "int"
 
 /* Node: Sections */
 
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-07 06:33:08.000000000 -0800
@@ -942,7 +942,7 @@  cris-*-elf | cris-*-none)
 	use_gcc_stdint=wrap
 	;;
 crisv32-*-linux* | cris-*-linux*)
-	tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h glibc-stdint.h cris/linux.h"
+	tm_file="dbxelf.h elfos.h ${tm_file} linux.h glibc-stdint.h cris/linux.h"
 	# We need to avoid using t-linux, so override default tmake_file
 	tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
 	extra_options="${extra_options} cris/linux.opt"