From patchwork Thu Jan 30 02:57:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 315252 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 207662C00CE for ; Thu, 30 Jan 2014 13:57:57 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:subject; q=dns; s=default; b=y1iNzuunhsjqMSU mSxVZtFIwPFF8wJGekgS5QXAwAe2UawXtsQoj43WSPFTHERpAyH4fYvIcFjtPVzq jZirrS512XpocXD/1FVxIGkAklAJ73ef1RopAQ707KMP3MDN+HtLxyPO9zsiqD3+ icWO5ghbmeB3Vk1h5aUbPz7Vi510= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:subject; s=default; bh=x9ZUdkksuj9fuqcuKdw5L iHPbEc=; b=nAT4Yc7cwVZ6XqR5ytsmGuxbjMbWL/Lu841cpUG0tMAMYqI8m5nSN qvGn3yLgOGGmck69RaA0hcpxpbz/ttcqN6jbqaK7HDe/7r+u+ne9BOXT+w+QTA3z 5gjszPsUlG4vT1FLu+wUlkowL5N57bLczj3gR6c1Q/NJU/18CXH6fo= Received: (qmail 21902 invoked by alias); 30 Jan 2014 02:57:49 -0000 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 Received: (qmail 21887 invoked by uid 89); 30 Jan 2014 02:57:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Jan 2014 02:57:47 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0U2vk9Z030725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Jan 2014 21:57:46 -0500 Received: from greed.delorie.com (ovpn-113-173.phx2.redhat.com [10.3.113.173]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s0U2viH7005432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 29 Jan 2014 21:57:46 -0500 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1]) by greed.delorie.com (8.14.4/8.14.4) with ESMTP id s0U2vhXA016663 for ; Wed, 29 Jan 2014 21:57:43 -0500 Received: (from dj@localhost) by greed.delorie.com (8.14.4/8.14.4/Submit) id s0U2vhBS016662; Wed, 29 Jan 2014 21:57:43 -0500 Date: Wed, 29 Jan 2014 21:57:43 -0500 Message-Id: <201401300257.s0U2vhBS016662@greed.delorie.com> From: DJ Delorie To: gcc-patches@gcc.gnu.org Subject: [msp430] add -minrt X-IsSubscribed: yes Minor change to support some new functionality in newlib. Committed. * config/msp430/msp430.opt (-minrt): New. * config/msp430/msp430.h (STARTFILE_SPEC): Link alternate runtime if -minrt given. (ENDFILE_SPEC): Likewise. Index: gcc/config/msp430/msp430.opt =================================================================== --- gcc/config/msp430/msp430.opt (revision 207293) +++ gcc/config/msp430/msp430.opt (working copy) @@ -25,6 +25,10 @@ Select small model - 16-bit addresses/po mrelax Target Report Optimize opcode sizes at link time mOs Target Undocumented Mask(OPT_SPACE) + +minrt +Target Report Mask(MINRT) RejectNegative +Use a minimum runtime (no static initializers or ctors) for memory-constrained devices. Index: gcc/config/msp430/msp430.h =================================================================== --- gcc/config/msp430/msp430.h (revision 207293) +++ gcc/config/msp430/msp430.h (working copy) @@ -42,17 +42,17 @@ extern bool msp430x; else \ builtin_assert ("cpu=MSP430"); \ } \ while (0) #undef STARTFILE_SPEC -#define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:crt0.o%s} crtbegin.o%s" +#define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{minrt:crt0-minrt.o%s}%{!minrt:crt0.o%s}} %{!minrt:crtbegin.o%s}" /* -lgcc is included because crtend.o needs __mspabi_func_epilog_1. */ #undef ENDFILE_SPEC -#define ENDFILE_SPEC "crtend.o%s crtn.o%s -lgcc" +#define ENDFILE_SPEC "%{!minrt:crtend.o%s} %{minrt:crtn-minrt.o%s}%{!minrt:crtn.o%s} -lgcc" #define ASM_SPEC "-mP " /* Enable polymorphic instructions. */ \ "%{mcpu=*:-mcpu=%*}%{!mcpu=*:%{mmcu=*:-mmcu=%*}} " /* Pass the CPU type on to the assembler. */ \ "%{mrelax=-mQ} " /* Pass the relax option on to the assembler. */ \ "%{mlarge:-ml} " /* Tell the assembler if we are building for the LARGE pointer model. */ \ "%{!msim:-md} %{msim:%{mlarge:-md}}" /* Copy data from ROM to RAM if necessary. */ \