Repository navigation
Description
Hi there, first of all, thank you so much for these toolchains. We use them extensively in the development and testing of https://github.com/mlpack/mlpack .
This week I am trying to cross-compile using one of the mips toolchains to a VoCore, a small MIPS32 device with no hardware FPU support.
However, if I try to compile a simple hello world program with -msoft-float like would be needed for this hardware, I get:
$ /opt/mips32r5el--glibc--stable-2025.08-1/bin/mipsel-buildroot-linux-gnu-g++ -msoft-float -g -o test test.cpp -static -static-libgcc -static-libstdc++
In file included from /opt/mips32r5el--glibc--stable-2025.08-1/mipsel-buildroot-linux-gnu/sysroot/usr/include/features.h:548,
from /opt/mips32r5el--glibc--stable-2025.08-1/mipsel-buildroot-linux-gnu/include/c++/14.3.0/mipsel-buildroot-linux-gnu/bits/os_defines.h:39,
from /opt/mips32r5el--glibc--stable-2025.08-1/mipsel-buildroot-linux-gnu/include/c++/14.3.0/mipsel-buildroot-linux-gnu/bits/c++config.h:683,
from /opt/mips32r5el--glibc--stable-2025.08-1/mipsel-buildroot-linux-gnu/include/c++/14.3.0/bits/requires_hosted.h:31,
from /opt/mips32r5el--glibc--stable-2025.08-1/mipsel-buildroot-linux-gnu/include/c++/14.3.0/iostream:38,
from test.cpp:1:
/opt/mips32r5el--glibc--stable-2025.08-1/mipsel-buildroot-linux-gnu/sysroot/usr/include/gnu/stubs.h:14:11: fatal error: gnu/stubs-o32_soft_2008.h: No such file or directory
14 | # include <gnu/stubs-o32_soft_2008.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
I noticed the following commit from long-ago that updated the MIPS configurations, but left BR2_MIPS_SOFT_FLOAT unset: 090c532
Is there any particular reason for this? Would it be possible to request that this option be enabled so that -msoft-float would also work with these toolchains?
I am not the world's leading toolchain expert so there is definitely a possibility I may be misunderstanding something here, sorry if that is the case.
Activity
tpetazzoni commentedon Sep 12, 2025
Thanks for your feedback!
Just setting BR2_MIPS_SOFT_FLOAT=y is not the solution, this would create a soft-float toolchain, which then wouldn't work well for people who have a FPU and want to use it. Instead, we could create a separate MIPS toolchain that has this option enabled.
On the MIPS side, I'm not very clear on which HW configurations are "common" these days and therefore which toolchain configurations make sense to have (we can't build toolchain for all possible combinations).
Note that worst case, you can always build your own toolchain: all Bootlin toolchains are built using Buildroot.
rcurtin commentedon Sep 12, 2025
If you were willing to do that, I would be grateful, but I know there is significant complexity in the MIPS world (after all there are already several MIPS bootlin toolchains; adding softfloat versions would make a bunch more!). I have no idea how common no-FPU vs. FPU is, so I can't provide input there. For the purposes of our build testing I will just build a slightly modified toolchain using your setup here, but if you do decide to add a soft-float toolchain for MIPS then you are guaranteed it will have at least one user. :)
Thanks!