Add rtems-4.11 support for 4.7.2.

This commit is contained in:
Chris Johns
2012-11-30 17:13:18 +11:00
parent 0a48c8a1a9
commit d34a0a9b7f
7 changed files with 715 additions and 1 deletions

View File

@@ -0,0 +1,47 @@
#
# GCC 4.7.2., Newlib 1.20.0
#
%include %{_configdir}/checks.cfg
%include %{_configdir}/base.cfg
%define gcc_version 4.7.2
%define newlib_version 1.20.0
%define mpfr_version 3.0.1
%define mpc_version 0.8.2
%define gmp_version 5.0.5
%define with_threads 1
%define with_plugin 0
%define with_iconv 1
#
# AVR C++ does not work.
# configure: error: unable to detect exception model
#
%if %{_target} == avr-rtems4.11
%define enable_cxx 0
%endif
#
# M32C C++ does not work.
# gcc-4.7.2/libstdc++-v3/src/mt_allocator.cc:76: error: cast from 'void*' to 'size_t' loses precision
#
%if %{_target} == m32c-rtems4.11
%define enable_cxx 0
%endif
%ifn %{defined enable_cxx}
%define enable_cxx 1
%endif
#
# The RTEMS 4.11 patches
#
Patch0: gcc-4.7.2-rtems4.11-20121026.diff
Patch10: newlib-1.20.0-rtems4.11-20121011.diff
#
# The gcc/newlib build instructions. We use 4.7 Release 1.
#
%include %{_configdir}/gcc-4.7-1.cfg

View File

@@ -0,0 +1,15 @@
#
# GDB 7.5.1.
#
%include %{_configdir}/checks.cfg
%include %{_configdir}/base.cfg
%define gdb_version 7.5.1
# Patch0: gdb-7.5-rtems4.11-20121003.diff
#
# The gdb build instructions. We use 7.xx Release 1.
#
%include %{_configdir}/gdb-7-1.cfg

View File

@@ -0,0 +1,22 @@
#
# Tools Set for RTEMS 4.11 Unstable.
#
%define rtems_version 4.11
%define release 1
package: rtems-%{rtems_version}-%{_target}-%{release}
#
# Project custom message
#
%define gcc_version_message RTEMS %{rtems_version}-%{release},gcc-%{gcc_version}/newlib-%{newlib_version}
#
# Tools configuration.
#
rtems-binutils-2.22-1
rtems-gcc-4.7.2-newlib-1.20.0-1
rtems-gdb-7.5-1

View File

@@ -0,0 +1,427 @@
diff -Naur gcc-4.7.2.orig/gcc/ChangeLog.rtems gcc-4.7.2/gcc/ChangeLog.rtems
--- gcc-4.7.2.orig/gcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.7.2/gcc/ChangeLog.rtems 2012-10-26 08:51:45.747520538 +0200
@@ -0,0 +1,73 @@
+2012-10-26 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/avr/t-rtems: Remove LIB1ASMFUNCS filter.
+
+2012-10-26 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/v850/rtems.h: Undef WCHAR_TYPE_SIZE, WCHAR_TYPE.
+
+2012-10-26 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.gcc (sparc-*-rtems*, sparc64-*-rtems*): Remove extra_parts.
+
+2012-07-05 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.gcc (sparc64-*-rtems*): Remove sparc/t-crtin, sparc/t-crtfm.
+ Add sparc/t-rtems-64.
+ * config/sparc/t-rtems-64: New.
+
+2012-07-04 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/sparc/t-rtems: Resurrect gcc-4.6.x multilibs.
+
+2012-04-19 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.gcc (microblaze*-*-rtems*): New target.
+ * config/microblaze/rtems.h: New.
+ * config/microblaze/t-rtems: New.
+
+2011-10-28 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/avr/rtems.h: Remove __USE_INIT_FINI__.
+
+2011-06-20 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * sparc/t-rtems: Reflect introduction of sparc/t-crtin.
+
+2011-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * config.gcc (sparc-*-rtems*, sparc64-*-rtems*):
+ Add sparc/t-rtems, crti.o crtn.o.
+ * config/sparc/t-rtems: New.
+
+2011-03-22 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.gcc (sparc64-rtems*): Remove sysv.h from tm_file.
+
+2010-05-19 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * config.gcc (sparc64-*-rtems*): New target.
+ * config/sparc/sp64-rtemself.h: New file.
+
+2010-04-19 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * ginclude/stddef.h: Define _MACHINE_ANSI_H_ if _X86_64_ANSI_H_ is
+ defined (Used by amd64-*-netbsdelf5.*).
+
+2010-04-18 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * ginclude/stddef.h: Define _MACHINE_ANSI_H_ if _I386_ANSI_H_ is
+ defined (Used by i386-*-netbsdelf5.*).
+
+2009-11-04 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/m32c/rtems.h, config/m68k/rtemself.h,
+ config/m68k/rtemself.h, config/sh/rtemself.h,
+ config/sparc/rtemself.h: Undef WCHAR_TYPE_SIZE, WCHAR_TYPE.
+ (Resets WCHAR_TYPE's to defaults. Prevents broken GCC tm_files
+ to interfere and cause wchar_t/wint_t incompatibilities).
+
+ Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/mips/elf.h: Remove NO_IMPLICIT_EXTERN_C.
+
diff -Naur gcc-4.7.2.orig/gcc/config/avr/rtems.h gcc-4.7.2/gcc/config/avr/rtems.h
--- gcc-4.7.2.orig/gcc/config/avr/rtems.h 2007-08-02 12:49:31.000000000 +0200
+++ gcc-4.7.2/gcc/config/avr/rtems.h 2012-10-26 08:51:45.749520570 +0200
@@ -23,6 +23,5 @@
#define TARGET_OS_CPP_BUILTINS() \
do { \
builtin_define ("__rtems__"); \
- builtin_define ("__USE_INIT_FINI__"); \
builtin_assert ("system=rtems"); \
} while (0)
diff -Naur gcc-4.7.2.orig/gcc/config/h8300/h8300.h gcc-4.7.2/gcc/config/h8300/h8300.h
--- gcc-4.7.2.orig/gcc/config/h8300/h8300.h 2012-08-06 16:34:27.000000000 +0200
+++ gcc-4.7.2/gcc/config/h8300/h8300.h 2012-10-26 08:51:45.750520586 +0200
@@ -129,6 +129,7 @@
#define INCOMING_FRAME_SP_OFFSET (POINTER_SIZE / 8)
#define DWARF_CIE_DATA_ALIGNMENT 2
+#define DWARF2_ADDR_SIZE 4
/* Define this if addresses of constant functions
shouldn't be put through pseudo regs where they can be cse'd.
diff -Naur gcc-4.7.2.orig/gcc/config/m32c/rtems.h gcc-4.7.2/gcc/config/m32c/rtems.h
--- gcc-4.7.2.orig/gcc/config/m32c/rtems.h 2008-12-01 17:34:42.000000000 +0100
+++ gcc-4.7.2/gcc/config/m32c/rtems.h 2012-10-26 08:51:45.750520586 +0200
@@ -29,5 +29,9 @@
} \
while (0)
-/* Use the default */
+/* Use the defaults */
#undef LINK_GCC_C_SEQUENCE_SPEC
+
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.7.2.orig/gcc/config/m68k/rtemself.h gcc-4.7.2/gcc/config/m68k/rtemself.h
--- gcc-4.7.2.orig/gcc/config/m68k/rtemself.h 2007-08-02 12:49:31.000000000 +0200
+++ gcc-4.7.2/gcc/config/m68k/rtemself.h 2012-10-26 08:51:45.750520586 +0200
@@ -31,3 +31,8 @@
builtin_assert ("system=rtems"); \
} \
while (0)
+
+/* Use the defaults */
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.7.2.orig/gcc/config/microblaze/rtems.h gcc-4.7.2/gcc/config/microblaze/rtems.h
--- gcc-4.7.2.orig/gcc/config/microblaze/rtems.h 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.7.2/gcc/config/microblaze/rtems.h 2012-10-26 08:51:45.751520602 +0200
@@ -0,0 +1,25 @@
+/* Definitions for rtems targeting a microblaze using ELF.
+ Copyright (C) 2012 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/>. */
+
+/* Specify predefined symbols in preprocessor. */
+
+#define TARGET_OS_CPP_BUILTINS() do { \
+ builtin_define( "__rtems__" ); \
+ builtin_assert( "system=rtems" ); \
+} while (0)
diff -Naur gcc-4.7.2.orig/gcc/config/microblaze/t-rtems gcc-4.7.2/gcc/config/microblaze/t-rtems
--- gcc-4.7.2.orig/gcc/config/microblaze/t-rtems 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.7.2/gcc/config/microblaze/t-rtems 2012-10-26 08:51:45.751520602 +0200
@@ -0,0 +1 @@
+# Custom multilibs for RTEMS
diff -Naur gcc-4.7.2.orig/gcc/config/mips/elf.h gcc-4.7.2/gcc/config/mips/elf.h
--- gcc-4.7.2.orig/gcc/config/mips/elf.h 2010-11-21 01:54:14.000000000 +0100
+++ gcc-4.7.2/gcc/config/mips/elf.h 2012-10-26 08:51:45.751520602 +0200
@@ -47,5 +47,3 @@
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend%O%s crtn%O%s"
-
-#define NO_IMPLICIT_EXTERN_C 1
diff -Naur gcc-4.7.2.orig/gcc/config/rs6000/rtems.h gcc-4.7.2/gcc/config/rs6000/rtems.h
--- gcc-4.7.2.orig/gcc/config/rs6000/rtems.h 2011-12-06 23:49:57.000000000 +0100
+++ gcc-4.7.2/gcc/config/rs6000/rtems.h 2012-10-26 08:51:45.751520602 +0200
@@ -69,3 +69,7 @@
rs6000_spe_abi = 1; \
} \
} while(0)
+
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.7.2.orig/gcc/config/sh/rtemself.h gcc-4.7.2/gcc/config/sh/rtemself.h
--- gcc-4.7.2.orig/gcc/config/sh/rtemself.h 2007-08-02 12:49:31.000000000 +0200
+++ gcc-4.7.2/gcc/config/sh/rtemself.h 2012-10-26 08:51:45.752520618 +0200
@@ -24,3 +24,8 @@
builtin_define( "__rtems__" ); \
builtin_assert( "system=rtems" ); \
} while (0)
+
+/* Use the defaults */
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.7.2.orig/gcc/config/sparc/rtemself.h gcc-4.7.2/gcc/config/sparc/rtemself.h
--- gcc-4.7.2.orig/gcc/config/sparc/rtemself.h 2007-08-02 12:49:31.000000000 +0200
+++ gcc-4.7.2/gcc/config/sparc/rtemself.h 2012-10-26 08:51:45.752520618 +0200
@@ -29,5 +29,9 @@
} \
while (0)
-/* Use the default */
+/* Use the defaults */
#undef LINK_GCC_C_SEQUENCE_SPEC
+
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.7.2.orig/gcc/config/sparc/sp64-rtemself.h gcc-4.7.2/gcc/config/sparc/sp64-rtemself.h
--- gcc-4.7.2.orig/gcc/config/sparc/sp64-rtemself.h 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.7.2/gcc/config/sparc/sp64-rtemself.h 2012-10-26 08:51:45.752520618 +0200
@@ -0,0 +1,37 @@
+/* Definitions for rtems targeting a SPARC64 using ELF.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (joel@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_define ("__USE_INIT_FINI__"); \
+ builtin_assert ("system=rtems"); \
+ } \
+ while (0)
+
+/* Use the default */
+#undef LINK_GCC_C_SEQUENCE_SPEC
+
+/* we are not svr4 */
+#undef CPP_SUBTARGET_SPEC
+#define CPP_SUBTARGET_SPEC ""
diff -Naur gcc-4.7.2.orig/gcc/config/sparc/t-rtems gcc-4.7.2/gcc/config/sparc/t-rtems
--- gcc-4.7.2.orig/gcc/config/sparc/t-rtems 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.7.2/gcc/config/sparc/t-rtems 2012-10-26 08:51:45.752520618 +0200
@@ -0,0 +1,22 @@
+# 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/>.
+#
+
+MULTILIB_OPTIONS = msoft-float mcpu=v8
+MULTILIB_DIRNAMES = soft v8
+MULTILIB_MATCHES = msoft-float=mno-fpu
diff -Naur gcc-4.7.2.orig/gcc/config/sparc/t-rtems-64 gcc-4.7.2/gcc/config/sparc/t-rtems-64
--- gcc-4.7.2.orig/gcc/config/sparc/t-rtems-64 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.7.2/gcc/config/sparc/t-rtems-64 2012-10-26 08:51:45.753520635 +0200
@@ -0,0 +1,22 @@
+# Copyright (C) 2012 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/>.
+#
+
+MULTILIB_OPTIONS = msoft-float
+MULTILIB_DIRNAMES = soft
+MULTILIB_MATCHES = msoft-float=mno-fpu
diff -Naur gcc-4.7.2.orig/gcc/config/v850/rtems.h gcc-4.7.2/gcc/config/v850/rtems.h
--- gcc-4.7.2.orig/gcc/config/v850/rtems.h 2012-07-18 17:34:46.000000000 +0200
+++ gcc-4.7.2/gcc/config/v850/rtems.h 2012-10-26 08:51:45.753520635 +0200
@@ -27,3 +27,8 @@
/* Map mv850e1 and mv850es to mv850e to match MULTILIB_MATCHES */
#undef ASM_SPEC
#define ASM_SPEC "%{mv850es:-mv850e} %{mv850e1:-mv850e} %{!mv850es:%{!mv850e1:%{mv*:-mv%*}}}"
+
+/* Use the defaults */
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.7.2.orig/gcc/config.gcc gcc-4.7.2/gcc/config.gcc
--- gcc-4.7.2.orig/gcc/config.gcc 2012-09-12 11:03:54.000000000 +0200
+++ gcc-4.7.2/gcc/config.gcc 2012-10-26 08:51:45.749520570 +0200
@@ -1723,6 +1723,14 @@
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"
+ tm_file="${tm_file} 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"
+ tmake_file="${tmake_file} t-rtems microblaze/t-rtems"
+ ;;
microblaze*-*-*)
tm_file="${tm_file} dbxelf.h"
c_target_objs="${c_target_objs} microblaze-c.o"
@@ -2404,7 +2412,7 @@
;;
sparc-*-rtems*)
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
- tmake_file="sparc/t-sparc sparc/t-elf t-rtems"
+ tmake_file="sparc/t-sparc sparc/t-elf sparc/t-rtems t-rtems"
;;
sparc-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
@@ -2457,8 +2465,8 @@
sparc64-*-rtems*)
tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
extra_options="${extra_options}"
- tmake_file="${tmake_file} sparc/t-sparc t-rtems"
- ;;
+ tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64 t-rtems"
+ ;;
sparc64-*-linux*)
tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default-64.h sparc/linux64.h sparc/tso.h"
extra_options="${extra_options} sparc/long-double-switch.opt"
diff -Naur gcc-4.7.2.orig/gcc/ginclude/stddef.h gcc-4.7.2/gcc/ginclude/stddef.h
--- gcc-4.7.2.orig/gcc/ginclude/stddef.h 2012-02-12 02:06:04.000000000 +0100
+++ gcc-4.7.2/gcc/ginclude/stddef.h 2012-10-26 08:51:45.753520635 +0200
@@ -53,7 +53,13 @@
one less case to deal with in the following. */
#if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
#include <machine/ansi.h>
+#if !defined(_MACHINE_ANSI_H_)
+#if defined(_I386_ANSI_H_) || defined(_X86_64_ANSI_H_)
+#define _MACHINE_ANSI_H_
#endif
+#endif
+#endif
+
/* On FreeBSD 5, machine/ansi.h does not exist anymore... */
#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
#include <sys/_types.h>
diff -Naur gcc-4.7.2.orig/libgcc/ChangeLog.rtems gcc-4.7.2/libgcc/ChangeLog.rtems
--- gcc-4.7.2.orig/libgcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.7.2/libgcc/ChangeLog.rtems 2012-10-26 08:51:45.753520635 +0200
@@ -0,0 +1,18 @@
+2012-07-10 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.host (sh*-*-rtems*): Add sh*-*-elf*'s extra_parts.
+
+2012-07-05 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.host (sparc64-*-rtems*): Remove sparc/t-elf.
+
+2012-05-16 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * config.host (m32r-*-rtems*): Include crtinit.o and crtfinit.o
+ as extra_parts.
+
+2012-03-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * config.host (powerpc-*-rtems*): Add rs6000/t-savresfgpr to
+ tmake_file.
+
diff -Naur gcc-4.7.2.orig/libgcc/config.host gcc-4.7.2/libgcc/config.host
--- gcc-4.7.2.orig/libgcc/config.host 2012-09-05 14:19:47.000000000 +0200
+++ gcc-4.7.2/libgcc/config.host 2012-10-26 08:51:45.754520652 +0200
@@ -693,6 +693,7 @@
;;
m32r-*-rtems*)
tmake_file="$tmake_file m32r/t-m32r t-fdpbit"
+ extra_parts="$extra_parts crtinit.o crtfini.o"
;;
m32rle-*-elf*)
tmake_file=t-fdpbit
@@ -891,7 +892,7 @@
extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
;;
powerpc-*-rtems*)
- tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
+ tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
;;
powerpc-*-linux* | powerpc64-*-linux*)
@@ -995,7 +996,10 @@
sh-*-rtems*)
tmake_file="$tmake_file sh/t-sh t-crtstuff-pic t-fdpbit"
extra_parts="$extra_parts crt1.o crti.o crtn.o crtbeginS.o crtendS.o \
- $sh_ic_extra_parts $sh_opt_extra_parts"
+ libic_invalidate_array_4-100.a \
+ libic_invalidate_array_4-200.a \
+ libic_invalidate_array_4a.a \
+ libgcc-Os-4-200.a libgcc-4-300.a"
;;
sh-wrs-vxworks)
tmake_file="$tmake_file sh/t-sh t-crtstuff-pic t-fdpbit"
@@ -1054,7 +1058,7 @@
extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
;;
sparc64-*-rtems*)
- tmake_file="$tmake_file sparc/t-elf t-crtfm"
+ tmake_file="$tmake_file t-crtfm"
extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
;;
sparc-wrs-vxworks)

View File

@@ -0,0 +1,182 @@
#
# GCC 4.7 Version 1.
#
# This configuration file configure's, make's and install's gcc. It uses
# newlib, MPFR, MPC, and GMP in a one-tree build configuration.
#
#
# Default to C++ on.
#
%ifn %{defined enable_cxx}
%define enable_cxx 1
%endif
%include %{_configdir}/checks.cfg
%ifn %{defined gcc_version_message}
%error No GCC Version message defined.
%endif
Name: %{_target}-gcc-%{gcc_version}-newlib-%{newlib_version}-%{release}
Summary: GCC v%{gcc_version} and Newlib v%{newlib_version} for target %{_target} on host %{_host}
Version: %{gcc_version}
Release: %{release}
URL: http://gcc.gnu.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
#
# GCC core and G++
#
Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
VersionContro0: git clone git://gcc.gnu.org/git/gcc.git
#
# Newlib
#
Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
VersionControl10: cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co newlib
#
# Packages GCC requires
#
Source20: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
#
# The GCC library directory
#
%global _gcclibdir %{_prefix}/lib
#
# Prepare the source code.
#
%prep
%setup -q -c -T -n %{name}-%{version}
# gcc core
%setup -q -T -D -n %{name}-%{version} -a0
cd gcc-%{gcc_version}
%{?patch0:%patch0 -p1}
cd ..
# g++
%{?source1:%setup -q -T -D -n %{name}-%{version} -a1}
cd gcc-%{gcc_version}
%{?patch1:%patch1 -p1}
cd ..
# newlib
%setup -q -T -D -n %{name}-%{version} -a10
cd newlib-%{newlib_version}
%{?patch10:%patch10 -p1}
cd ..
# Link newlib into the gcc source tree
ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_version}
# MPFR
%setup -q -T -D -n %{name}-%{version} -a20
cd mpfr-%{mpfr_version}
%{?patch20:%patch20 -p1}
cd ..
# Build MPFR one-tree style
ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_version}/mpfr
# MPC
%setup -q -T -D -n %{name}-%{version} -a21
cd mpc-%{mpc_version}
%{?patch21:%patch21 -p1}
cd ..
# Build MPC one-tree style
ln -s ../mpc-%{mpc_version} gcc-%{gcc_version}/mpc
# GMP
%setup -q -T -D -n %{name}-%{version} -a22
cd gmp-%{gmp_version}
%{?patch22:%patch22 -p1}
cd ..
# Build GMP one-tree style
ln -s ../gmp-%{gmp_version} gcc-%{gcc_version}/gmp
echo "%{gcc_version_message}" > gcc-%{gcc_version}/gcc/DEV-PHASE
# Fix timestamps
cd gcc-%{gcc_version}
contrib/gcc_update --touch
cd ..
%build
export PATH="%{_bindir}:${PATH}"
mkdir -p build
cd build
languages="c"
%if %{enable_cxx}
languages="$languages,c++"
%endif
%if "%{_build}" != "%{_host}"
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
CC="%{_host}-gcc ${SB_OPT_FLAGS}" \
%else
# gcc is not ready to be compiled with -std=gnu99
CC=$(echo "%{__cc} ${SB_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
%endif
../gcc-%{gcc_version}/configure \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--exec_prefix=%{_exec_prefix} \
--includedir=%{_includedir} \
--libdir=%{_gcclibdir} \
--libexecdir=%{_libexecdir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--datadir=%{_datadir} \
--build=%_build --host=%_host \
--target=%{_target} \
--disable-libstdcxx-pch \
--with-gnu-as --with-gnu-ld --verbose \
--with-newlib \
--with-system-zlib \
--disable-nls --without-included-gettext \
--disable-win32-registry \
--enable-version-specific-runtime-libs \
%{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
%{?with_threads:--enable-threads}%{!?with_threads:--disable-threads} \
%{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
--enable-newlib-io-c99-formats \
%{?with_iconv:--enable-newlib-iconv} \
--enable-languages="$languages"
%if "%_host" != "%_build"
# Bug in gcc-3.2.1:
# Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
mkdir -p gcc/include
cp ../gcc-%{gcc_version}/gcc/gsyslimits.h gcc/include/syslimits.h
%endif
%{__make} %{?_smp_mflags} all
cd ..
%install
export PATH="%{_bindir}:${PATH}"
rm -rf $SB_BUILD_ROOT
cd build
%{__make} DESTDIR=$SB_BUILD_ROOT install
cd ..
# libiberty doesn't honor --libdir, but always installs to a
# magically guessed _libdir
rm -f ${SB_BUILD_ROOT}%{_libdir}/libiberty.a
# We use the version from binutils
rm -f $SB_BUILD_ROOT%{_bindir}/%{_target}-c++filt%{_exeext}
# We don't ship info/dir
rm -f $SB_BUILD_ROOT%{_infodir}/dir
# Don't want libffi's man-pages
rm -f $SB_BUILD_ROOT%{_mandir}/man3/*ffi*

View File

@@ -0,0 +1,21 @@
#
# GCC 4.7.2, Newlib 1.20
#
%if %{release} == %{nil}
%define release 1
%endif
%include %{_configdir}/checks.cfg
%include %{_configdir}/base.cfg
%define gcc_version 4.7.2
%define newlib_version 1.20.0
%define mpfr_version 3.0.1
%define mpc_version 1.0.1
%define gmp_version 5.0.5
#
# The gcc/newlib build instructions. We use 4.7 Release 1.
#
%include %{_configdir}/gcc-4.7-1.cfg

View File

@@ -29,7 +29,7 @@ cd gdb-%{gdb_version}
cd .. cd ..
%build %build
# export PATH="%{_bindir}:${PATH}" export PATH="%{_bindir}:${PATH}"
mkdir -p build mkdir -p build
cd build cd build
%if "%{_build}" != "%{_host}" %if "%{_build}" != "%{_host}"