* svr4.h avoidance: fr30
@ 2010-12-07 16:57 Joseph S. Myers
2010-12-09 15:35 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Joseph S. Myers @ 2010-12-07 16:57 UTC (permalink / raw)
To: gcc-patches; +Cc: nickc
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.
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}"
+
/*}}}*/ \f
/*{{{ 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
+
/*}}}*/ \f
/*{{{ 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"
;;
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: svr4.h avoidance: fr30
2010-12-07 16:57 svr4.h avoidance: fr30 Joseph S. Myers
@ 2010-12-09 15:35 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2010-12-09 15:35 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: gcc-patches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-09 15:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-07 16:57 svr4.h avoidance: fr30 Joseph S. Myers
2010-12-09 15:35 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).