public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Ada on ARM
@ 2005-11-21 16:14 Frédéric PRACA
  2005-11-21 17:26 ` Ralf Corsepius
  0 siblings, 1 reply; 9+ messages in thread
From: Frédéric PRACA @ 2005-11-21 16:14 UTC (permalink / raw)
  To: gcc

Hi,
I'm currently trying to build an Ada cross compiler for ARM using the arm-rtems
target. I tried with GCC 4.0.2 and subversion-version but I failed.
What should I know to do this knowing that I already built the C and C++
cross-compilers ?

Thanks

Fred

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

* Re: Ada on ARM
  2005-11-21 16:14 Ada on ARM Frédéric PRACA
@ 2005-11-21 17:26 ` Ralf Corsepius
  2005-11-21 18:08   ` Joel Sherrill <joel@OARcorp.com>
  0 siblings, 1 reply; 9+ messages in thread
From: Ralf Corsepius @ 2005-11-21 17:26 UTC (permalink / raw)
  To: Frédéric PRACA; +Cc: Joel Sherrill, gcc

On Mon, 2005-11-21 at 17:14 +0100, Frédéric PRACA wrote:
> Hi,
> I'm currently trying to build an Ada cross compiler for ARM using the arm-rtems
> target. I tried with GCC 4.0.2 and subversion-version but I failed.
> What should I know to do this knowing that I already built the C and C++
> cross-compilers ?

1. Replace your host compiler with the same version you want to build
cross (Ada requirement).

2. The standard RTEMS toolchains are multilib'ed, Gnatlib in gcc-4.0.x
doesn't support multilibs 
=> The only chance you have is to build a non-multilib'ed custom
RTEMS-GCC.

3. GNAT from GCC < 4.0.2 did not support the arm. I haven't tried
gcc-4.0.2 and don't know if anybody has meanwhile added arm-support to
GNAT.

All in all, I think you've lost ... :(

Ralf


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

* Re: Ada on ARM
  2005-11-21 17:26 ` Ralf Corsepius
@ 2005-11-21 18:08   ` Joel Sherrill <joel@OARcorp.com>
  2005-11-21 18:26     ` Frédéric PRACA
  2005-11-21 19:16     ` Laurent GUERBY
  0 siblings, 2 replies; 9+ messages in thread
From: Joel Sherrill <joel@OARcorp.com> @ 2005-11-21 18:08 UTC (permalink / raw)
  To: Ralf Corsepius; +Cc: Frédéric PRACA, gcc, Laurent GUERBY

Ralf Corsepius wrote:
> On Mon, 2005-11-21 at 17:14 +0100, Frédéric PRACA wrote:
> 
>>Hi,
>>I'm currently trying to build an Ada cross compiler for ARM using the arm-rtems
>>target. I tried with GCC 4.0.2 and subversion-version but I failed.
>>What should I know to do this knowing that I already built the C and C++
>>cross-compilers ?
> 
> 
> 1. Replace your host compiler with the same version you want to build
> cross (Ada requirement).

Definitely critical to any success.

> 2. The standard RTEMS toolchains are multilib'ed, Gnatlib in gcc-4.0.x
> doesn't support multilibs 
> => The only chance you have is to build a non-multilib'ed custom
> RTEMS-GCC.

Instructions from Laurent Guerby are on the RTEMS Wiki.

http://www.rtems.com/wiki/index.php/RTEMSAda

> 3. GNAT from GCC < 4.0.2 did not support the arm. I haven't tried
> gcc-4.0.2 and don't know if anybody has meanwhile added arm-support to
> GNAT.

arm-rtems4.7 does build C, C++, and Ada on the gcc SVN head.  I have 
done no testing beyond that.

> All in all, I think you've lost ... :(

Even if you get a compiler from the head to compile, the gnat tools
seem to misparse target names with a version in them.  You would have to 
compile for arm-rtems to even have a prayer.


> Ralf

--joel

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

* Re: Ada on ARM
  2005-11-21 18:08   ` Joel Sherrill <joel@OARcorp.com>
@ 2005-11-21 18:26     ` Frédéric PRACA
  2005-11-21 19:16     ` Laurent GUERBY
  1 sibling, 0 replies; 9+ messages in thread
From: Frédéric PRACA @ 2005-11-21 18:26 UTC (permalink / raw)
  To: joel.sherrill; +Cc: Ralf Corsepius, gcc, Laurent GUERBY

Selon "Joel Sherrill <joel@OARcorp.com>" <joel.sherrill@OARcorp.com>:

> Ralf Corsepius wrote:
> > On Mon, 2005-11-21 at 17:14 +0100, Frédéric PRACA wrote:
> >
> >>Hi,
> >>I'm currently trying to build an Ada cross compiler for ARM using the
> arm-rtems
> >>target. I tried with GCC 4.0.2 and subversion-version but I failed.
> >>What should I know to do this knowing that I already built the C and C++
> >>cross-compilers ?
> >
> >
> > 1. Replace your host compiler with the same version you want to build
> > cross (Ada requirement).
>
> Definitely critical to any success.
Well, I tried to build a svn-version croos compiler with a 4.0.2 version of GCC.
Will try again tonight after building a whole svn GCC.

> > 2. The standard RTEMS toolchains are multilib'ed, Gnatlib in gcc-4.0.x
> > doesn't support multilibs
> > => The only chance you have is to build a non-multilib'ed custom
> > RTEMS-GCC.
>
> Instructions from Laurent Guerby are on the RTEMS Wiki.
>
> http://www.rtems.com/wiki/index.php/RTEMSAda
That's already my handbook ;-)

> > 3. GNAT from GCC < 4.0.2 did not support the arm. I haven't tried
> > gcc-4.0.2 and don't know if anybody has meanwhile added arm-support to
> > GNAT.
>
> arm-rtems4.7 does build C, C++, and Ada on the gcc SVN head.  I have
> done no testing beyond that.
If you managed, I hope I'll do too.

> > All in all, I think you've lost ... :(
>
> Even if you get a compiler from the head to compile, the gnat tools
> seem to misparse target names with a version in them.  You would have to
> compile for arm-rtems to even have a prayer.
I didn't want to compile with the release number anyway.
> --joel
Thanks again.

Fred

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

* Re: Ada on ARM
  2005-11-21 18:08   ` Joel Sherrill <joel@OARcorp.com>
  2005-11-21 18:26     ` Frédéric PRACA
@ 2005-11-21 19:16     ` Laurent GUERBY
  2005-11-21 19:35       ` Frédéric PRACA
  2005-11-21 19:41       ` Joel Sherrill <joel@OARcorp.com>
  1 sibling, 2 replies; 9+ messages in thread
From: Laurent GUERBY @ 2005-11-21 19:16 UTC (permalink / raw)
  To: joel.sherrill; +Cc: Ralf Corsepius, frederic.praca, gcc

On Mon, 2005-11-21 at 12:15 -0600, Joel Sherrill  wrote:
> arm-rtems4.7 does build C, C++, and Ada on the gcc SVN head.  I have 
> done no testing beyond that.

Is there a simulator for arm? Frederic do you have a testing
environment in mind? What "--enable-rtemsbsp=X" should I use?

I'm building up to GCC for arm-rtems4.7 right now.

Laurent


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

* Re: Ada on ARM
  2005-11-21 19:16     ` Laurent GUERBY
@ 2005-11-21 19:35       ` Frédéric PRACA
  2005-11-21 19:43         ` Joel Sherrill <joel@OARcorp.com>
  2005-11-21 19:41       ` Joel Sherrill <joel@OARcorp.com>
  1 sibling, 1 reply; 9+ messages in thread
From: Frédéric PRACA @ 2005-11-21 19:35 UTC (permalink / raw)
  To: Laurent GUERBY; +Cc: joel.sherrill, Ralf Corsepius, gcc

Selon Laurent GUERBY <laurent@guerby.net>:

> On Mon, 2005-11-21 at 12:15 -0600, Joel Sherrill  wrote:
> > arm-rtems4.7 does build C, C++, and Ada on the gcc SVN head.  I have
> > done no testing beyond that.
>
> Is there a simulator for arm? Frederic do you have a testing
> environment in mind? What "--enable-rtemsbsp=X" should I use?
Well, I plan to use Skyeye for simulation. The target is an ep9312 from Cirrus
Logic. Even if I didn't manage to compile the edb7312 support, I wanted to read
how it was made to try to port RTEMS on ep9312. I think this should be a good
study for me.
I just had a quick to skyeye and it seems to be based upon armulator which is a
target of RTEMS. So, I guess buiding with the armulator bsp should be a good
beginning.

Fred

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

* Re: Ada on ARM
  2005-11-21 19:16     ` Laurent GUERBY
  2005-11-21 19:35       ` Frédéric PRACA
@ 2005-11-21 19:41       ` Joel Sherrill <joel@OARcorp.com>
  2005-11-22  2:52         ` Ralf Corsepius
  1 sibling, 1 reply; 9+ messages in thread
From: Joel Sherrill <joel@OARcorp.com> @ 2005-11-21 19:41 UTC (permalink / raw)
  To: Laurent GUERBY; +Cc: Ralf Corsepius, frederic.praca, gcc

Laurent GUERBY wrote:
> On Mon, 2005-11-21 at 12:15 -0600, Joel Sherrill  wrote:
> 
>>arm-rtems4.7 does build C, C++, and Ada on the gcc SVN head.  I have 
>>done no testing beyond that.
> 
> 
> Is there a simulator for arm? Frederic do you have a testing
> environment in mind? What "--enable-rtemsbsp=X" should I use?

I suppose the GameBoy Advance (gba) BSP is your best bet.  Instructions
for it are on the Wiki but I personally don't have any experience with 
it yet.

There is also the possibility that the SkyEye simulator could be made to 
work with the edp7312 BSP but that hasn't been worked through yet.

> I'm building up to GCC for arm-rtems4.7 right now.

Did you resolve the issue about the target including a version number?

I also have this arm-rtems specific patch.  Something changed after 
4.0.x and none of the RTEMS BSPs would link before I added this.

Index: gcc/config/arm/rtems-elf.h
===================================================================
--- gcc/config/arm/rtems-elf.h  (revision 107316)
+++ gcc/config/arm/rtems-elf.h  (working copy)
@@ -37,3 +37,10 @@
  #undef SUBTARGET_EXTRA_ASM_SPEC
  #define SUBTARGET_EXTRA_ASM_SPEC "\
    %{!mhard-float: %{!msoft-float:-mfpu=softfpa}}"
+
+/*
+ *  The default includes --start-group and --end-group which conflicts
+ *  with how this used to be defined.
+ */
+#undef LINK_GCC_C_SEQUENCE_SPEC
+#define LINK_GCC_C_SEQUENCE_SPEC "%G %L"

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

* Re: Ada on ARM
  2005-11-21 19:35       ` Frédéric PRACA
@ 2005-11-21 19:43         ` Joel Sherrill <joel@OARcorp.com>
  0 siblings, 0 replies; 9+ messages in thread
From: Joel Sherrill <joel@OARcorp.com> @ 2005-11-21 19:43 UTC (permalink / raw)
  To: Frédéric PRACA; +Cc: Laurent GUERBY, Ralf Corsepius, gcc

Frédéric PRACA wrote:
> Selon Laurent GUERBY <laurent@guerby.net>:
> 
> 
>>On Mon, 2005-11-21 at 12:15 -0600, Joel Sherrill  wrote:
>>
>>>arm-rtems4.7 does build C, C++, and Ada on the gcc SVN head.  I have
>>>done no testing beyond that.
>>
>>Is there a simulator for arm? Frederic do you have a testing
>>environment in mind? What "--enable-rtemsbsp=X" should I use?
> 
> Well, I plan to use Skyeye for simulation. The target is an ep9312 from Cirrus
> Logic. Even if I didn't manage to compile the edb7312 support, I wanted to read
> how it was made to try to port RTEMS on ep9312. I think this should be a good
> study for me.
> I just had a quick to skyeye and it seems to be based upon armulator which is a
> target of RTEMS. So, I guess buiding with the armulator bsp should be a good
> beginning.

The armulator BSP doesn't quite initialize memory right.  The last I 
knew, the SkyEye simulator did not run the BSP and no one had 
investigated.  That BSP was developed on real hardware.  I would hope 
the edb7312 BSP would be VERY close to working.

--joel

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

* Re: Ada on ARM
  2005-11-21 19:41       ` Joel Sherrill <joel@OARcorp.com>
@ 2005-11-22  2:52         ` Ralf Corsepius
  0 siblings, 0 replies; 9+ messages in thread
From: Ralf Corsepius @ 2005-11-22  2:52 UTC (permalink / raw)
  To: joel.sherrill; +Cc: Laurent GUERBY, frederic.praca, gcc

On Mon, 2005-11-21 at 13:48 -0600, Joel Sherrill  wrote:

> I also have this arm-rtems specific patch.  Something changed after 
> 4.0.x and none of the RTEMS BSPs would link before I added this.
> 
> Index: gcc/config/arm/rtems-elf.h
> ===================================================================
> --- gcc/config/arm/rtems-elf.h  (revision 107316)
> +++ gcc/config/arm/rtems-elf.h  (working copy)
> @@ -37,3 +37,10 @@
>   #undef SUBTARGET_EXTRA_ASM_SPEC
>   #define SUBTARGET_EXTRA_ASM_SPEC "\
>     %{!mhard-float: %{!msoft-float:-mfpu=softfpa}}"
> +
> +/*
> + *  The default includes --start-group and --end-group which conflicts
> + *  with how this used to be defined.
> + */
> +#undef LINK_GCC_C_SEQUENCE_SPEC
> +#define LINK_GCC_C_SEQUENCE_SPEC "%G %L"

I fail to see what this patch is good for. 

All rtems targets use the default LINK_GCC_C_SEQUENCE_SPEC and I fail to
understand why the arm should be an exception.

I'd suspect bugs in RTEMS bsp_specs hitting you.

Ralf


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

end of thread, other threads:[~2005-11-22  2:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-21 16:14 Ada on ARM Frédéric PRACA
2005-11-21 17:26 ` Ralf Corsepius
2005-11-21 18:08   ` Joel Sherrill <joel@OARcorp.com>
2005-11-21 18:26     ` Frédéric PRACA
2005-11-21 19:16     ` Laurent GUERBY
2005-11-21 19:35       ` Frédéric PRACA
2005-11-21 19:43         ` Joel Sherrill <joel@OARcorp.com>
2005-11-21 19:41       ` Joel Sherrill <joel@OARcorp.com>
2005-11-22  2:52         ` Ralf Corsepius

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).