Patchwork svr4.h avoidance: xstormy16

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

Comments

Joseph S. Myers - Dec. 9, 2010, 11:20 p.m.
This patch in the series removing svr4.h from the headers used by
particular targets in GCC stops xstormy16-*-elf from using that
header, adding the macros used from it to stormy16.h.  As with other
targets, a simplified LINK_SPEC is used.  Unusually, this target used
WCHAR_TYPE from svr4.h but overrode WCHAR_TYPE_SIZE (but this
overriding of WCHAR_TYPE_SIZE was indeed necessary for it to be
correct).

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

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

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

> 2010-12-09  Joseph Myers<joseph@codesourcery.com>
>
> 	* config/stormy16/stormy16.h (LINK_SPEC, WCHAR_TYPE): Define.
> 	* config.gcc (xstormy16-*-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)
@@ -2651,7 +2651,7 @@  vax-*-openbsd*)
 	;;
 xstormy16-*-elf)
 	# For historical reasons, the target files omit the 'x'.
-	tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h stormy16/stormy16.h"
+	tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h"
 	tm_p_file=stormy16/stormy16-protos.h
 	md_file=stormy16/stormy16.md
 	out_file=stormy16/stormy16.c
Index: gcc/config/stormy16/stormy16.h
===================================================================
--- gcc/config/stormy16/stormy16.h	(revision 167658)
+++ gcc/config/stormy16/stormy16.h	(working copy)
@@ -25,6 +25,10 @@ 
 #undef  ASM_SPEC
 #define ASM_SPEC ""
 
+#undef  LINK_SPEC
+#define LINK_SPEC "%{h*} %{v:-V} \
+		   %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic}"
+
 /* For xstormy16:
    - If -msim is specified, everything is built and linked as for the sim.
    - If -T is specified, that linker script is used, and it should provide
@@ -116,6 +120,9 @@ 
 
 #define PTRDIFF_TYPE "int"
 
+#undef  WCHAR_TYPE
+#define WCHAR_TYPE "long int"
+
 #undef  WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE 32