2008-02-01 05:55:46 undefined references using library compiled with "-O3 -ffast-math -mfast-fp"
Piggebu Piggebu (ANDORRA)
Message: 50542 Hi all
I am still fiddeling with the compiler options
What I have done: I compiled a library "libsomething.so" with the compiler flags "-O3 -ffast-math -mfast-fp" which worked fine, already compiled programmes using this library also work fine.
What does not work: I wrote now a programme which needs the library. When I compile this programme (also with the "-O3 -ffast-math -mfast-fp" flags) "undefined reference" errors occure (while linking):
undefined reference to `.___fixdfsi.end'
undefined reference to `.___divsf3.end'
undefined reference to `.___truncdfsf2.end'
undefined reference to `.___floatsidf.end'
undefined reference to `.___extendsfdf2.end'
undefined reference to `.___floatsisf.end'
collect2: ld returned 1 exit status
What works: a workaround is:
1) compiling "libsomething.so" without the flags
2) compiling the programme with the flags
3) recompiling "libsomething.so" with the flags
==> programme runs using "libsomething.so" built with the flags...
The question: Is there a way to do all this as is meant to be? (without workaround...) Because compiling the current "uclinux-dist" also yields similar errors - in particular with ffmpeg - when adding the "-O3 -ffast-math -mfast-fp" in the "blackfin build options" menu.
Maybe a path has to be passed to the linker? (Wl,-rpath,somepath)?
2008-02-01 09:01:15 Re: undefined references using library compiled with "-O3 -ffast-math -mfast-fp"
Mike Frysinger (UNITED STATES)
Message: 50573 this has been fixed in the toolchain with 2008R1+ ... for now, do not use -mfast-fp