This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
svr4.h avoidance: m68k
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: law at redhat dot com, schwab at linux-m68k dot org
- Date: Wed, 8 Dec 2010 23:06:48 +0000 (UTC)
- Subject: svr4.h avoidance: m68k
This patch in the series removing svr4.h from the headers used by
particular targets in GCC stops m68k-*-uclinux* and m68k-*-linux* from
using svr4.h.
Macros they use from svr4.h are added to m68k/linux.h. What's unusual
in this case is that the #undef of DBX_REGISTER_NUMBER is one of
those; these targets included svr4.h after m68k.h, and m68k.h has its
own DBX_REGISTER_NUMBER definition (there is also an explicit version
of the default DBX_REGISTER_NUMBER definition in m68kelf.h).
Tested building cc1 and xgcc for crosses to m68k-linux-gnu and
m68k-uclinux. OK to commit?
2010-12-08 Joseph Myers <joseph@codesourcery.com>
* m68k/linux.h (DBX_REGISTER_NUMBER): Undefine.
(SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE, WCHAR_TYPE_SIZE): Define.
* config.gcc (m68k-*-uclinux*, m68k-*-linux*): Don't use svr4.h.
diff -rupN --exclude=.svn gcc-mainline-3/gcc/config/m68k/linux.h gcc-mainline/gcc/config/m68k/linux.h
--- gcc-mainline-3/gcc/config/m68k/linux.h 2010-12-02 11:47:53.000000000 -0800
+++ gcc-mainline/gcc/config/m68k/linux.h 2010-12-08 14:46:04.000000000 -0800
@@ -225,4 +225,18 @@ along with GCC; see the file COPYING3.
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+#undef DBX_REGISTER_NUMBER
+
+#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
+
#define MD_UNWIND_SUPPORT "config/m68k/linux-unwind.h"
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 14:46:51.000000000 -0800
@@ -1725,7 +1725,7 @@ m68k-*-uclinux*) # Motorola m68k/ColdFi
# ABI.
default_m68k_cpu=68020
default_cf_cpu=5206
- tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h"
+ tm_file="${tm_file} dbxelf.h elfos.h linux.h glibc-stdint.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h"
tm_defines="${tm_defines} MOTOROLA=1 DEFAULT_LIBC=LIBC_UCLIBC"
extra_options="${extra_options} linux.opt"
tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
@@ -1736,7 +1736,7 @@ m68k-*-linux*) # Motorola m68k's runnin
default_m68k_cpu=68020
default_cf_cpu=5475
with_arch=${with_arch:-m68k}
- tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
+ tm_file="${tm_file} dbxelf.h elfos.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
extra_options="${extra_options} m68k/ieee.opt"
tm_defines="${tm_defines} MOTOROLA=1"
tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
--
Joseph S. Myers
joseph@codesourcery.com