[91350690] | 1 | diff -uNr gcc-4.1.1.orig/gcc/config/arm/rtems-elf.h gcc-4.1.1/gcc/config/arm/rtems-elf.h |
---|
| 2 | --- gcc-4.1.1.orig/gcc/config/arm/rtems-elf.h 2005-11-22 00:28:29.000000000 +0100 |
---|
| 3 | +++ gcc-4.1.1/gcc/config/arm/rtems-elf.h 2007-01-31 09:37:57.000000000 +0100 |
---|
| 4 | @@ -27,6 +27,7 @@ |
---|
| 5 | #define TARGET_OS_CPP_BUILTINS() \ |
---|
| 6 | do { \ |
---|
| 7 | builtin_define ("__rtems__"); \ |
---|
| 8 | + builtin_define ("__USE_INIT_FINI__"); \ |
---|
| 9 | builtin_assert ("system=rtems"); \ |
---|
| 10 | } while (0) |
---|
| 11 | |
---|
| 12 | diff -uNr gcc-4.1.1.orig/gcc/config/bfin/rtems.h gcc-4.1.1/gcc/config/bfin/rtems.h |
---|
| 13 | --- gcc-4.1.1.orig/gcc/config/bfin/rtems.h 1970-01-01 01:00:00.000000000 +0100 |
---|
| 14 | +++ gcc-4.1.1/gcc/config/bfin/rtems.h 2007-01-31 09:37:57.000000000 +0100 |
---|
| 15 | @@ -0,0 +1,29 @@ |
---|
| 16 | +/* Definitions for rtems targeting a bfin |
---|
| 17 | + Copyright (C) 2006 Free Software Foundation, Inc. |
---|
| 18 | + Contributed by Ralf Corsépius (ralf.corsepius@rtems.org). |
---|
| 19 | + |
---|
| 20 | +This file is part of GCC. |
---|
| 21 | + |
---|
| 22 | +GCC is free software; you can redistribute it and/or modify |
---|
| 23 | +it under the terms of the GNU General Public License as published by |
---|
| 24 | +the Free Software Foundation; either version 2, or (at your option) |
---|
| 25 | +any later version. |
---|
| 26 | + |
---|
| 27 | +GCC is distributed in the hope that it will be useful, |
---|
| 28 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 29 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 30 | +GNU General Public License for more details. |
---|
| 31 | + |
---|
| 32 | +You should have received a copy of the GNU General Public License |
---|
| 33 | +along with GCC; see the file COPYING. If not, write to |
---|
| 34 | +the Free Software Foundation, 51 Franklin Street, Fifth Floor, |
---|
| 35 | +Boston, MA 02110-1301, USA. */ |
---|
| 36 | + |
---|
| 37 | +/* Target OS preprocessor built-ins. */ |
---|
| 38 | +#define TARGET_OS_CPP_BUILTINS() \ |
---|
| 39 | + do \ |
---|
| 40 | + { \ |
---|
| 41 | + builtin_define ("__rtems__"); \ |
---|
| 42 | + builtin_assert ("system=rtems"); \ |
---|
| 43 | + } \ |
---|
| 44 | + while (0) |
---|
| 45 | diff -uNr gcc-4.1.1.orig/gcc/config/c4x/rtems.h gcc-4.1.1/gcc/config/c4x/rtems.h |
---|
| 46 | --- gcc-4.1.1.orig/gcc/config/c4x/rtems.h 2005-06-25 03:22:41.000000000 +0200 |
---|
| 47 | +++ gcc-4.1.1/gcc/config/c4x/rtems.h 2007-01-31 09:37:58.000000000 +0100 |
---|
| 48 | @@ -24,6 +24,5 @@ |
---|
| 49 | #define TARGET_OS_CPP_BUILTINS() \ |
---|
| 50 | do { \ |
---|
| 51 | builtin_define ("__rtems__"); \ |
---|
| 52 | - builtin_define ("__USE_INIT_FINI__"); \ |
---|
| 53 | builtin_assert ("system=rtems"); \ |
---|
| 54 | } while (0) |
---|
| 55 | diff -uNr gcc-4.1.1.orig/gcc/config/mips/elf.h gcc-4.1.1/gcc/config/mips/elf.h |
---|
| 56 | --- gcc-4.1.1.orig/gcc/config/mips/elf.h 2005-07-09 10:46:34.000000000 +0200 |
---|
| 57 | +++ gcc-4.1.1/gcc/config/mips/elf.h 2007-01-31 09:37:58.000000000 +0100 |
---|
| 58 | @@ -48,5 +48,3 @@ |
---|
| 59 | |
---|
| 60 | #undef ENDFILE_SPEC |
---|
| 61 | #define ENDFILE_SPEC "crtend%O%s crtn%O%s" |
---|
| 62 | - |
---|
| 63 | -#define NO_IMPLICIT_EXTERN_C 1 |
---|
| 64 | diff -uNr gcc-4.1.1.orig/gcc/config/mips/t-rtems gcc-4.1.1/gcc/config/mips/t-rtems |
---|
| 65 | --- gcc-4.1.1.orig/gcc/config/mips/t-rtems 2005-01-15 09:38:53.000000000 +0100 |
---|
| 66 | +++ gcc-4.1.1/gcc/config/mips/t-rtems 2007-01-31 09:37:58.000000000 +0100 |
---|
| 67 | @@ -1,5 +1,16 @@ |
---|
| 68 | # Custom multilibs for RTEMS |
---|
| 69 | |
---|
| 70 | -MULTILIB_OPTIONS = mips1/mips3/mips32 msoft-float/msingle-float |
---|
| 71 | -MULTILIB_DIRNAMES = mips1 mips3 mips32 soft-float single |
---|
| 72 | -MULTILIB_MATCHES = msingle-float=m4650 |
---|
| 73 | +# default is mips1 EB hard-float |
---|
| 74 | +MULTILIB_OPTIONS = mips1/mips3/mips32 EB/EL msoft-float |
---|
| 75 | +MULTILIB_DIRNAMES = mips1 mips3 mips32 eb el soft-float |
---|
| 76 | +MULTILIB_MATCHES = EL=mel EB=meb |
---|
| 77 | + |
---|
| 78 | +MULTILIB_EXCEPTIONS = |
---|
| 79 | + |
---|
| 80 | +# Big endian only |
---|
| 81 | +MULTILIB_EXCEPTIONS += EL* |
---|
| 82 | +MULTILIB_EXCEPTIONS += mips32/EL* |
---|
| 83 | + |
---|
| 84 | +# Little endian only |
---|
| 85 | +MULTILIB_EXCEPTIONS += mips3 |
---|
| 86 | +MULTILIB_EXCEPTIONS += mips3/msoft-float |
---|
| 87 | diff -uNr gcc-4.1.1.orig/gcc/config.gcc gcc-4.1.1/gcc/config.gcc |
---|
| 88 | --- gcc-4.1.1.orig/gcc/config.gcc 2006-05-09 22:02:29.000000000 +0200 |
---|
| 89 | +++ gcc-4.1.1/gcc/config.gcc 2007-01-31 09:37:58.000000000 +0100 |
---|
| 90 | @@ -761,6 +761,11 @@ |
---|
| 91 | tmake_file=bfin/t-bfin-elf |
---|
| 92 | use_collect2=no |
---|
| 93 | ;; |
---|
| 94 | +bfin*-rtems*) |
---|
| 95 | + tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h" |
---|
| 96 | + tmake_file=bfin/t-bfin-elf |
---|
| 97 | + use_collect2=no |
---|
| 98 | + ;; |
---|
| 99 | bfin*-*) |
---|
| 100 | tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h" |
---|
| 101 | tmake_file=bfin/t-bfin |
---|
| 102 | @@ -1560,7 +1565,7 @@ |
---|
| 103 | tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64" |
---|
| 104 | use_fixproto=yes |
---|
| 105 | ;; |
---|
| 106 | -mips*-*-rtems*) |
---|
| 107 | +mips-*-rtems*) |
---|
| 108 | tm_file="elfos.h ${tm_file} mips/elf.h mips/rtems.h rtems.h" |
---|
| 109 | tmake_file="mips/t-elf t-rtems mips/t-rtems" |
---|
| 110 | ;; |
---|
| 111 | diff -uNr gcc-4.1.1.orig/gcc/Makefile.in gcc-4.1.1/gcc/Makefile.in |
---|
| 112 | --- gcc-4.1.1.orig/gcc/Makefile.in 2006-05-17 20:38:58.000000000 +0200 |
---|
| 113 | +++ gcc-4.1.1/gcc/Makefile.in 2007-02-01 16:39:50.000000000 +0100 |
---|
| 114 | @@ -388,7 +388,10 @@ |
---|
| 115 | CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ |
---|
| 116 | |
---|
| 117 | # autoconf sets SYSTEM_HEADER_DIR to one of the above. |
---|
| 118 | -SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@ |
---|
| 119 | +# Purge it of unneccessary internal relative paths |
---|
| 120 | +# to directories that might not exist yet. |
---|
| 121 | +# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta. |
---|
| 122 | +SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta` |
---|
| 123 | |
---|
| 124 | # Control whether to run fixproto and fixincludes. |
---|
| 125 | STMP_FIXPROTO = @STMP_FIXPROTO@ |
---|
| 126 | @@ -2193,7 +2196,7 @@ |
---|
| 127 | $(TREE_GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(DIAGNOSTIC_H) |
---|
| 128 | ipa-pure-const.o : ipa-pure-const.c $(CONFIG_H) $(SYSTEM_H) \ |
---|
| 129 | coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) tree-inline.h langhooks.h \ |
---|
| 130 | - pointer-set.h $(GGC_H) $(IPA_UTILS_H) $(C_COMMON_H) \ |
---|
| 131 | + pointer-set.h $(GGC_H) $(IPA_UTILS_H) $(C_COMMON_H) $(TARGET_H) \ |
---|
| 132 | $(TREE_GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(DIAGNOSTIC_H) |
---|
| 133 | ipa-type-escape.o : ipa-type-escape.c $(CONFIG_H) $(SYSTEM_H) \ |
---|
| 134 | coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) tree-inline.h langhooks.h \ |
---|
| 135 | @@ -3146,8 +3149,8 @@ |
---|
| 136 | macro_list: s-macro_list; @true |
---|
| 137 | s-macro_list : $(GCC_PASSES) |
---|
| 138 | echo | $(GCC_FOR_TARGET) -E -dM - | \ |
---|
| 139 | - sed -n 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p ; \ |
---|
| 140 | - s/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \ |
---|
| 141 | + sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \ |
---|
| 142 | + -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \ |
---|
| 143 | sort -u > tmp-macro_list |
---|
| 144 | $(SHELL) $(srcdir)/../move-if-change tmp-macro_list macro_list |
---|
| 145 | $(STAMP) s-macro_list |
---|
| 146 | @@ -3167,13 +3170,16 @@ |
---|
| 147 | ../$(build_subdir)/fixincludes/fixincl: ; @ : |
---|
| 148 | |
---|
| 149 | # Build fixed copies of system files. |
---|
| 150 | +# Abort if no system headers available, unless building a crosscompiler. |
---|
| 151 | +# FIXME: abort unless building --without-headers would be more accurate and less ugly |
---|
| 152 | stmp-fixinc: gsyslimits.h macro_list \ |
---|
| 153 | $(build_objdir)/fixincludes/fixincl \ |
---|
| 154 | $(build_objdir)/fixincludes/fixinc.sh |
---|
| 155 | @if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \ |
---|
| 156 | echo The directory that should contain system headers does not exist: >&2 ; \ |
---|
| 157 | echo " ${SYSTEM_HEADER_DIR}" >&2 ; \ |
---|
| 158 | - if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \ |
---|
| 159 | + tooldir_sysinc=`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \ |
---|
| 160 | + if test "x${SYSTEM_HEADER_DIR}" = "x${tooldir_sysinc}"; \ |
---|
| 161 | then sleep 1; else exit 1; fi; \ |
---|
| 162 | fi |
---|
| 163 | rm -rf include; mkdir include |
---|
| 164 | @@ -3616,9 +3622,9 @@ |
---|
| 165 | install-driver: installdirs xgcc$(exeext) |
---|
| 166 | -rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) |
---|
| 167 | -$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) |
---|
| 168 | - -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version) |
---|
| 169 | + -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext) |
---|
| 170 | -( cd $(DESTDIR)$(bindir) && \ |
---|
| 171 | - $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version) ) |
---|
| 172 | + $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) ) |
---|
| 173 | -if [ -f gcc-cross$(exeext) ] ; then \ |
---|
| 174 | if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \ |
---|
| 175 | rm -f $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \ |
---|
| 176 | diff -uNr gcc-4.1.1.orig/Makefile.in gcc-4.1.1/Makefile.in |
---|
| 177 | --- gcc-4.1.1.orig/Makefile.in 2006-04-04 23:03:05.000000000 +0200 |
---|
| 178 | +++ gcc-4.1.1/Makefile.in 2007-01-31 09:37:58.000000000 +0100 |
---|
| 179 | @@ -329,9 +329,9 @@ |
---|
| 180 | # CFLAGS will be just -g. We want to ensure that TARGET libraries |
---|
| 181 | # (which we know are built with gcc) are built with optimizations so |
---|
| 182 | # prepend -O2 when setting CFLAGS_FOR_TARGET. |
---|
| 183 | -CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) |
---|
| 184 | +CFLAGS_FOR_TARGET = $(strip -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)) |
---|
| 185 | SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ |
---|
| 186 | -CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) |
---|
| 187 | +CXXFLAGS_FOR_TARGET = $(strip $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)) |
---|
| 188 | LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) |
---|
| 189 | LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates |
---|
| 190 | LDFLAGS_FOR_TARGET = |
---|