This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
egcs-19980628 patch for *-rtems
- To: egcs at cygnus dot com
- Subject: egcs-19980628 patch for *-rtems
- From: Joel Sherrill <joel at OARcorp dot com>
- Date: Tue, 7 Jul 1998 15:51:37 -0500 (CDT)
Version: egcs-19980628
Host: i686-pc-linux-gnu (Redhat 5.0)
Below my signature is a patch which updates egcs 19980628 so it can
successfully build of the following targets:
hppa1.1-rtems
i386-rtems
i386-elf-rtems
i386-go32-rtems
i960-rtems
m68k-rtems
powerpc-rtems
sh-rtems
sh-elf-rtems
sparc-rtems
In addition to my patches, I have had to incorporate two others to
get all of the above targets to build:
1. Manfred Hollstein's <manfred@s-direktnet.de> patch to
libstdc++/configure.in:
* configure.in (INSTALLDIR): Make sed pattern failsafe.
2. Jeff Law's (law@cygnus.com) suggestion to comment out
LEGITIMIZE_RELOAD_ADDRESS in config/pa/pa.h.
Even with all of this mips64orion-rtems still fails with the library
endianness problem during libgcc1-test.
Thanks.
--joel
Joel Sherrill Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (205) 722-9985
Tue Jul 7 14:08:17 CDT 1998 Joel Sherrill <joel@OARcorp.com>
* config/i386/i386-coff.h: Defined ASM_OUTPUT_ALIGN to support
alignment to a power of 2. Definition copied from go32.h.
Tue Jul 7 14:08:17 CDT 1998 Joel Sherrill <joel@OARcorp.com>
* config/i386/rtemself.h: Updated to keep in sync with
config/i386/linux.h.
Thu Mar 26 08:21:23 CST 1998 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.in: Added sh-rtemself.
* config/sh/rtems.h: Removed -D__ELF__ since it is now COFF.
Tue Mar 24 12:25:13 CST 1998 Joel Sherrill (joel@OARcorp.com)
* config/rs6000/rtems.h: Defined STARTFILE_DEFAULT_SPEC.
diff -N -P -r -c egcs-19980628.orig/gcc/config/i386/i386-coff.h egcs-19980628/gcc/config/i386/i386-coff.h
*** egcs-19980628.orig/gcc/config/i386/i386-coff.h Mon Aug 11 10:57:16 1997
--- egcs-19980628/gcc/config/i386/i386-coff.h Tue Jul 7 08:51:04 1998
***************
*** 31,36 ****
--- 31,44 ----
#undef DBX_DEBUGGING_INFO
#define SDB_DEBUGGING_INFO
+ /* This is how to output an assembler line
+ that says to advance the location counter
+ to a multiple of 2**LOG bytes. */
+
+ #undef ASM_OUTPUT_ALIGN
+ #define ASM_OUTPUT_ALIGN(FILE,LOG) \
+ if ((LOG) != 0) fprintf ((FILE), "\t.p2align %d\n", LOG)
+
/* Support the ctors and dtors sections for g++. */
#define CTORS_SECTION_ASM_OP ".section\t.ctors,\"x\""
diff -N -P -r -c egcs-19980628.orig/gcc/config/i386/rtemself.h egcs-19980628/gcc/config/i386/rtemself.h
*** egcs-19980628.orig/gcc/config/i386/rtemself.h Tue May 5 15:51:45 1998
--- egcs-19980628/gcc/config/i386/rtemself.h Mon Jul 6 11:47:01 1998
***************
*** 41,52 ****
This is only used for PIC code. See comments by the `casesi' insn in
i386.md for an explanation of the expression this outputs. */
#undef ASM_OUTPUT_ADDR_DIFF_ELT
! #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \
fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
/* Indicate that jump tables go in the text section. This is
necessary when compiling PIC code. */
! #define JUMP_TABLES_IN_TEXT_SECTION
/* Copy this from the svr4 specifications... */
/* Define the register numbers to be used in Dwarf debugging information.
--- 41,52 ----
This is only used for PIC code. See comments by the `casesi' insn in
i386.md for an explanation of the expression this outputs. */
#undef ASM_OUTPUT_ADDR_DIFF_ELT
! #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
/* Indicate that jump tables go in the text section. This is
necessary when compiling PIC code. */
! #define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
/* Copy this from the svr4 specifications... */
/* Define the register numbers to be used in Dwarf debugging information.
diff -N -P -r -c egcs-19980628.orig/gcc/config/rs6000/rtems.h egcs-19980628/gcc/config/rs6000/rtems.h
*** egcs-19980628.orig/gcc/config/rs6000/rtems.h Tue Mar 24 18:03:17 1998
--- egcs-19980628/gcc/config/rs6000/rtems.h Thu Jul 2 15:12:41 1998
***************
*** 32,35 ****
--- 32,38 ----
#define TARGET_MEM_FUNCTIONS
#endif
+ #undef STARTFILE_DEFAULT_SPEC
+ #define STARTFILE_DEFAULT_SPEC "crt0.o%s"
+
/* end of rs6000/rtems.h */
diff -N -P -r -c egcs-19980628.orig/gcc/config/sh/rtems.h egcs-19980628/gcc/config/sh/rtems.h
*** egcs-19980628.orig/gcc/config/sh/rtems.h Tue Mar 24 18:03:18 1998
--- egcs-19980628/gcc/config/sh/rtems.h Thu Jul 2 15:13:11 1998
***************
*** 1,4 ****
! /* Definitions for rtems targeting a SH using elf.
Copyright (C) 1997 Free Software Foundation, Inc.
Contributed by Joel Sherrill (joel@OARcorp.com).
--- 1,4 ----
! /* Definitions for rtems targeting a SH using COFF.
Copyright (C) 1997 Free Software Foundation, Inc.
Contributed by Joel Sherrill (joel@OARcorp.com).
***************
*** 24,33 ****
/* Specify predefined symbols in preprocessor. */
#undef CPP_PREDEFINES
! #define CPP_PREDEFINES "-D__sh__ -D__ELF__ -Drtems -D__rtems__ \
-Asystem(rtems) -Acpu(sh) -Amachine(sh)"
/* Generate calls to memcpy, memcmp and memset. */
#ifndef TARGET_MEM_FUNCTIONS
#define TARGET_MEM_FUNCTIONS
#endif
--- 24,35 ----
/* Specify predefined symbols in preprocessor. */
#undef CPP_PREDEFINES
! #define CPP_PREDEFINES "-D__sh__ -Drtems -D__rtems__ \
-Asystem(rtems) -Acpu(sh) -Amachine(sh)"
/* Generate calls to memcpy, memcmp and memset. */
#ifndef TARGET_MEM_FUNCTIONS
#define TARGET_MEM_FUNCTIONS
#endif
+
+ /* end of sh/rtems.h */
diff -N -P -r -c egcs-19980628.orig/gcc/config/sh/rtemself.h egcs-19980628/gcc/config/sh/rtemself.h
*** egcs-19980628.orig/gcc/config/sh/rtemself.h Wed Dec 31 18:00:00 1969
--- egcs-19980628/gcc/config/sh/rtemself.h Thu Jul 2 15:05:34 1998
***************
*** 0 ****
--- 1,33 ----
+ /* Definitions for rtems targeting a SH using elf.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (joel@OARcorp.com).
+
+ This file is part of GNU CC.
+
+ GNU CC 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 2, or (at your option)
+ any later version.
+
+ GNU CC 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 GNU CC; see the file COPYING. If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+ #include "sh/elf.h"
+
+ /* Specify predefined symbols in preprocessor. */
+
+ #undef CPP_PREDEFINES
+ #define CPP_PREDEFINES "-D__sh__ -D__ELF__ -Drtems -D__rtems__ \
+ -Asystem(rtems) -Acpu(sh) -Amachine(sh)"
+
+ /* Generate calls to memcpy, memcmp and memset. */
+ #ifndef TARGET_MEM_FUNCTIONS
+ #define TARGET_MEM_FUNCTIONS
+ #endif
diff -N -P -r -c egcs-19980628.orig/gcc/configure.in egcs-19980628/gcc/configure.in
*** egcs-19980628.orig/gcc/configure.in Fri Jun 26 12:07:28 1998
--- egcs-19980628/gcc/configure.in Thu Jul 2 15:05:35 1998
***************
*** 2502,2507 ****
--- 2502,2512 ----
tm_file=sh/elf.h
float_format=sh
;;
+ sh-*-rtemself*)
+ tmake_file="sh/t-sh t-rtems"
+ tm_file=sh/rtemself.h
+ float_format=sh
+ ;;
sh-*-rtems*)
tmake_file="sh/t-sh t-rtems"
tm_file=sh/rtems.h
diff -N -P -r -c egcs-19980628.orig/libstdc++/ChangeLog egcs-19980628/libstdc++/ChangeLog
*** egcs-19980628.orig/libstdc++/ChangeLog Wed Jun 24 01:26:01 1998
--- egcs-19980628/libstdc++/ChangeLog Mon Jul 6 08:40:23 1998
***************
*** 1,3 ****
--- 1,7 ----
+ 1998-07-06 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * configure.in (INSTALLDIR): Make sed pattern failsafe.
+
1998-06-24 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (INSTALLDIR): Add comment to document the fact,
diff -N -P -r -c egcs-19980628.orig/libstdc++/configure.in egcs-19980628/libstdc++/configure.in
*** egcs-19980628.orig/libstdc++/configure.in Wed Mar 4 18:28:14 1998
--- egcs-19980628/libstdc++/configure.in Mon Jul 6 08:40:51 1998
***************
*** 100,106 ****
if [ -n "${with_cross_host}" ] ; then
rm -f Makefile.tem
sed \
! -e 's|INSTALLDIR.*=.*$|INSTALLDIR = $(tooldir)/lib|' \
Makefile >Makefile.tem
mv -f Makefile.tem Makefile
fi
--- 100,106 ----
if [ -n "${with_cross_host}" ] ; then
rm -f Makefile.tem
sed \
! -e 's|\(INSTALLDIR[ ]*=[ ]*\)[^ ;]*|\1$(tooldir)/lib|' \
Makefile >Makefile.tem
mv -f Makefile.tem Makefile
fi