|
Message
From: Matjaz Breskvar <phoenix@o...>
Date: Tue, 11 Nov 2003 15:37:20 +0100
Subject: Re: [openrisc] gdb stub instead of JTAG?
* Robert Cragie (rcc@j...) wrote:
>
> I had problems with diag_printf() with optimisations turned on but works OK
> with optimisation turned off. I am not using multi-tasking facilities of
> eCos yet.
>
> Has anyone else experienced problems using optimisation (-02) with the
> compiler?
Yes, there were reports of problems compiling eCos with -O2 optimizations
on opencores gcc-3.2.3 compiler. i think going to -O solved it. (it in the
archives a few months ago)
There are other problems as well which i stumbled on when porting linux:
- OC gcc produces wrong code when using 'long long'
(with optimizations or without).
- linker may miscalculate section lenght or corrupt the binary
when linking with -z. If you avoid giving section directives
to gcc it should be ok.
- wrong program headers in elf header (aligment is 0x1000,
when i think it should be 0x2000, offset is off). I think this woun't hurt
you if you do not have mmu.
regards,
p.
|
 |