pkg
pkg copied to clipboard
Treat hard vs soft float as different MIPS ABIs
Trying to do 'pkg bootstrap' in a hard-float mips environment (e.g. buildworld TARGET_ARCH=mipshf and then use that in a gemu system) fails due to an unresolved symbol as the default 'pkg' is linked against the soft-float MIPS which exports certain symbols from libc that aren't present in a hard-float libc (__muldf3 in particular). This is kind of similar to the 'libsoft' thing on ARM. I'm not sure if the solution is that MIPS needs to grow libsoft-type support, or if pkg should be treating hard-float vs soft-float as separate ABIs and refusing to install a soft-float MIPS binary on a hard-float world, etc. (You can detect the soft-float vs hard-float from the ELF header of a binary.)
your call, I would accept here any patch :D
I care less about this now than when I first added this as my use case for MIPS has largely moved on to RISC-V. RISC-V also has separate MACHINE_ARCHes for hard vs soft-float, but I think [email protected] might be the only one who really cares about soft-float on RISC-V.