| Submitter | Joseph S. Myers |
|---|---|
| Date | Dec. 9, 2010, 6:14 p.m. |
| Message ID | <Pine.LNX.4.64.1012091813310.22364@digraph.polyomino.org.uk> |
| Download | mbox | patch |
| Permalink | /patch/74953/ |
| State | New |
| Headers | show |
Comments
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
Patch
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 /* 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