From patchwork Mon May 14 17:35:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Sherrill X-Patchwork-Id: 159091 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 8CFB3B6FFE for ; Tue, 15 May 2012 03:36: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=1337621786; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=UovpsvG DKXZrxq+KwpJvAwEjMOQ=; b=TtKCueNi0FSvp0FyXKjern17rt1UjeJAnstHIf0 AlNmvgsxTtKkY8q7r1PYJLKdVukNLPGWX6xLuxBRS6C9VfpHNiPFLrgVOKiiSWs/ /rMRalWmWBf7gI0SIpT50RcbmErMrTwq+Fi/462PBClQgJdb5dVrv0rh5q+pVqcf aYGo= 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:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=HCZGMYszIrMEWKIMVN63lJ6cxJL+0eGh9jUusYdPY8732XqDRi44/+XbkrYJU4 3oYpxdTk0iBGCkMLXy/AqBM3tRkusuGoOYuyRMVDxNTJzfTbpJa2fUQF9Pz6KjSm Bsm0bHlEBr1L1d3DPrQgC1pKikGtGFgr5zxHiZ45Opyyc=; Received: (qmail 19104 invoked by alias); 14 May 2012 17:36:15 -0000 Received: (qmail 18752 invoked by uid 22791); 14 May 2012 17:36:11 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, TW_IV, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from oarmail.oarcorp.com (HELO OARmail.OARCORP.com) (67.63.146.244) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 May 2012 17:35:56 +0000 Received: from iceland.oarcorp.com (192.168.1.171) by OARmail.OARCORP.com (192.168.2.2) with Microsoft SMTP Server (TLS) id 8.1.436.0; Mon, 14 May 2012 12:35:54 -0500 Message-ID: <4FB1427A.3090300@oarcorp.com> Date: Mon, 14 May 2012 12:35:54 -0500 From: Joel Sherrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.4) Gecko/20120425 Thunderbird/10.0.4 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org, Sebastian Huber , Thomas Doerfler , Chris Johns , Ralf Corsepius Subject: arm-rtems switch default target to EABI 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 Since patches in PRs don't get much attention, this is an email about the attached patches from Sebastian Huber and myself to correct the arm rtems target name situation. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53325 There is a long explanation in the PR but the short version is that although we fully intended to switch the arm-rtems target from ELF to EABI we never intended the target name "arm-*-rtemseabi*" to become the preferred arm RTEMS target name. We want all RTEMS target names to be of the form -rtems. Unfortunately, we screwed up and arm-rtems is marked as deprecated in 4.7. These patches do the following: + rename arm-*-rtems* to arm-*-rtemself* + make arm-*-rtemself* deprecated + make arm-*-rtems* an accepted name for arm-*-rtemseabi* arm-*-rtemself* can disappear when the ARM elf targets are generally removed. Sebastian tested them and the results are at: http://gcc.gnu.org/ml/gcc-testresults/2012-05/msg00322.html http://gcc.gnu.org/ml/gcc-testresults/2012-05/msg00323.html http://gcc.gnu.org/ml/gcc-testresults/2012-05/msg00324.html RTEMS is very consistent across target architectures and this just slipped through. We handled switches from a.out -> coff -> elf in a similar manner in the past. I hope it is OK to merge this. Thanks. diff --git a/gcc/config.gcc b/gcc/config.gcc index 129e7db..671d64f 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -870,7 +870,13 @@ 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" + use_gcc_stdint=provide + ;; +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 +891,11 @@ 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" + use_gcc_stdint=provide + ;; arm*-*-symbianelf*) tm_file="${tm_file} arm/symbian.h" # We do not include t-bpabi for Symbian OS because the system @@ -895,11 +906,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 =