[PATCH] rust: arch:um: Fix building 32-bit UML with GCC

Miguel Ojeda miguel.ojeda.sandonis at gmail.com
Thu Apr 30 13:44:20 PDT 2026


On Sat, Apr 25, 2026 at 5:42 AM David Gow <david at davidgow.net> wrote:
>
> 32-bit UML builds can be configured either by setting CONFIG_64BIT=n or
> with SUBARCH=i386. Both work with Rust-for-Linux when clang is the
> compiler, but when SUBARCH=i386, we don't set a bindgen target correctly if
> gcc is the compiler.
>
> Add the appropriate bindgen target configuration for i386, as is done in
> Makefile.clang.
>
> Fixes: ab0f4cedc355 ("arch: um: rust: Add i386 support for Rust")
> Signed-off-by: David Gow <david at davidgow.net>

Applied to `rust-fixes` -- thanks!

    [ For reference, the errors look like:

            BINDGEN rust/bindings/bindings_generated.rs
          error: unsupported option '-mno-sse' for target ''
          ...
          error: unknown target triple 'unknown'
          panicked at .../bindgen-0.72.1/ir/context.rs:562:15:
          libclang error; possible causes include:
          ...

        - Miguel ]

    [ Added space in title. - Miguel ]

(I left the comment as-is to keep the match from `Makefile.clang`).

Cheers,
Miguel



More information about the linux-um mailing list