On Monday, February 25, 2002, at 07:25 AM, Ralf Baechle wrote:
On Mon, Feb 25, 2002 at 08:19:36AM +0100, Carlo Agostini wrote:
[link fails due to missing "dpmul", "dpadd", etc.]
Then, I tried to pass explicitly -msoft-float to gcc as an argument .....
Not supported. Use the kernel fp emulation.
This works fine if you undo the mistake in gcc/config/mips/t-linux, or in elf.h, your choice.
The default on MIPS is for gcc to use the GOFAST style of soft-float calls. gcc/config/mips/elf.h sets this up via #include "gofast.h".
Now, t-linux *does* include the right goo to get all the software floating point emulation code compiled into libgcc.a. But it's defaulting not to the GNU style but to the GOFAST style calls:
echo '#undef US_SOFTWARE_GOFAST' >> dp-bit.c
So everything works if we just make the two consistent. The old(er) Agenda toolchain takes the position that "every other gcc MIPS target uses GOFAST, so should we"; you can just change that #undef to #define.
But I (now) think the better path is to stick to the GNU-style softfloat calls, Unless you want to modify elf.h, the best you can do is undo the #include "gofast.h" damage in linux.h. Near the end:
+/* undo the effects of elf.h including gofast.h */ +#undef US_SOFTWARE_GOFAST +#undef INIT_GOFAST_OPTABS +#define INIT_GOFAST_OPTABS + +#undef GOFAST_CLEAR_NEG_FLOAT_OPTAB +#undef GOFAST_RENAME_LIBCALLS
This of course requires knowledge of what exactly gofast.h did, so it's not optimal either.
Ralf is right that the kernel emulator is the supported route. But if you're willing to go to the trouble of building everything from scratch, this does work.
Jay