This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Big endian libgcc for arm7tdmi


Jonathan Larmour wrote:
> Ilija Koco wrote:
>> I have tried to compile gcc with big-endian, and other patches but
>> compilation (assembler) fails. At ecos archive i found out that it can
>> be due to execution of wrong as so I added /usr/bin at the beginning of
>> PATH i.e.
>> PATH=/gnutools/bin/:usr/bin:$PATH; export PATH giving (copy-pasted from
>> set command output):
>>
>> PATH=/gnutools/bin:/usr/bin:/usr/kerberos/sbin:/home/arm/bin:/opt/ecos/gnutools/arm-elf/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
>>
>>
>> but it still fails please see make.out extract below:
>> It it matters my platform is Linux (Fedora Core 4) gcc version 3.4.2
>
> Did you build the binutils first? Are they in /gnutools/bin ?
Well, it works better when you connected :-)
Actually I thought i did, irc that i hit make command but nothing was
built (maybe some mistype) - i wondered because it exited so fast
(immediately)...
Now gcc it compiled once I built binutils.

Now another issue: when I was compiling insight I got an error "label at
end of compound" at line 2752 of file arm-tdep.c
I opened arm-tdep.c and found out that error is at label default: of
switch statement (see listing original). I added break; (see listing
"corrected") and it compiled.
Note: In listings error/"correction" are commented with C++ // comment.
Now insight seem to work but I'm a little bit wondered:

1. I think that there isn't error in original file - is there a problem
with my compiler? GCC version 3.4.2?
2. If this error appears, probably I'm not 1st person that got it - or
am I?! Is there a problem with my configuration?

Listings:

--------listing
original---------------------------------------------------------------

arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
  struct gdbarch_tdep *tdep;
  struct gdbarch *gdbarch;
  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;

  /* Try to deterimine the ABI of the object we are loading.  */

  if (info.abfd != NULL)
    {
      osabi = gdbarch_lookup_osabi (info.abfd);
      if (osabi == GDB_OSABI_UNKNOWN)
    {
      switch (bfd_get_flavour (info.abfd))
        {
        case bfd_target_aout_flavour:
          /* Assume it's an old APCS-style ABI.  */
          osabi = GDB_OSABI_ARM_APCS;
          break;

        case bfd_target_coff_flavour:
          /* Assume it's an old APCS-style ABI.  */
          /* XXX WinCE?  */
          osabi = GDB_OSABI_ARM_APCS;
          break;

        default:              // ERROR ocured here
          /* Leave it as "unknown".  */
        }
--------end of listing
original---------------------------------------------------------------

--------- listing "corrected"
------------------------------------------------------------------
arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
  struct gdbarch_tdep *tdep;
  struct gdbarch *gdbarch;
  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;

  /* Try to deterimine the ABI of the object we are loading.  */

  if (info.abfd != NULL)
    {
      osabi = gdbarch_lookup_osabi (info.abfd);
      if (osabi == GDB_OSABI_UNKNOWN)
    {
      switch (bfd_get_flavour (info.abfd))
        {
        case bfd_target_aout_flavour:
          /* Assume it's an old APCS-style ABI.  */
          osabi = GDB_OSABI_ARM_APCS;
          break;

        case bfd_target_coff_flavour:
          /* Assume it's an old APCS-style ABI.  */
          /* XXX WinCE?  */
          osabi = GDB_OSABI_ARM_APCS;
          break;

        default:
            /* Leave it as "unknown".  */
            break;  // I added this line
        }
    }

--------- end of listing "corrected"
------------------------------------------------------------------

regards
Ilija

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]