From patchwork Thu Dec 9 18:14:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 74953 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 914E4B7043 for ; Fri, 10 Dec 2010 05:14:45 +1100 (EST) Received: (qmail 2014 invoked by alias); 9 Dec 2010 18:14:43 -0000 Received: (qmail 2002 invoked by uid 22791); 9 Dec 2010 18:14:42 -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; Thu, 09 Dec 2010 18:14:37 +0000 Received: (qmail 20220 invoked from network); 9 Dec 2010 18:14:35 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 9 Dec 2010 18:14:35 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1PQl0k-0007qa-7z; Thu, 09 Dec 2010 18:14:34 +0000 Date: Thu, 9 Dec 2010 18:14:34 +0000 (UTC) From: "Joseph S. Myers" To: gcc-patches@gcc.gnu.org cc: law@redhat.com, aoliva@redhat.com Subject: svr4.h avoidance: mn10300 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 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 * 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 /* 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