source: rtems/contrib/crossrpms/patches/gcc-core-4.1.1-rtems4.8-20070102.diff @ 92b61a71

4.104.114.84.9
Last change on this file since 92b61a71 was 227afd10, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jan 2, 2007 at 10:44:12 AM

New.

  • Property mode set to 100644
File size: 5.8 KB
RevLine 
[227afd10]1diff -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-02 10:09:16.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 
12diff -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-02 10:09:16.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)
45diff -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-02 10:09:16.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)
55diff -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-02 10:09:16.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
64diff -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-02 10:09:16.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
87diff -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-02 10:09:16.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        ;;
111diff -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-01-02 10:09:16.000000000 +0100
114@@ -3616,9 +3616,9 @@
115 install-driver: installdirs xgcc$(exeext)
116        -rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
117        -$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
118-       -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)
119+       -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext)
120        -( cd $(DESTDIR)$(bindir) && \
121-          $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version) )
122+          $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) )
123        -if [ -f gcc-cross$(exeext) ] ; then \
124          if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
125            rm -f $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
126diff -uNr gcc-4.1.1.orig/Makefile.in gcc-4.1.1/Makefile.in
127--- gcc-4.1.1.orig/Makefile.in  2006-04-04 23:03:05.000000000 +0200
128+++ gcc-4.1.1/Makefile.in       2007-01-02 10:11:36.000000000 +0100
129@@ -329,9 +329,9 @@
130 # CFLAGS will be just -g.  We want to ensure that TARGET libraries
131 # (which we know are built with gcc) are built with optimizations so
132 # prepend -O2 when setting CFLAGS_FOR_TARGET.
133-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
134+CFLAGS_FOR_TARGET = $(strip -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
135 SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
136-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
137+CXXFLAGS_FOR_TARGET = $(strip $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
138 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
139 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
140 LDFLAGS_FOR_TARGET =
Note: See TracBrowser for help on using the repository browser.