]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rust: pass correct target to bindgen on Usermode Linux
authorThomas Weißschuh <linux@weissschuh.net>
Sat, 8 Feb 2025 13:31:14 +0000 (14:31 +0100)
committerMiguel Ojeda <ojeda@kernel.org>
Wed, 19 Mar 2025 22:18:34 +0000 (23:18 +0100)
commit6b2dab17d6fad9d94faae45b46bef307d8560cdf
treef79d675afb1fba131432eff23f43f016af4facb9
parentcf25bc61f8aecad9b0c45fe32697e35ea4b13378
rust: pass correct target to bindgen on Usermode Linux

Usermode Linux uses "um" as primary architecture name and the underlying
physical architecture is provided in "SUBARCH".

Resolve the target architecture flags through that underlying
architecture.

This is the same pattern as used by scripts/Makefile.clang from which
the bindgen flags are derived.

[ David says:

      (...) this is enough to get Rust-for-Linux working with gcc under
      64-bit UML on my system.

    - Miguel ]

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: David Gow <davidgow@googl.ecom>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Link: https://lore.kernel.org/r/20250208-rust-kunit-v1-1-94a026be6d72@weissschuh.net
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/Makefile