Patchwork svr4.h avoidance: rx

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

Comments

Joseph S. Myers - Dec. 9, 2010, 6:45 p.m.
This patch in the series removing svr4.h from the headers used by
particular targets in GCC stops rx-*-elf* from using that header,
adding the two macros used from it to rx.h.

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

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

	* config/rx/rx.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Define.
	* config.gcc (rx-*-elf*): Don't use svr4.h.
Nick Clifton - Dec. 15, 2010, 11:05 a.m.
Hi Joseph,

> 2010-12-09  Joseph Myers<joseph@codesourcery.com>
>
> 	* config/rx/rx.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Define.
> 	* config.gcc (rx-*-elf*): Don't use svr4.h.

Approved - please apply.

Cheers
   Nick

Patch

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 167658)
+++ gcc/config.gcc	(working copy)
@@ -2230,7 +2230,7 @@  rs6000-ibm-aix[6789].* | powerpc-ibm-aix
 	extra_headers=altivec.h
 	;;
 rx-*-elf*)
-	tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file} ../../libgcc/config/rx/rx-abi.h"
+	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} ../../libgcc/config/rx/rx-abi.h"
 	tmake_file="${tmake_file} rx/t-rx"
 	;;
 s390-*-linux*)
Index: gcc/config/rx/rx.h
===================================================================
--- gcc/config/rx/rx.h	(revision 167658)
+++ gcc/config/rx/rx.h	(working copy)
@@ -137,6 +137,10 @@  extern enum rx_cpu_types  rx_cpu_type;
 #define SIZE_TYPE			"long unsigned int"
 #undef  PTRDIFF_TYPE
 #define PTRDIFF_TYPE			"long int"
+#undef  WCHAR_TYPE
+#define WCHAR_TYPE			"long int"
+#undef  WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE			BITS_PER_WORD
 #define POINTERS_EXTEND_UNSIGNED	1
 #define FUNCTION_MODE 			QImode
 #define CASE_VECTOR_MODE		Pmode