From patchwork Tue Dec 7 16:47:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 74581 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 A6E46B6F07 for ; Wed, 8 Dec 2010 03:47:58 +1100 (EST) Received: (qmail 5468 invoked by alias); 7 Dec 2010 16:47:56 -0000 Received: (qmail 5440 invoked by uid 22791); 7 Dec 2010 16:47:54 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, TW_CR, 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, 07 Dec 2010 16:47:49 +0000 Received: (qmail 27125 invoked from network); 7 Dec 2010 16:47:48 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 7 Dec 2010 16:47:48 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1PQ0he-0004MT-TW; Tue, 07 Dec 2010 16:47:46 +0000 Date: Tue, 7 Dec 2010 16:47:46 +0000 (UTC) From: "Joseph S. Myers" To: gcc-patches@gcc.gnu.org cc: nickc@redhat.com Subject: svr4.h avoidance: fr30 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 fr30-*-elf from using svr4.h, defining the macros used from that header in fr30.h instead. As with the arc patch a simple LIB_SPEC than that in svr4.h seemed appropriate. The LINK_SPEC in svr4.h also seems aimed at some non-GNU SVR4 linker and overly complicated for any generic ELF target that will always be using the GNU linker, and I think the simplified version here is appropriate for such targets that have been inheriting the svr4.h definition before. Tested building cc1 and xgcc for a cross to fr30-elf. OK to commit? 2010-12-07 Joseph Myers * config/fr30/fr30.h (LIB_SPEC, LINK_SPEC, SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE, WCHAR_TYPE_SIZE): Define. * config.gcc (fr30-*-elf): Don't use svr4.h. diff -rupN --exclude=.svn gcc-mainline-3/gcc/config/fr30/fr30.h gcc-mainline/gcc/config/fr30/fr30.h --- gcc-mainline-3/gcc/config/fr30/fr30.h 2010-12-02 09:39:19.000000000 -0800 +++ gcc-mainline/gcc/config/fr30/fr30.h 2010-12-07 07:55:47.000000000 -0800 @@ -51,6 +51,13 @@ along with GCC; see the file COPYING3. #undef ENDFILE_SPEC #define ENDFILE_SPEC "%{!mno-lsim:-lsim} crtend.o%s crtn.o%s" +#undef LIB_SPEC +#define LIB_SPEC "-lc" + +#undef LINK_SPEC +#define LINK_SPEC "%{h*} %{v:-V} \ + %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic}" + /*}}}*/ /*{{{ Storage Layout. */ @@ -106,6 +113,18 @@ along with GCC; see the file COPYING3. #define DEFAULT_SIGNED_CHAR 1 +#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 BASICS. */ 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-07 07:56:01.000000000 -0800 @@ -961,7 +961,7 @@ crx-*-elf) use_collect2=no ;; fr30-*-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}" tmake_file=fr30/t-fr30 extra_parts="crti.o crtn.o crtbegin.o crtend.o" ;;