On Tue, Sep 03, 2024 at 09:06:05PM +0800, Zigit Zo wrote: > In the x86_64 UML, kernel modules compiled with Rust will currently > generate some R_X86_64_GOTPCREL relocations, which will then be rejected > by the kernel. > > And because of the kernel modules of UML are only got handled by the UML > itself, relocation model 'static' can work as expected other than 'pie'. > --- > diff --git a/arch/um/Makefile b/arch/um/Makefile > index 00b63bac5eff..b04b1d4d6dfe 100644 > --- a/arch/um/Makefile > +++ b/arch/um/Makefile > @@ -63,7 +63,7 @@ KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ \ > -Din6addr_loopback=kernel_in6addr_loopback \ > -Din6addr_any=kernel_in6addr_any -Dstrrchr=kernel_strrchr > > -KBUILD_RUSTFLAGS += -Crelocation-model=pie > +KBUILD_RUSTFLAGS_KERNEL += -Crelocation-model=pie > > KBUILD_AFLAGS += $(ARCH_INCLUDE) > > --
I failed to match the actual change with the commit message. Consider that ignorance on my side. I see a problem in just renaming a variable, might be my problem. Thing is that removal of 'KBUILD_RUSTFLAG += ' feels wrong, hence this posting. Groeten Geert Stappers -- Silence is hard to parse