From patchwork Tue Dec 14 00:11:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 75440 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 AE234B6ED0 for ; Tue, 14 Dec 2010 11:11:16 +1100 (EST) Received: (qmail 511 invoked by alias); 14 Dec 2010 00:11:13 -0000 Received: (qmail 496 invoked by uid 22791); 14 Dec 2010 00:11:11 -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; Tue, 14 Dec 2010 00:11:05 +0000 Received: (qmail 7019 invoked from network); 14 Dec 2010 00:11:03 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Dec 2010 00:11:03 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1PSITu-0007h7-KU; Tue, 14 Dec 2010 00:11:02 +0000 Date: Tue, 14 Dec 2010 00:11:02 +0000 (UTC) From: "Joseph S. Myers" To: gcc-patches@gcc.gnu.org cc: dj@redhat.com Subject: svr4.h avoidance: m32c 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 m32c-*-elf* and m32c-*-rtems* (that is, all m32c-* targets) from using svr4.h. The macros used from svr4.h are added to m32c.h. For LINK_SPEC I used the same simplified definition I used for other targets (see ), and for ENDFILE_SPEC I also simplified the svr4.h definition, removing -pg support since none of the other m32c specs have such support. (For RTEMS, ENDFILE_SPEC in turn ends up getting overridden to empty by config/rtems.h.) Tested building cc1 and xgcc for crosses to m32c-elf and m32c-rtems. OK to commit? 2010-12-13 Joseph Myers * config/m32c/m32c.h (ENDFILE_SPEC, LINK_SPEC, SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE, WCHAR_TYPE_SIZE): Define. * config.gcc (m32c-*-rtems*, m32c-*-elf*): Don't use svr4.h. Index: gcc/config.gcc =================================================================== --- gcc/config.gcc (revision 167746) +++ gcc/config.gcc (working copy) @@ -2675,13 +2675,13 @@ am33_2.0-*-linux*) use_collect2=no ;; m32c-*-rtems*) - tm_file="dbxelf.h elfos.h svr4.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h" + tm_file="dbxelf.h elfos.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h" tmake_file="${tmake_file} t-rtems" c_target_objs="m32c-pragma.o" cxx_target_objs="m32c-pragma.o" ;; m32c-*-elf*) - tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file}" + tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}" c_target_objs="m32c-pragma.o" cxx_target_objs="m32c-pragma.o" ;; Index: gcc/config/m32c/m32c.h =================================================================== --- gcc/config/m32c/m32c.h (revision 167746) +++ gcc/config/m32c/m32c.h (working copy) @@ -27,6 +27,13 @@ #undef STARTFILE_SPEC #define STARTFILE_SPEC "crt0.o%s crtbegin.o%s" +#undef ENDFILE_SPEC +#define ENDFILE_SPEC "crtend.o%s crtn.o%s" + +#undef LINK_SPEC +#define LINK_SPEC "%{h*} %{v:-V} \ + %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic}" + /* There are four CPU series we support, but they basically break down into two families - the R8C/M16C families, with 16-bit address registers and one set of opcodes, and the M32CM/M32C group, with @@ -190,6 +197,18 @@ machine_function; #undef UINTPTR_TYPE #define UINTPTR_TYPE (TARGET_A16 ? "unsigned int" : "long unsigned int") +#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 + /* REGISTER USAGE */ /* Register Basics */