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 <cpu>-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. -- Joel Sherrill, Ph.D. Director of Research& Development joel.sherr...@oarcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (256) 722-9985
commit 367ff875a7bb92a02c2f7390cdf9d0027435a099 Author: Sebastian Huber <sebastian.hu...@embedded-brains.de> Date: Fri May 4 09:23:58 2012 +0200 ARM RTEMS changes 2012-04-04 Sebastian Huber <sebastian.hu...@embedded-brains.de> * 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. 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 + <http://www.gnu.org/licenses/>. */ + +#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 =
commit a48b4fb1619e628f8ead188bc6687696e5468b0e Author: Sebastian Huber <sebastian.hu...@embedded-brains.de> Date: Fri May 4 09:30:32 2012 +0200 ARM RTEMS changes 2012-04-04 Sebastian Huber <sebastian.hu...@embedded-brains.de> * config.gcc (arm*-*-rtemself*): New. (arm*-*-rtems*): Removed. (arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*): Rename "arm*-*-rtemseabi*" to "arm*-*-rtems*". 2012-04-04 Sebastian Huber <sebastian.hu...@embedded-brains.de> * config.host (arm*-*-rtemself*): New. (arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*): Rename "arm*-*-rtemseabi*" to "arm*-*-rtems*". diff --git a/gcc/config.gcc b/gcc/config.gcc index a2c947d..27864b4 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -251,7 +251,7 @@ case ${target} in | arm*-*-elf \ | arm*-*-freebsd* \ | arm*-*-linux* \ - | arm*-*-rtems* \ + | arm*-*-rtemself* \ | arm*-*-uclinux* \ | arm*-wince-pe* \ | mips-sgi-irix6.5 \ @@ -885,7 +885,12 @@ arm*-*-ecos-elf) tm_file="dbxelf.h elfos.h newlib-stdint.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h" tmake_file="arm/t-arm arm/t-arm-elf" ;; -arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*) +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" + 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. @@ -899,9 +904,10 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*) tmake_file="${tmake_file} arm/t-bpabi" use_gcc_stdint=wrap ;; - arm*-*-rtemseabi*) + 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" @@ -912,10 +918,6 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*) esac tm_file="${tm_file} arm/aout.h arm/arm.h" ;; -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" - ;; 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/libgcc/config.host b/libgcc/config.host index 79be4ed..da6ffc2 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -354,11 +354,15 @@ arm*-*-ecos-elf) tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" extra_parts="$extra_parts crti.o crtn.o" ;; -arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*) +arm*-*-rtemself*) + tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" + extra_parts="$extra_parts crti.o crtn.o" + ;; +arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*) tmake_file="${tmake_file} arm/t-arm arm/t-elf t-fixedpoint-gnu-prefix" tm_file="$tm_file arm/bpabi-lib.h" case ${host} in - arm*-*-eabi* | arm*-*-rtemseabi*) + arm*-*-eabi* | arm*-*-rtems*) tmake_file="${tmake_file} arm/t-bpabi" extra_parts="crtbegin.o crtend.o crti.o crtn.o" ;; @@ -371,10 +375,6 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*) tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" unwind_header=config/arm/unwind-arm.h ;; -arm*-*-rtems*) - tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" - extra_parts="$extra_parts crti.o crtn.o" - ;; arm*-*-elf) tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" extra_parts="$extra_parts crti.o crtn.o"
commit e5d35f26e0103dd7dc3c69551a5b541be15ea284 Author: Sebastian Huber <sebastian.hu...@embedded-brains.de> Date: Fri May 4 09:37:38 2012 +0200 ARM RTEMS changes 2012-04-04 Sebastian Huber <sebastian.hu...@embedded-brains.de> * config.gcc (arm*-*-rtemself*): New. (arm*-*-rtems*): Removed. (arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*): Rename "arm*-*-rtemseabi*" to "arm*-*-rtems*". 2012-04-04 Sebastian Huber <sebastian.hu...@embedded-brains.de> * config.host (arm*-*-rtemself*): New. (arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*): Rename "arm*-*-rtemseabi*" to "arm*-*-rtems*". diff --git a/gcc/config.gcc b/gcc/config.gcc index 6e4666e..20fcd8c 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -253,7 +253,7 @@ case ${target} in | arm*-*-elf \ | arm*-*-freebsd* \ | arm*-*-linux* \ - | arm*-*-rtems* \ + | arm*-*-rtemself* \ | arm*-*-uclinux* \ | arm*-wince-pe* \ | score-* \ @@ -878,7 +878,12 @@ arm*-*-ecos-elf) tm_file="dbxelf.h elfos.h newlib-stdint.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h" tmake_file="arm/t-arm arm/t-arm-elf" ;; -arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*) +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" + 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. @@ -892,9 +897,10 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*) tmake_file="${tmake_file} arm/t-bpabi" use_gcc_stdint=wrap ;; - arm*-*-rtemseabi*) + 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" @@ -905,10 +911,6 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*) esac tm_file="${tm_file} arm/aout.h arm/arm.h" ;; -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" - ;; 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/libgcc/config.host b/libgcc/config.host index 2dbb95b..2ae797e 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -343,11 +343,15 @@ arm*-*-ecos-elf) tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" extra_parts="$extra_parts crti.o crtn.o" ;; -arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*) +arm*-*-rtemself*) + tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" + extra_parts="$extra_parts crti.o crtn.o" + ;; +arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*) tmake_file="${tmake_file} arm/t-arm arm/t-elf t-fixedpoint-gnu-prefix" tm_file="$tm_file arm/bpabi-lib.h" case ${host} in - arm*-*-eabi* | arm*-*-rtemseabi*) + arm*-*-eabi* | arm*-*-rtems*) tmake_file="${tmake_file} arm/t-bpabi" extra_parts="crtbegin.o crtend.o crti.o crtn.o" ;; @@ -360,10 +364,6 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*) tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" unwind_header=config/arm/unwind-arm.h ;; -arm*-*-rtems*) - tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" - extra_parts="$extra_parts crti.o crtn.o" - ;; arm*-*-elf) tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" extra_parts="$extra_parts crti.o crtn.o"