Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Set BR2_MIPS_SOFT_FLOAT to y? #76

Open

Description

@rcurtin

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

  1. tpetazzoni commented on Sep 12, 2025

    @tpetazzoni
    Contributor

    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.

  2. rcurtin commented on Sep 12, 2025

    @rcurtin
    Author

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions