|
Message
From: Heiko Panther <heiko.panther@w...>
Date: Wed, 12 Nov 2003 12:27:26 +0100
Subject: Re: [openrisc] eCos on OpenRISC
Matjaz,
in order to compile the libc++ for eCos, I had to make a small
modification in the gcc target config. See the attached diff.
Basically, I separated the elf and rtems targets a little. AFAIR rtems
uses COFF anyway, but it definitely made no sense to do any rtems
definitions in the generic elf target. I tried to leave things as they
were for rtems, still this change should probably be checked by some
rtems person.
diff -ur gcc-3.2.3/gcc/config/or32/elf.h gcc-3.2.3-new/gcc/config/or32/elf.h
--- gcc-3.2.3/gcc/config/or32/elf.h Tue May 6 06:52:20 2003
+++ gcc-3.2.3-new/gcc/config/or32/elf.h Mon Oct 27 15:37:33 2003
@@ -41,13 +41,9 @@
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-DOR1K -Dor1k -D__or1k__ -D__OR1K__ \
- -Drtems -D__rtems__ -Asystem(rtems) -Acpu(or1k) -Amachine(or1k)"
+ -Acpu(or1k) -Amachine(or1k)"
/* Generate calls to memcpy, memcmp and memset. */
#ifndef TARGET_MEM_FUNCTIONS
#define TARGET_MEM_FUNCTIONS
#endif
-
-/* Get machine-independent configuration parameters for RTEMS. */
-#include <rtems.h>
-
diff -ur gcc-3.2.3/gcc/config/or32/rtems.h gcc-3.2.3-new/gcc/config/or32/rtems.h
--- gcc-3.2.3/gcc/config/or32/rtems.h Tue May 6 06:52:22 2003
+++ gcc-3.2.3-new/gcc/config/or32/rtems.h Tue Oct 21 18:22:08 2003
@@ -19,6 +19,38 @@
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+/* Hacking report: hpanther */
+/* When I started work on this, doing a or32-elf cross compiler for Mac OS X,
+config.gcc contained identical instructions for or32-*-rtems* and or32-*-elf*:
+tm_file="dbxelf.h elfos.h or32/or32.h or32/elf.h"
+I don't understand everything yet, but the following things make no sense:
+- rtems includes the elf header, but then states at the bottom of this file
+(/or32/rtems.h) that rtems uses coff.
+- elf.h includes this file.
+So I'm separating both. In the hope of leaving for rtems everything the way it is
+now, I include the parts from elf.h here, modify elf.h so it does not define
+rtems-related macros anymore, and let config.gcc refer to this file for rtems.
+The stuff from elf.h will be all lines from here to the "end hpanther" comment.
+*/
+#undef TARGET_VERSION
+#define TARGET_VERSION fputs (" (OR32/ELF)", stderr);
+
+/* Use ELF */
+#undef OBJECT_FORMAT_ELF
+#define OBJECT_FORMAT_ELF
+
+#undef DBX_DEBUGGING_INFO
+#define DBX_DEBUGGING_INFO
+
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+
+#undef PUT_SDB_DEF
+#define PUT_SDB_DEF
+/* end hpanther */
+
+
+
/* Specify predefined symbols in preprocessor. */
#undef CPP_PREDEFINES
Only in gcc-3.2.3-new/gcc/config/rs6000: .DS_Store
diff -ur gcc-3.2.3/gcc/config.gcc gcc-3.2.3-new/gcc/config.gcc
--- gcc-3.2.3/gcc/config.gcc Tue May 6 06:34:16 2003
+++ gcc-3.2.3-new/gcc/config.gcc Tue Oct 21 18:23:52 2003
@@ -2727,8 +2727,9 @@
tmake_file="or32/t-default"
xmake_file=or32/x-default
;;
+# hpanther: modified or32/elf.h to or32/rtems.h, see comment in or32/rtems.h
or32-*-rtems*)
- tm_file="dbxelf.h elfos.h or32/or32.h or32/elf.h"
+ tm_file="dbxelf.h elfos.h or32/or32.h or32/rtems.h"
tmake_file="or32/t-default t-rtems"
xmake_file=or32/x-default
if test x$enable_threads = xyes; then
|
 |