This patch adds the microblaze-*-rtems* target to gcc. OK to apply?
2012-05-07 Joel Sherrill <joel.sherr...@oarcorp.com> * config.gcc (microblaze-*-rtems*): New target. * config/microblaze/rtems.h: New file -- 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
Index: gcc/config.gcc =================================================================== --- gcc/config.gcc (revision 187223) +++ gcc/config.gcc (working copy) @@ -1700,6 +1700,12 @@ c_target_objs="${c_target_objs} microblaze-c.o" cxx_target_objs="${cxx_target_objs} microblaze-c.o" ;; +microblaze-*-rtems*) + tm_file="${tm_file} dbxelf.h microblaze/rtems.h rtems.h newlib-stdint.h" + c_target_objs="${c_target_objs} microblaze-c.o" + cxx_target_objs="${cxx_target_objs} microblaze-c.o" + tmake_file="${tmake_file} microblaze/t-microblaze t-rtems" + ;; microblaze*-*-*) tm_file="${tm_file} dbxelf.h" c_target_objs="${c_target_objs} microblaze-c.o" Index: gcc/config/microblaze/rtems.h =================================================================== --- gcc/config/microblaze/rtems.h (revision 0) +++ gcc/config/microblaze/rtems.h (revision 0) @@ -0,0 +1,42 @@ +/* Definitions for rtems targeting a Microblaze using ELF. + Copyright (C) 2012 Free Software Foundation, Inc. + Contributed by Joel Sherrill (j...@oarcorp.com). + +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/>. */ + +/* Target OS builtins. */ +#undef TARGET_OS_CPP_BUILTINS +#define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_define ("__rtems__"); \ + builtin_assert ("system=rtems"); \ + } \ + while (0) + +/* Use the default */ +#undef LINK_GCC_C_SEQUENCE_SPEC + +/* Extra switches sometimes passed to the linker. */ +/* -xl-mode-xmdstub translated to -Zxl-mode-xmdstub -- deprecated. */ +/* RTEMS: Remove use of xilinx.ld but keep other parts for compatibility */ +#undef LINK_SPEC +#define LINK_SPEC "%{shared:-shared} -N -relax \ + %{Zxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \ + %{mxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \ + %{mxl-gp-opt:%{G*}} %{!mxl-gp-opt: -G 0}" +