From patchwork Mon May 14 17:35:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: arm-rtems switch default target to EABI Date: Mon, 14 May 2012 07:35:54 -0000 From: Joel Sherrill X-Patchwork-Id: 159091 Message-Id: <4FB1427A.3090300@oarcorp.com> To: gcc-patches@gcc.gnu.org, Sebastian Huber , Thomas Doerfler , Chris Johns , Ralf Corsepius 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 =