public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* svr4.h avoidance: mn10300
@ 2010-12-09 18:30 Joseph S. Myers
  2010-12-10 16:09 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph S. Myers @ 2010-12-09 18:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: law, aoliva

This patch in the series removing svr4.h from the headers used by
particular targets in GCC stops mn10300-*-* from using that header.

The macros used from that header are added to mn10300.h.  Because
am33_2.0-*-linux* does not use svr4.h and so got the default
definitions of these macros, they are then undefined in
mn10300/linux.h to preserve this.

Tested building cc1 and xgcc for crosses to mn10300-elf and
am33_2.0-linux-gnu.  (The latter build fails with "targhooks.c:342:
undefined reference to `print_operand_address'", a pre-existing
problem probably caused by r165778.)  OK to commit?

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

	* config/mn10300/linux.h (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE,
	WCHAR_TYPE_SIZE): Undefine.
	* config/mn10300/mn10300.h (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE,
	WCHAR_TYPE_SIZE): Define.
	* config.gcc (mn10300-*-*): Don't use svr4.h.

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 167658)
+++ gcc/config.gcc	(working copy)
@@ -1974,7 +1974,7 @@ mmix-knuth-mmixware)
 	use_gcc_stdint=wrap
 	;;
 mn10300-*-*)
-	tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file}"
+	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
 	if test x$stabs = xyes
 	then
 		tm_file="${tm_file} dbx.h"
Index: gcc/config/mn10300/mn10300.h
===================================================================
--- gcc/config/mn10300/mn10300.h	(revision 167658)
+++ gcc/config/mn10300/mn10300.h	(working copy)
@@ -121,6 +121,18 @@ extern enum processor_type mn10300_tune_
 
 /* Define this as 1 if `char' should by default be signed; else as 0.  */
 #define DEFAULT_SIGNED_CHAR 0
+
+#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
 /* Standard register usage.  */
 
Index: gcc/config/mn10300/linux.h
===================================================================
--- gcc/config/mn10300/linux.h	(revision 167658)
+++ gcc/config/mn10300/linux.h	(working copy)
@@ -84,3 +84,7 @@ extern int mn10300_protect_label;
     }						\
   while (0)           
 
+#undef SIZE_TYPE
+#undef PTRDIFF_TYPE
+#undef WCHAR_TYPE
+#undef WCHAR_TYPE_SIZE

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: svr4.h avoidance: mn10300
  2010-12-09 18:30 svr4.h avoidance: mn10300 Joseph S. Myers
@ 2010-12-10 16:09 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2010-12-10 16:09 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches, aoliva

On 12/09/10 11:14, Joseph S. Myers wrote:
> This patch in the series removing svr4.h from the headers used by
> particular targets in GCC stops mn10300-*-* from using that header.
>
> The macros used from that header are added to mn10300.h.  Because
> am33_2.0-*-linux* does not use svr4.h and so got the default
> definitions of these macros, they are then undefined in
> mn10300/linux.h to preserve this.
>
> Tested building cc1 and xgcc for crosses to mn10300-elf and
> am33_2.0-linux-gnu.  (The latter build fails with "targhooks.c:342:
> undefined reference to `print_operand_address'", a pre-existing
> problem probably caused by r165778.)  OK to commit?
>
> 2010-12-09  Joseph Myers<joseph@codesourcery.com>
>
> 	* config/mn10300/linux.h (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE,
> 	WCHAR_TYPE_SIZE): Undefine.
> 	* config/mn10300/mn10300.h (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE,
> 	WCHAR_TYPE_SIZE): Define.
> 	* config.gcc (mn10300-*-*): Don't use svr4.h.
OK.
jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-10 15:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-09 18:30 svr4.h avoidance: mn10300 Joseph S. Myers
2010-12-10 16:09 ` Jeff Law

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).