Patchwork svr4.h avoidance: mep

login
register
mail settings
Submitter Joseph S. Myers
Date Dec. 9, 2010, 5:13 p.m.
Message ID <Pine.LNX.4.64.1012091712120.22364@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/74948/
State New
Headers show

Comments

Joseph S. Myers - Dec. 9, 2010, 5:13 p.m.
This patch in the series removing svr4.h from the headers used by
particular targets in GCC stops mep-*-* from using svr4.h.  The macros
used from that header are added to mep.h.

Tested building cc1 and xgcc for cross to mep-elf.  OK to commit?

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

	* config/mep/mep.h (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE,
	WCHAR_TYPE_SIZE): Define.
	* config.gcc (mep-*-*): Don't use svr4.h.
DJ Delorie - Dec. 9, 2010, 6:17 p.m.
> 	* config/mep/mep.h (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE,
> 	WCHAR_TYPE_SIZE): Define.
> 	* config.gcc (mep-*-*): Don't use svr4.h.

Ok.

Patch

diff -rupN --exclude=.svn gcc-mainline-3/gcc/config/mep/mep.h gcc-mainline/gcc/config/mep/mep.h
--- gcc-mainline-3/gcc/config/mep/mep.h	2010-11-22 05:28:24.000000000 -0800
+++ gcc-mainline/gcc/config/mep/mep.h	2010-12-09 08:46:16.000000000 -0800
@@ -202,6 +202,18 @@  crtbegin.o%s"
 #define DOUBLE_TYPE_SIZE      64
 #define LONG_DOUBLE_TYPE_SIZE 64
 #define DEFAULT_SIGNED_CHAR    1
+
+#undef  SIZE_TYPE
+#define SIZE_TYPE "unsigned int"
+
+#undef  PTRDIFF_TYPE
+#define PTRDIFF_TYPE "int"
+
+#undef  WCHAR_TYPE
+#define WCHAR_TYPE "long int"
+
+#undef  WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE BITS_PER_WORD
 
 /* Register numbers:
  	0..15	core registers
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 08:45:52.000000000 -0800
@@ -1762,7 +1762,7 @@  mcore-*-pe*)
 	use_gcc_stdint=wrap
 	;;
 mep-*-*)
-	tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
+	tm_file="dbxelf.h elfos.h ${tm_file}"
 	tmake_file=mep/t-mep
 	extra_parts="crtbegin.o crtend.o"
 	c_target_objs="mep-pragma.o"