From patchwork Thu Dec 9 23:20: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: 75010 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 DC57FB7080 for ; Fri, 10 Dec 2010 10:20:15 +1100 (EST) Received: (qmail 16620 invoked by alias); 9 Dec 2010 23:20:13 -0000 Received: (qmail 16445 invoked by uid 22791); 9 Dec 2010 23:20: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; Thu, 09 Dec 2010 23:20:06 +0000 Received: (qmail 9537 invoked from network); 9 Dec 2010 23:20:04 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 9 Dec 2010 23:20:04 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1PQpmM-0000rG-TO; Thu, 09 Dec 2010 23:20:02 +0000 Date: Thu, 9 Dec 2010 23:20:02 +0000 (UTC) From: "Joseph S. Myers" To: gcc-patches@gcc.gnu.org cc: nickc@redhat.com Subject: svr4.h avoidance: xstormy16 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 xstormy16-*-elf from using that header, adding the macros used from it to stormy16.h. As with other targets, a simplified LINK_SPEC is used. Unusually, this target used WCHAR_TYPE from svr4.h but overrode WCHAR_TYPE_SIZE (but this overriding of WCHAR_TYPE_SIZE was indeed necessary for it to be correct). Tested building cc1 and xgcc for cross to xstormy16-elf. OK to commit? 2010-12-09 Joseph Myers * config/stormy16/stormy16.h (LINK_SPEC, WCHAR_TYPE): Define. * config.gcc (xstormy16-*-elf): Don't use svr4.h. Index: gcc/config.gcc =================================================================== --- gcc/config.gcc (revision 167658) +++ gcc/config.gcc (working copy) @@ -2651,7 +2651,7 @@ vax-*-openbsd*) ;; xstormy16-*-elf) # For historical reasons, the target files omit the 'x'. - tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h stormy16/stormy16.h" + tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h" tm_p_file=stormy16/stormy16-protos.h md_file=stormy16/stormy16.md out_file=stormy16/stormy16.c Index: gcc/config/stormy16/stormy16.h =================================================================== --- gcc/config/stormy16/stormy16.h (revision 167658) +++ gcc/config/stormy16/stormy16.h (working copy) @@ -25,6 +25,10 @@ #undef ASM_SPEC #define ASM_SPEC "" +#undef LINK_SPEC +#define LINK_SPEC "%{h*} %{v:-V} \ + %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic}" + /* For xstormy16: - If -msim is specified, everything is built and linked as for the sim. - If -T is specified, that linker script is used, and it should provide @@ -116,6 +120,9 @@ #define PTRDIFF_TYPE "int" +#undef WCHAR_TYPE +#define WCHAR_TYPE "long int" + #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32