This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RTEMS patch for 2.95.3 branch
- To: gcc-patches at gcc dot gnu dot org, Charles-Antoine Gauthier <charles dot gauthier at iit dot nrc dot ca>, Rosimildo DaSilva <rdasilva at connecttel dot com>
- Subject: RTEMS patch for 2.95.3 branch
- From: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- Date: Sun, 16 Apr 2000 13:56:38 -0500
- Organization: OAR Corporation
- Reply-To: joel dot sherrill at OARcorp dot com
The attached patch is necessary so RTEMS configurations use
ELF and have better support for C++ including recognizing
that RTEMS header files are C++ compatible and to make C++ global
constructors work on more targets. This is derived from
the current RTEMS 2.95.2 patch.
Also attached is a tar.gz of the new files added. Some of these
are to add new rtems elf targets. Others are the ctor/dtor code.
? gcc/config/rtems.h
? gcc/config/i386/t-rtems-i386
? gcc/config/m68k/crti.s
? gcc/config/m68k/crtn.s
? gcc/config/m68k/rtemself.h
? gcc/config/m68k/t-crtstuff
? gcc/config/sparc/rtemself.h
The patch includes the original Changelog entries with dates
that look quite old these days. :(
The patch to the top level Makefile.in modifies the top
level CC_FOR_TARGET rule so it looks at more of the
newlib include files. This is a partial step in the
right direction. I am working on a patch that more fully
addresses this problem.
--
Joel Sherrill, Ph.D. Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
newfiles.tar.gz
? gcc/config/rtems.h
? gcc/config/i386/t-rtems-i386
? gcc/config/m68k/crti.s
? gcc/config/m68k/crtn.s
? gcc/config/m68k/rtemself.h
? gcc/config/m68k/t-crtstuff
? gcc/config/sparc/rtemself.h
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/Makefile.in,v
retrieving revision 1.39.4.2
diff -u -r1.39.4.2 Makefile.in
--- Makefile.in 1999/06/22 22:44:42 1.39.4.2
+++ Makefile.in 2000/04/16 18:42:12
@@ -216,7 +216,7 @@
if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -B$(build_tooldir)/bin/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
else \
- echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
+ echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -B$(build_tooldir)/bin/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
fi; \
else \
echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/; \
Index: gcc/ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ChangeLog,v
retrieving revision 1.3667.4.255
diff -u -r1.3667.4.255 ChangeLog
--- ChangeLog 2000/04/12 16:04:19 1.3667.4.255
+++ ChangeLog 2000/04/16 18:42:22
@@ -544,6 +544,17 @@
* gcc.texi: Use terms "GNU Compiler Collection" and "GCC".
Also update copyright.
+ Wed Jul 28 09:14:33 CDT 1999 Joel Sherrill <joel@OARcorp.com>
+
+ * configure.in (m68k-*-rtemscoff*): Added.
+ * configure.in (mips64orion-*-rtems*): Converted to ELF.
+ * configure.in (sparc-*-rtemsaout*): Added as alias for old
+ sparc-rtems configuration.
+ * configure.in (sparc-*-rtemself*): Added.
+ * configure.in (sparc-*-rtems*): Now ELF not a.out.
+ * config/i386/rtems.h: Added comment.
+ * config/sparc/rtemself.h: New file.
+
Wed Jul 28 21:39:31 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95 Released.
@@ -611,6 +622,16 @@
* configure: Rebuilt.
* alpha/t-ieee: New file.
+Tue Jul 13 20:57:02 1999 Charles-Antoine Gauthier <charles.gauthier@iit.nrc.ca>
+
+ * configure.in (m68k-rtemself): Added.
+ * config/elfos.h: Added ifndef wrapper for DWARF2_DEBUGGING_INFO
+ and DWARF_DEBUGGING_INFO.
+ * config/m68k/crti.s: New file.
+ * config/m68k/crtn.s: New file.
+ * config/m68k/t-crtstuff: New file.
+ * config/m68k/rtemself.h: New file.
+
Tue Jul 13 10:44:14 1999 Jeffrey A Law (law@cygnus.com)
Wed Jun 16 20:29:00 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
@@ -1626,6 +1647,15 @@
* fixinc/hackshell.tpl: Fix mis-applied patch.
* fixinc/inclhack.sh: Regenerated.
+
+Fri May 14 09:28:07 CDT 1999 Rosimildo DaSilva <rdasilva@connecttel.com>
+
+ * configure.in (i[[34567]]86-*-rtemself*): Now uses crtstuff for
+ global ctor/dtor and C++ exception handling.
+ * config/i386/rtemself.h: Now uses crtstuff (crti.o + crtbegin.o)
+ for STARTFILE_SPEC and crtstuff (crtend.o + crtn.o) for
+ ENDFILE_SPEC.
+ * config/i386/t-rtems-i386: New File.
Thu May 13 21:05:55 1999 Mark Kettenis <kettenis@gnu.org>
Index: gcc/configure.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/configure.in,v
retrieving revision 1.246.4.14
diff -u -r1.246.4.14 configure.in
--- configure.in 1999/12/28 20:23:34 1.246.4.14
+++ configure.in 2000/04/16 18:42:22
@@ -1327,14 +1327,15 @@
tmake_file="i386/t-go32 t-rtems"
;;
changequote(,)dnl
- i[34567]86-*-rtemself*)
+ i[34567]86-*-rtems*|i[34567]86-*-rtemself*)
changequote([,])dnl
cpu_type=i386
tm_file=i386/rtemself.h
- tmake_file="i386/t-i386bare t-rtems"
+ extra_parts="crtbegin.o crtend.o crti.o crtn.o"
+ tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
;;
changequote(,)dnl
- i[34567]86-*-rtems*)
+ i[34567]86-*-rtemscoff*)
changequote([,])dnl
cpu_type=i386
tm_file=i386/rtems.h
@@ -2099,13 +2100,18 @@
extra_headers=math-68881.h
float_format=m68k
;;
- m68k-*-rtems*)
+ m68k-*-rtemscoff*)
tmake_file="m68k/t-m68kbare t-rtems"
tm_file=m68k/rtems.h
extra_headers=math-68881.h
float_format=m68k
+ ;;
+ m68k-*-rtemself*|m68k-*-rtems*)
+ tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff"
+ tm_file=m68k/rtemself.h
+ extra_headers=math-68881.h
+ float_format=m68k
;;
-
m88k-dg-dgux*)
case $machine in
m88k-dg-dguxbcs*)
@@ -2630,7 +2636,8 @@
;;
mips64orion-*-rtems*)
tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
- tmake_file="mips/t-ecoff t-rtems"
+ tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
+ tmake_file="mips/t-elf t-rtems"
;;
mipstx39el-*-elf*)
tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
@@ -3074,8 +3081,15 @@
xm_file=sparc/xm-lynx.h
tmake_file=sparc/t-sunos41
xmake_file=x-lynx
+ ;;
+ sparc-*-rtems*|sparc-*-rtemself*)
+ tm_file="sparc/rtemself.h"
+ tmake_file="sparc/t-elf t-rtems"
+ extra_parts="crti.o crtn.o crtbegin.o crtend.o"
+ #float_format=i128
+ float_format=i64
;;
- sparc-*-rtems*)
+ sparc-*-rtemsaout*)
tmake_file="sparc/t-sparcbare t-rtems"
tm_file=sparc/rtems.h
;;
Index: gcc/config/elfos.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/elfos.h,v
retrieving revision 1.5.6.1
diff -u -r1.5.6.1 elfos.h
--- elfos.h 2000/04/12 01:22:51 1.5.6.1
+++ elfos.h 2000/04/16 18:42:23
@@ -69,11 +69,15 @@
/* System V Release 4 uses DWARF debugging info. */
-#define DWARF_DEBUGGING_INFO
+#ifndef DWARF_DEBUGGING_INFO
+#define DWARF_DEBUGGING_INFO 1
+#endif
/* All ELF targets can support DWARF-2. */
-#define DWARF2_DEBUGGING_INFO
+#ifndef DWARF2_DEBUGGING_INFO
+#define DWARF2_DEBUGGING_INFO 1
+#endif
/* Also allow them to support STABS debugging. */
Index: gcc/config/i386/rtems.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/rtems.h,v
retrieving revision 1.7
diff -u -r1.7 rtems.h
--- rtems.h 1998/12/16 21:03:56 1.7
+++ rtems.h 2000/04/16 18:42:23
@@ -32,3 +32,5 @@
#define TARGET_MEM_FUNCTIONS
#endif
+/* Get machine-independent configuration parameters for RTEMS. */
+#include <rtems.h>
Index: gcc/config/i386/rtemself.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/rtemself.h,v
retrieving revision 1.3
diff -u -r1.3 rtemself.h
--- rtemself.h 1998/12/16 21:03:57 1.3
+++ rtemself.h 2000/04/16 18:42:23
@@ -163,7 +163,10 @@
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "crt0.o%s"
+#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
#undef ENDFILE_SPEC
-
+#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
+
+/* Get machine-independent configuration parameters for RTEMS. */
+#include <rtems.h>
Index: gcc/config/i960/rtems.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i960/rtems.h,v
retrieving revision 1.7
diff -u -r1.7 rtems.h
--- rtems.h 1998/12/16 21:05:53 1.7
+++ rtems.h 2000/04/16 18:42:23
@@ -31,3 +31,6 @@
#ifndef TARGET_MEM_FUNCTIONS
#define TARGET_MEM_FUNCTIONS
#endif
+
+/* Get machine-independent configuration parameters for RTEMS. */
+#include <rtems.h>
Index: gcc/config/m68k/rtems.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m68k/rtems.h,v
retrieving revision 1.7
diff -u -r1.7 rtems.h
--- rtems.h 1998/12/16 21:07:15 1.7
+++ rtems.h 2000/04/16 18:42:23
@@ -31,3 +31,6 @@
#ifndef TARGET_MEM_FUNCTIONS
#define TARGET_MEM_FUNCTIONS
#endif
+
+/* Get machine-independent configuration parameters for RTEMS. */
+#include <rtems.h>
Index: gcc/config/mips/rtems64.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/rtems64.h,v
retrieving revision 1.9
diff -u -r1.9 rtems64.h
--- rtems64.h 1999/04/14 10:46:47 1.9
+++ rtems64.h 2000/04/16 18:42:23
@@ -61,3 +61,6 @@
#undef ENDFILE_SPEC
/* End of undefines to turn off .ctor/.dtor section support */
+
+/* Get machine-independent configuration parameters for RTEMS. */
+#include <rtems.h>
Index: gcc/config/pa/rtems.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/pa/rtems.h,v
retrieving revision 1.6
diff -u -r1.6 rtems.h
--- rtems.h 1998/12/16 21:11:13 1.6
+++ rtems.h 2000/04/16 18:42:23
@@ -29,3 +29,6 @@
#ifndef TARGET_MEM_FUNCTIONS
#define TARGET_MEM_FUNCTIONS
#endif
+
+/* Get machine-independent configuration parameters for RTEMS. */
+#include <rtems.h>
Index: gcc/config/rs6000/rtems.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rtems.h,v
retrieving revision 1.8
diff -u -r1.8 rtems.h
--- rtems.h 1998/12/16 21:12:14 1.8
+++ rtems.h 2000/04/16 18:42:23
@@ -35,4 +35,5 @@
#undef STARTFILE_DEFAULT_SPEC
#define STARTFILE_DEFAULT_SPEC "crt0.o%s"
-/* end of rs6000/rtems.h */
+/* Get machine-independent configuration parameters for RTEMS. */
+#include <rtems.h>
Index: gcc/config/sh/rtems.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/sh/rtems.h,v
retrieving revision 1.9
diff -u -r1.9 rtems.h
--- rtems.h 1999/01/20 05:12:07 1.9
+++ rtems.h 2000/04/16 18:42:23
@@ -32,4 +32,5 @@
#define TARGET_MEM_FUNCTIONS
#endif
-/* end of sh/rtems.h */
+/* Get machine-independent configuration parameters for RTEMS. */
+#include <rtems.h>
Index: gcc/config/sh/rtemself.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/sh/rtemself.h,v
retrieving revision 1.3
diff -u -r1.3 rtemself.h
--- rtemself.h 1999/01/20 06:56:14 1.3
+++ rtemself.h 2000/04/16 18:42:23
@@ -31,3 +31,6 @@
#ifndef TARGET_MEM_FUNCTIONS
#define TARGET_MEM_FUNCTIONS
#endif
+
+/* Get machine-independent configuration parameters for RTEMS. */
+#include <rtems.h>
Index: gcc/config/sparc/rtems.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/sparc/rtems.h,v
retrieving revision 1.7
diff -u -r1.7 rtems.h
--- rtems.h 1998/12/16 21:13:20 1.7
+++ rtems.h 2000/04/16 18:42:23
@@ -32,4 +32,5 @@
#define TARGET_MEM_FUNCTIONS
#endif
-/* end of sparc/rtems.h */
+/* Get machine-independent configuration parameters for RTEMS. */
+#include <rtems.h>