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


I encountered the same problem as you when I built cross-gcc on cygwin for target i386-rtems.

And I tracked the source code and found out why the compiler generates ".align 3", not  ".align 2^3" (that is ".align 8"):
The Makefile uses the file:	.../gcc/config/i386/bsd.h, in which there is one line 
	#define ASM_OUTPUT_ALIGN(FILE,LOG)	\
  		if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", (LOG))

And I think it doesn't fit the meaning of its comments above:
	/* This is how to output an assembler line
	   that says to advance the location counter
	   to a multiple of 2**LOG bytes.  */

So I changed the line into 
	#define ASM_OUTPUT_ALIGN(FILE,LOG)	\
  		if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))

and rebuilt gcc.
	The result was in expect.
	
	Is this a bug?

Su Wenming
Engineer
CARERI

mailto:careri@public.sta.net.cn



------
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]