Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Thomas Weißschuh and committed by
Miguel Ojeda
6b2dab17 cf25bc61

+1
+1
rust/Makefile
··· 274 274 # Derived from `scripts/Makefile.clang`. 275 275 BINDGEN_TARGET_x86 := x86_64-linux-gnu 276 276 BINDGEN_TARGET_arm64 := aarch64-linux-gnu 277 + BINDGEN_TARGET_um := $(BINDGEN_TARGET_$(SUBARCH)) 277 278 BINDGEN_TARGET := $(BINDGEN_TARGET_$(SRCARCH)) 278 279 279 280 # All warnings are inhibited since GCC builds are very experimental,