Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12599 Discussions

Problems with gcc and framepointer

Altera_Forum
Honored Contributor II
992 Views

Dear all,  

 

When compiling the kernel without framepointers, the kernel crashes when booting (it starts to complain about misaligned accesses and then eventually OOPSes). Compiling with framepointers (-fno-omit-frame-pointers) solves the problem, however there seems to be a bug in the gcc compiler. 

 

Can anyone confirm this? Is there a bug fix for the compiler? 

 

All the best ... 

 

- Johannes
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
300 Views

I had a similar problem and yes it looks like strange behaviour of the gcc compiler. If you have G0, G1 or G2 in the compilation options, this tells the compiler to use far pointers in some cases. If this option is combined with some optimization level ( for instance O1 ), then the application does not work. I have googled the issue and I found your post. Then I also added -fno-omit-frame-pointers to my compilation flags and it was like some "white magic". Everything worked with the option. I am using altera 7.2 and the coming with it gcc compiler : 3.2. But the issue happened also on altera 9.1.

0 Kudos
Reply