public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [bfin, patch] Adding bfin*-rtems*
@ 2007-01-08  6:28 Ralf Corsepius
  2007-01-08 11:30 ` Bernd Schmidt
  0 siblings, 1 reply; 7+ messages in thread
From: Ralf Corsepius @ 2007-01-08  6:28 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 128 bytes --]

Hi,

I'd like to add the patch below to svn-trunk and gcc-4_2-branch.

This patch adds a new target: bfin*-rtems*.

TIA,
	Ralf


[-- Attachment #2: gcc-bfin-rtems.diff --]
[-- Type: text/x-patch, Size: 2269 bytes --]

2007-01-08  Ralf Corsépius <ralf.corsepius@rtems.org>

	* config/bfin/rtems.h, config/bfin/t-rtems: New.
	* config.gcc: Add bfin*-rtems*.

Index: config.gcc
===================================================================
--- config.gcc	(revision 120570)
+++ config.gcc	(working copy)
@@ -801,6 +801,10 @@
         tmake_file=bfin/t-bfin-elf
         use_collect2=no
         ;;
+bfin*-rtems*)
+	tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h"
+	tmake_file="bfin/t-bfin t-rtems bfin/t-rtems"
+        ;;
 bfin*-*)
 	tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h"
         tmake_file=bfin/t-bfin
Index: config/bfin/rtems.h
===================================================================
--- config/bfin/rtems.h	(revision 0)
+++ config/bfin/rtems.h	(revision 0)
@@ -0,0 +1,29 @@
+/* Definitions for rtems targeting a bfin
+   Copyright (C) 2007 Free Software Foundation, Inc.
+   Contributed by Ralf Corsépius (ralf.corsepius@rtems.org).
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
+
+/* Target OS preprocessor built-ins.  */
+#define TARGET_OS_CPP_BUILTINS()		\
+  do						\
+    {						\
+      builtin_define ("__rtems__");		\
+      builtin_assert ("system=rtems");		\
+    }						\
+  while (0)
Index: config/bfin/t-rtems
===================================================================
--- config/bfin/t-rtems	(revision 0)
+++ config/bfin/t-rtems	(revision 0)
@@ -0,0 +1,6 @@
+# Multilibs for fbin RTEMS targets.
+
+MULTILIB_OPTIONS	=
+MULTILIB_DIRNAMES	=
+MULTILIB_EXTRA_OPTS	=
+MULTILIB_EXCEPTIONS 	=

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [bfin, patch] Adding bfin*-rtems*
  2007-01-08  6:28 [bfin, patch] Adding bfin*-rtems* Ralf Corsepius
@ 2007-01-08 11:30 ` Bernd Schmidt
  2007-01-08 14:32   ` Ralf Corsepius
  0 siblings, 1 reply; 7+ messages in thread
From: Bernd Schmidt @ 2007-01-08 11:30 UTC (permalink / raw)
  To: Ralf Corsepius; +Cc: GCC Patches

Ralf Corsepius wrote:

> I'd like to add the patch below to svn-trunk and gcc-4_2-branch.
> 
> This patch adds a new target: bfin*-rtems*.

This is OK.  I'd just like to mention that I can't test that target, so 
changes I make in the future may accidentally break it.


Bernd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [bfin, patch] Adding bfin*-rtems*
  2007-01-08 11:30 ` Bernd Schmidt
@ 2007-01-08 14:32   ` Ralf Corsepius
  2007-01-08 18:32     ` Ian Lance Taylor
  0 siblings, 1 reply; 7+ messages in thread
From: Ralf Corsepius @ 2007-01-08 14:32 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: GCC Patches

On Mon, 2007-01-08 at 12:29 +0100, Bernd Schmidt wrote:
> Ralf Corsepius wrote:
> 
> > I'd like to add the patch below to svn-trunk and gcc-4_2-branch.
> > 
> > This patch adds a new target: bfin*-rtems*.
> 
> This is OK. 
Thanks, patches applied.

>  I'd just like to mention that I can't test that target, so 
> changes I make in the future may accidentally break it.

Shouldn't be much of a problem, bfin-rtems* is almost identical to
bfin-elf. So should we encounter a problem (There are several :-) ),
it will probably also apply to bfin-elf and vice-versa.


BTW:

Can you explain what the 
GCC_CFLAGS += -N
in gcc/config/bfin/t-bfin* is trying to resolve?

I could not find any thing on "-N" in gcc's docs, nor in binutils.

Ralf


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [bfin, patch] Adding bfin*-rtems*
  2007-01-08 14:32   ` Ralf Corsepius
@ 2007-01-08 18:32     ` Ian Lance Taylor
  2007-01-09 22:09       ` Bernd Schmidt
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Lance Taylor @ 2007-01-08 18:32 UTC (permalink / raw)
  To: Ralf Corsepius; +Cc: Bernd Schmidt, GCC Patches

Ralf Corsepius <ralf.corsepius@rtems.org> writes:

> Can you explain what the 
> GCC_CFLAGS += -N
> in gcc/config/bfin/t-bfin* is trying to resolve?
> 
> I could not find any thing on "-N" in gcc's docs, nor in binutils.

-N is a linker option.  If you use -N on the gcc command line, gcc
will pass it to the linker.

(I don't know why bfin uses it.)

Ian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [bfin, patch] Adding bfin*-rtems*
  2007-01-08 18:32     ` Ian Lance Taylor
@ 2007-01-09 22:09       ` Bernd Schmidt
  2007-01-10  4:36         ` Ralf Corsepius
  0 siblings, 1 reply; 7+ messages in thread
From: Bernd Schmidt @ 2007-01-09 22:09 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Ralf Corsepius, GCC Patches

Ian Lance Taylor wrote:
> -N is a linker option.  If you use -N on the gcc command line, gcc
> will pass it to the linker.
> 
> (I don't know why bfin uses it.)

Historical baggage, most likely.  Parts of the port are quite old and 
copied from other ports.


Bernd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [bfin, patch] Adding bfin*-rtems*
  2007-01-09 22:09       ` Bernd Schmidt
@ 2007-01-10  4:36         ` Ralf Corsepius
  2007-01-10 13:00           ` Bernd Schmidt
  0 siblings, 1 reply; 7+ messages in thread
From: Ralf Corsepius @ 2007-01-10  4:36 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: Ian Lance Taylor, GCC Patches

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

On Tue, 2007-01-09 at 23:08 +0100, Bernd Schmidt wrote:
> Ian Lance Taylor wrote:
> > -N is a linker option.  If you use -N on the gcc command line, gcc
> > will pass it to the linker.
> > 
> > (I don't know why bfin uses it.)
>
> Historical baggage, most likely.

OK, so would you be opposed to removing it? We already are using the
patch below for bfin-rtems* for quite a while, but I am sure if we are
correct in doing so (We are using binutils-2.17)

Do you have any idea in which version of binutils the bug the comments
in t-bfin* refer to has been addressed?

>   Parts of the port are quite old and 
> copied from other ports.
I suspected as much but wasn't sure ;)

Ralf




[-- Attachment #2: diff --]
[-- Type: text/x-patch, Size: 1062 bytes --]

Index: config/bfin/t-bfin
===================================================================
--- config/bfin/t-bfin	(revision 120631)
+++ config/bfin/t-bfin	(working copy)
@@ -15,10 +15,6 @@
 	echo '#define FLOAT' > fp-bit.c
 	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
 
-# This shouldn't be needed here.  I added it to the specs file for now, until
-# it is fixed in binutils (if it is necessary).
-GCC_CFLAGS += -N
-
 # Assemble startup files.
 $(T)crti.o: $(srcdir)/config/bfin/crti.s $(GCC_PASSES)
 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
Index: config/bfin/t-bfin-elf
===================================================================
--- config/bfin/t-bfin-elf	(revision 120631)
+++ config/bfin/t-bfin-elf	(working copy)
@@ -15,10 +15,6 @@
 	echo '#define FLOAT' > fp-bit.c
 	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
 
-# This shouldn't be needed here.  I added it to the specs file for now, until
-# it is fixed in binutils (if it is necessary).
-GCC_CFLAGS += -N
-
 CRTSTUFF_T_CFLAGS = -fpic
 TARGET_LIBGCC2_CFLAGS = -fpic
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [bfin, patch] Adding bfin*-rtems*
  2007-01-10  4:36         ` Ralf Corsepius
@ 2007-01-10 13:00           ` Bernd Schmidt
  0 siblings, 0 replies; 7+ messages in thread
From: Bernd Schmidt @ 2007-01-10 13:00 UTC (permalink / raw)
  To: Ralf Corsepius; +Cc: Ian Lance Taylor, GCC Patches

Ralf Corsepius wrote:
> On Tue, 2007-01-09 at 23:08 +0100, Bernd Schmidt wrote:
>> Ian Lance Taylor wrote:
>>> -N is a linker option.  If you use -N on the gcc command line, gcc
>>> will pass it to the linker.
>>>
>>> (I don't know why bfin uses it.)
>> Historical baggage, most likely.
> 
> OK, so would you be opposed to removing it? We already are using the
> patch below for bfin-rtems* for quite a while, but I am sure if we are
> correct in doing so (We are using binutils-2.17)

Sure, please install.  We'll re-add it if anything breaks.

> Do you have any idea in which version of binutils the bug the comments
> in t-bfin* refer to has been addressed?

I don't even have an idea of what the bug is (if any).


Bernd

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-01-10 13:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-08  6:28 [bfin, patch] Adding bfin*-rtems* Ralf Corsepius
2007-01-08 11:30 ` Bernd Schmidt
2007-01-08 14:32   ` Ralf Corsepius
2007-01-08 18:32     ` Ian Lance Taylor
2007-01-09 22:09       ` Bernd Schmidt
2007-01-10  4:36         ` Ralf Corsepius
2007-01-10 13:00           ` Bernd Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).