This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

svr4.h avoidance: xstormy16


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.

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
 

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]