From patchwork Tue Jul 17 23:11:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ralf Corsepius X-Patchwork-Id: 171572 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 2462C2C00C4 for ; Wed, 18 Jul 2012 09:14:25 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1343171666; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Message-ID:Date:From:User-Agent:MIME-Version: To:CC:Subject:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=PI/S6bL+lguwJ5E9liqvrg1GHAs=; b=qysIHdJgGzCHjtq 3L7/IR2p/q8LDO7okjZk7HOHqZztJm0OmpUgQ9wT+K1+yRs8hI0I6D3k6zIK3ppT k/YKkc6LEpqZQHMXmJhKzDXn9W9b1tlEp6YE2u9SHypk3CtZ4cQpUM6flI6v6usD yRBW5Rtbltnz88aohH0uxRaGlbVY= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=W8iVq7SDWUXfYUYxPLdVHnDkbQmj/camY0gxaD9nTsiZZhwKZ/si1KvlGNrwtY llVYRmjNwIh+yZxRgFAuiUfJxfak+g9hItxneTMODj1i730lTCCwukRzzNfBPfmF rqiXP0/pbrrWX7vaycTsxQcAK7CRT15CZwhE7wQrVLJP4=; Received: (qmail 32360 invoked by alias); 17 Jul 2012 23:14:23 -0000 Received: (qmail 32349 invoked by uid 22791); 17 Jul 2012 23:14:22 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mout2.freenet.de (HELO mout2.freenet.de) (195.4.92.92) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 Jul 2012 23:14:09 +0000 Received: from [195.4.92.142] (helo=mjail2.freenet.de) by mout2.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (port 25) (Exim 4.76 #1) id 1SrGxy-00039x-59; Wed, 18 Jul 2012 01:14:06 +0200 Received: from localhost ([::1]:52816 helo=mjail2.freenet.de) by mjail2.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (Exim 4.76 #1) id 1SrGxx-00009r-Uv; Wed, 18 Jul 2012 01:14:06 +0200 Received: from [195.4.92.12] (port=60131 helo=2.mx.freenet.de) by mjail2.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (Exim 4.76 #1) id 1SrGvQ-0008MN-Ed; Wed, 18 Jul 2012 01:11:28 +0200 Received: from hsi-kbw-46-223-133-48.hsi.kabel-badenwuerttemberg.de ([46.223.133.48]:43619 helo=[192.168.1.104]) by 2.mx.freenet.de with esmtpsa (ID ralf.corsepius@freenet.de) (TLSv1:CAMELLIA256-SHA:256) (port 587) (Exim 4.76 #1) id 1SrGvQ-0003wb-Ap; Wed, 18 Jul 2012 01:11:28 +0200 Message-ID: <5005F11D.8000807@rtems.org> Date: Wed, 18 Jul 2012 01:11:25 +0200 From: Ralf Corsepius User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: =?UTF-8?B?VGhvbWFzIETDtnJmbGVy?= , Sebastian Huber , Joel Sherrill Subject: [patch] Add v850-*-rtems* 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 Hi, The patch below adds an v850-*-rtems* target configuration to GCC. It's a sightly modified copy of the v850*-*-* target, with some RTEMS specific changes added. I would like to apply this patch to trunk and gcc-4_7-branch. OK to commit? Ralf 2012-06-27 Ralf Corsépius * config.gcc (v850-*-rtems*): New target. * config/v850/rtems.h: New. * config/v850/t-rtems: New. diff --git a/gcc/config.gcc b/gcc/config.gcc index 7768917..39ea7c8 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2448,6 +2448,16 @@ tilepro-*-linux*) c_target_objs="tilepro-c.o" cxx_target_objs="tilepro-c.o" ;; +v850-*-rtems*) + target_cpu_default="TARGET_CPU_generic" + tm_file="dbxelf.h elfos.h v850/v850.h" + tm_file="${tm_file} rtems.h v850/rtems.h newlib-stdint.h" + tmake_file="${tmake_file} v850/t-v850" + tmake_file="${tmake_file} t-rtems v850/t-rtems" + use_collect2=no + c_target_objs="v850-c.o" + cxx_target_objs="v850-c.o" + ;; v850*-*-*) case ${target} in v850e2v3-*-*) diff --git a/gcc/config/v850/rtems.h b/gcc/config/v850/rtems.h new file mode 100644 index 0000000..397d2e0 --- /dev/null +++ b/gcc/config/v850/rtems.h @@ -0,0 +1,29 @@ +/* Definitions for rtems targeting a v850 using ELF. + Copyright (C) 2012 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +/* Specify predefined symbols in preprocessor. */ + +#define TARGET_OS_CPP_BUILTINS() do { \ + builtin_define( "__rtems__" ); \ + builtin_assert( "system=rtems" ); \ +} while (0) + +/* Map mv850e1 and mv850es to mv850e to match MULTILIB_MATCHES */ +#undef ASM_SPEC +#define ASM_SPEC "%{mv850es:-mv850e} %{mv850e1:-mv850e} %{!mv850es:%{!mv850e1:%{mv*:-mv%*}}}" diff --git a/gcc/config/v850/t-rtems b/gcc/config/v850/t-rtems new file mode 100644 index 0000000..c3f4ee4 --- /dev/null +++ b/gcc/config/v850/t-rtems @@ -0,0 +1,3 @@ +# Custom multilibs for RTEMS + +MULTILIB_MATCHES += mv850e=mv850es