This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

Re: i386-elf/coff cross build


Alagu Sankar wrote :

>I am in the process of building cross compiler tools for intel 386 embedded target with a custom
>RTOS.  Has anybody succeded in installing the i[3456]-elf or i[3456]-coff gcc cross compilers with
>linux or windows(cygwin) host. I'm seeing lot of failure stories in building i386 cross tools in the
>mailing list
              
>I am using gcc-2.95.2 with newlib-1.8.2.  I am able to build bin utils for i386-coff successfully. But
>when i try to install gcc i am getting the follwoing errors (I tried with both cygwin and linux host but
>the result is same).  Any help in solving the problem is very much appreciated.
              
>I did explore to some more extend.  The xgcc compiler generates an assembly file for libgcc2.c file with >_floatdidf option, which contains a '.align  3' directive and hence the 'alignment not power of 2' error.
>But i dont understand why the compiler generates this alignment and how to overcome it.

 The bug comes from the difference between 'aout' and 'coff/elf'
assemblers. The 'aout'-one takes the
'.align 3' as "align to 2**3', but the 'coff/elf' ones take it just as
written.

 This is an old problem which surprisingly hasn't been corrected in the
GCC sources. It has been fixed in
those 'system' targets like SCO3.2, but not in the embedded
i386-coff/elf.

 Ok, here is my fix from '98' :

------------------ clip ------------------------
*** i386-coff.bak	Mon Aug 11 18:57:16 1997
--- i386-coff.h	Mon Nov 16 22:08:06 1998
***************
*** 93,97 ****
--- 93,100 ----
      fprintf (FILE, "\n");						\
    } while (0)
  
+ #undef ASM_OUTPUT_ALIGN
+ #define ASM_OUTPUT_ALIGN(FILE,LOG)	\
+     if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
  
  /* end of i386-coff.h */
------------------ clip ------------------------

Cheers, Kai



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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