Forum Discussion
Altera_Forum
Honored Contributor
8 years ago --- Quote Start --- Hi, This is a long term bug which is caused by using the compiler optimization algorithm. ____ilog2_NaN is inserted to check the sanity of variable, and this function is eliminated during the optimization in normal situations, so the kernal will not call it actually. But it seems that they have finally given up this doubtful method. http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1340693.html So, please try to delete the function ____ilog2_NaN from the file 'include/linux/log2.h' according to the diff contents which is written in the last part of its mail. Kazu --- Quote End --- Thanks a lot, now I'm getting somewhere. I got a new compiler error that I think is something with the linker.
nios2-linux-gnu-gcc: unrecognized option `-shared'
/opt/nios2/lib/gcc/nios2-linux-uclibc/3.4.6/../../../../nios2-linux-uclibc/lib/crt1.o(.text+0x10): In function `_start':
: undefined reference to `main'
/opt/nios2/lib/gcc/nios2-linux-uclibc/3.4.6/../../../../nios2-linux-uclibc/lib/crt1.o(.text+0x14): In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** Error 1
make: Leaving directory `/home/developer/altera/nios2-linux/uClinux-dist/lib/lzo/build-lzo-2.03/src'
make: *** Error 1
make: Leaving directory `/home/developer/altera/nios2-linux/uClinux-dist/lib/lzo/build-lzo-2.03'
make: *** Error 2
make: Leaving directory `/home/developer/altera/nios2-linux/uClinux-dist/lib/lzo'
make: *** Error 2
make: Leaving directory `/home/developer/altera/nios2-linux/uClinux-dist/lib'
make: *** Error 2
make: Leaving directory `/home/developer/altera/nios2-linux/uClinux-dist/lib'
make: *** Error 1