From patchwork Wed Dec 8 23:06:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 74791 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id E0A7BB70A7 for ; Thu, 9 Dec 2010 10:06:58 +1100 (EST) Received: (qmail 15962 invoked by alias); 8 Dec 2010 23:06:56 -0000 Received: (qmail 15954 invoked by uid 22791); 8 Dec 2010 23:06:55 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, TW_XG, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Dec 2010 23:06:51 +0000 Received: (qmail 12670 invoked from network); 8 Dec 2010 23:06:49 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Dec 2010 23:06:49 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1PQT60-0003Tl-BS; Wed, 08 Dec 2010 23:06:48 +0000 Date: Wed, 8 Dec 2010 23:06:48 +0000 (UTC) From: "Joseph S. Myers" To: gcc-patches@gcc.gnu.org cc: law@redhat.com, schwab@linux-m68k.org Subject: svr4.h avoidance: m68k Message-ID: MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 * 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"