Patchwork svr4.h avoidance: iq2000

login
register
mail settings
Submitter Joseph S. Myers
Date Dec. 8, 2010, 4:57 p.m.
Message ID <Pine.LNX.4.64.1012081656440.1827@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/74749/
State New
Headers show

Comments

Joseph S. Myers - Dec. 8, 2010, 4:57 p.m.
This patch in the series removing svr4.h from the headers used by
particular targets in GCC stops iq2000*-*-elf* from using svr4.h.
Relevant macros are added to iq2000.h, with the simplified LINK_SPEC
as in <http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00588.html>.

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

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

	* config/iq2000/iq2000.h (LINK_SPEC, SIZE_TYPE, PTRDIFF_TYPE,
	WCHAR_TYPE, WCHAR_TYPE_SIZE): Define.
	* config.gcc (iq2000*-*-elf*): Don't use svr4.h.
Nick Clifton - Dec. 9, 2010, 3:33 p.m.
Hi Joseph,

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

Approved - please apply.

Cheers
   Nick

Patch

diff -rupN --exclude=.svn gcc-mainline-3/gcc/config/iq2000/iq2000.h gcc-mainline/gcc/config/iq2000/iq2000.h
--- gcc-mainline-3/gcc/config/iq2000/iq2000.h	2010-11-19 05:28:30.000000000 -0800
+++ gcc-mainline/gcc/config/iq2000/iq2000.h	2010-12-08 08:39:27.000000000 -0800
@@ -28,6 +28,10 @@ 
 #undef STARTFILE_SPEC
 #undef ENDFILE_SPEC
 
+#undef  LINK_SPEC
+#define LINK_SPEC "%{h*} %{v:-V} \
+		   %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic}"
+
 
 /* Run-time target specifications.  */
 
@@ -133,6 +137,18 @@ 
 #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 Basics.  */
 
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-08 08:38:17.000000000 -0800
@@ -1596,7 +1596,7 @@  ia64-hp-*vms*)
 	extra_options="${extra_options} vms/vms.opt"
 	;;
 iq2000*-*-elf*)
-        tm_file="svr4.h elfos.h newlib-stdint.h iq2000/iq2000.h"
+        tm_file="elfos.h newlib-stdint.h iq2000/iq2000.h"
         tmake_file=iq2000/t-iq2000
         out_file=iq2000/iq2000.c
         md_file=iq2000/iq2000.md