diff mbox

svr4.h avoidance: fr30

Message ID Pine.LNX.4.64.1012071646370.16137@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph Myers Dec. 7, 2010, 4:47 p.m. UTC
This patch in the series removing svr4.h from the headers used by
particular targets in GCC stops fr30-*-elf from using svr4.h, defining
the macros used from that header in fr30.h instead.

As with the arc patch
<http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00566.html> a simple
LIB_SPEC than that in svr4.h seemed appropriate.  The LINK_SPEC in
svr4.h also seems aimed at some non-GNU SVR4 linker and overly
complicated for any generic ELF target that will always be using the
GNU linker, and I think the simplified version here is appropriate for
such targets that have been inheriting the svr4.h definition before.

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

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

	* config/fr30/fr30.h (LIB_SPEC, LINK_SPEC, SIZE_TYPE,
	PTRDIFF_TYPE, WCHAR_TYPE, WCHAR_TYPE_SIZE): Define.
	* config.gcc (fr30-*-elf): Don't use svr4.h.

Comments

Nick Clifton Dec. 9, 2010, 3:31 p.m. UTC | #1
Hi Joseph,

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

Approved - please apply.

Cheers
   Nick
diff mbox

Patch

diff -rupN --exclude=.svn gcc-mainline-3/gcc/config/fr30/fr30.h gcc-mainline/gcc/config/fr30/fr30.h
--- gcc-mainline-3/gcc/config/fr30/fr30.h	2010-12-02 09:39:19.000000000 -0800
+++ gcc-mainline/gcc/config/fr30/fr30.h	2010-12-07 07:55:47.000000000 -0800
@@ -51,6 +51,13 @@  along with GCC; see the file COPYING3.  
 #undef  ENDFILE_SPEC
 #define ENDFILE_SPEC  "%{!mno-lsim:-lsim} crtend.o%s crtn.o%s"
 
+#undef  LIB_SPEC
+#define LIB_SPEC "-lc"
+
+#undef  LINK_SPEC
+#define LINK_SPEC "%{h*} %{v:-V} \
+		   %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic}"
+
 /*}}}*/ 
 /*{{{  Storage Layout.  */ 
 
@@ -106,6 +113,18 @@  along with GCC; see the file COPYING3.  
 
 #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-07 07:56:01.000000000 -0800
@@ -961,7 +961,7 @@  crx-*-elf)
 	use_collect2=no
 	;;
 fr30-*-elf)
-	tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file}"
+	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
 	tmake_file=fr30/t-fr30
 	extra_parts="crti.o crtn.o crtbegin.o crtend.o"
 	;;