From patchwork Fri Feb 22 15:40:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Huber X-Patchwork-Id: 222549 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 1D4872C0299 for ; Sat, 23 Feb 2013 02:41:08 +1100 (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=1362152469; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: From:To:Cc:Subject:Date:Message-Id:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=IflXigRe+WW4lQX8n5JK8hizDpg=; b=nA5Sg2k38AQtaIV lSZzOoWSQQyloqRL/tMgVajqOsoCZq42jjxJa5FY2AGVQKYuraSfnVV6oylmXuIt 7LNJimJWTOaJJ2FrtEbR/SEDJx6b3iBg7L8nMKMe+zu2mvUobt7sIZyMkk3rjDXO 6YvgT1z4vKpNJvy+byYHZ3IWdbHs= 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:From:To:Cc:Subject:Date:Message-Id:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=kzqcb3dHxJnRpgg1c7/BznNZTdXZDLrfO7O6jamVUis0bfJ3ZBlYtzl9NpR7bf z8nol8ZdwomRLGf/gAnFzjNZkcMIVVoJfSsH5Vw7+hQ6BXfq8XH0c39E5QDzSFOe vJtraw0gfvqNvrNJsz0WVSVqQ2U9TbLCDui+5HIwPUjuM=; Received: (qmail 1209 invoked by alias); 22 Feb 2013 15:41:05 -0000 Received: (qmail 1201 invoked by uid 22791); 22 Feb 2013 15:41:04 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL, BAYES_00, RDNS_DYNAMIC, TW_IV X-Spam-Check-By: sourceware.org Received: from host-82-135-62-35.customer.m-online.net (HELO mail.embedded-brains.de) (82.135.62.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 22 Feb 2013 15:40:53 +0000 Received: by mail.embedded-brains.de (Postfix, from userid 65534) id 6961C652CFE; Fri, 22 Feb 2013 16:40:52 +0100 (CET) Received: from eb0024.eb.z (eb0024.eb.z [192.168.96.64]) by mail.embedded-brains.de (Postfix) with ESMTP id 978406524D9; Fri, 22 Feb 2013 16:40:51 +0100 (CET) From: Sebastian Huber To: gcc-patches@gcc.gnu.org Cc: Sebastian Huber Subject: [PATCH] ARM RTEMS changes for GCC 4.6 Date: Fri, 22 Feb 2013 16:40:50 +0100 Message-Id: <1361547650-18036-1-git-send-email-sebastian.huber@embedded-brains.de> X-IsSubscribed: yes 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 2013-02-22 Sebastian Huber * config.gcc (arm*-*-rtemself*): New. (arm*-*-rtems*): Removed. (arm*-*-eabi* | arm*-*-symbianelf*): Add (arm*-*-rtems*). * config/arm/rtems-eabi.h: New file. * config/arm/t-rtems-eabi: New file. --- gcc/config.gcc | 16 ++++++++++------ gcc/config/arm/rtems-eabi.h | 29 +++++++++++++++++++++++++++++ gcc/config/arm/t-rtems-eabi | 8 ++++++++ 3 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 gcc/config/arm/rtems-eabi.h create mode 100644 gcc/config/arm/t-rtems-eabi diff --git a/gcc/config.gcc b/gcc/config.gcc index fdbe321..35d502b 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -870,7 +870,12 @@ arm*-*-ecos-elf) tmake_file="arm/t-arm arm/t-arm-elf" tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp" ;; -arm*-*-eabi* | arm*-*-symbianelf* ) +arm*-*-rtemself*) + tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h newlib-stdint.h" + tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems" + tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp" + ;; +arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*) # The BPABI long long divmod functions return a 128-bit value in # registers r0-r3. Correctly modeling that requires the use of # TImode. @@ -885,6 +890,10 @@ arm*-*-eabi* | arm*-*-symbianelf* ) tmake_file="${tmake_file} arm/t-bpabi" use_gcc_stdint=wrap ;; + arm*-*-rtems*) + tm_file="${tm_file} rtems.h arm/rtems-eabi.h newlib-stdint.h" + tmake_file="${tmake_file} arm/t-bpabi t-rtems arm/t-rtems-eabi" + ;; arm*-*-symbianelf*) tm_file="${tm_file} arm/symbian.h" # We do not include t-bpabi for Symbian OS because the system @@ -895,11 +904,6 @@ arm*-*-eabi* | arm*-*-symbianelf* ) tm_file="${tm_file} arm/aout.h arm/arm.h" tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp" ;; -arm*-*-rtems*) - tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h newlib-stdint.h" - tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems" - tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp" - ;; arm*-*-elf) tm_file="dbxelf.h elfos.h newlib-stdint.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h" tmake_file="arm/t-arm arm/t-arm-elf" diff --git a/gcc/config/arm/rtems-eabi.h b/gcc/config/arm/rtems-eabi.h new file mode 100644 index 0000000..ced98a9 --- /dev/null +++ b/gcc/config/arm/rtems-eabi.h @@ -0,0 +1,29 @@ +/* Definitions for RTEMS based ARM systems using EABI. + Copyright (C) 2011 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 + . */ + +#define HAS_INIT_SECTION + +#undef TARGET_OS_CPP_BUILTINS +#define TARGET_OS_CPP_BUILTINS() \ + do { \ + builtin_define ("__rtems__"); \ + builtin_define ("__USE_INIT_FINI__"); \ + builtin_assert ("system=rtems"); \ + TARGET_BPABI_CPP_BUILTINS(); \ + } while (0) diff --git a/gcc/config/arm/t-rtems-eabi b/gcc/config/arm/t-rtems-eabi new file mode 100644 index 0000000..f0e714a --- /dev/null +++ b/gcc/config/arm/t-rtems-eabi @@ -0,0 +1,8 @@ +# Custom RTEMS EABI multilibs + +MULTILIB_OPTIONS = mthumb march=armv6-m/march=armv7/march=armv7-m +MULTILIB_DIRNAMES = thumb armv6-m armv7 armv7-m +MULTILIB_EXCEPTIONS = march=armv6-m march=armv7 march=armv7-m +MULTILIB_MATCHES = +MULTILIB_EXCLUSIONS = +MULTILIB_OSDIRNAMES =