linux-next: manual merge of the rust tree with the kbuild tree
Subsystems (2)
[email protected]
maintainerHi all,
Today's linux-next merge of the rust tree got a conflict in:
Makefile
between commit:
a6036a41bffba ("kbuild: drop support for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3")
from the kbuild tree and commit:
fe24902ba8765 ("Kbuild: add Rust support")
from the rust tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Makefile +0 -0
@@@ -758,10 -819,20 +822,17 @@@ KBUILD_CFLAGS += $(call cc-disable-warn ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE KBUILD_CFLAGS += -O2 + KBUILD_RUSTFLAGS += -Copt-level=2 -else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 -KBUILD_CFLAGS += -O3 -KBUILD_RUSTFLAGS += -Copt-level=3 else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE KBUILD_CFLAGS += -Os + KBUILD_RUSTFLAGS += -Copt-level=s endif + # Always set `debug-assertions` and `overflow-checks` because their default + # depends on `opt-level` and `debug-assertions`, respectively. + KBUILD_RUSTFLAGS += -Cdebug-assertions=$(if $(CONFIG_RUST_DEBUG_ASSERTIONS),y,n) + KBUILD_RUSTFLAGS += -Coverflow-checks=$(if $(CONFIG_RUST_OVERFLOW_CHECKS),y,n) + # Tell gcc to never replace conditional load with a non-conditional one ifdef CONFIG_CC_IS_GCC # gcc-10 renamed --param=allow-store-data-races=0 to ifeq ($(KBUILD_EXTMOD),) core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ core-$(CONFIG_BLOCK) += block/ +core-$(CONFIG_IO_URING) += io_uring/ + core-$(CONFIG_RUST) += rust/ vmlinux-dirs := $(patsubst %/,%,$(filter %/, \ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
Quoted 7 lines · On Wed, Aug 3, 2022 at 1:38 AM <[email protected]> wrote:
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Looks good to me! Thanks!
Cheers,
Miguel
Hi all,
Quoted 48 lines · On Wed, 3 Aug 2022 00:38:44 +0100 [email protected] wrote:
Today's linux-next merge of the rust tree got a conflict in:
Makefilebetween commit:
a6036a41bffba("kbuild: drop support forCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3")from the kbuild tree and commit:
fe24902ba8765("Kbuild: add Rust support")from the rust tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Makefile +7
-0@@@ -758,10 -819,20 +822,17 @@@ KBUILD_CFLAGS += $(call cc-disable-warn ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE KBUILD_CFLAGS += -O2 + KBUILD_RUSTFLAGS += -Copt-level=2 -else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 -KBUILD_CFLAGS += -O3 -KBUILD_RUSTFLAGS += -Copt-level=3 else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE KBUILD_CFLAGS += -Os + KBUILD_RUSTFLAGS += -Copt-level=s endif + # Always set `debug-assertions` and `overflow-checks` because their default + # depends on `opt-level` and `debug-assertions`, respectively. + KBUILD_RUSTFLAGS += -Cdebug-assertions=$(if $(CONFIG_RUST_DEBUG_ASSERTIONS),y,n) + KBUILD_RUSTFLAGS += -Coverflow-checks=$(if $(CONFIG_RUST_OVERFLOW_CHECKS),y,n) + # Tell gcc to never replace conditional load with a non-conditional one ifdef CONFIG_CC_IS_GCC # gcc-10 renamed --param=allow-store-data-races=0 to
Makefile
Quoted 8 lines
Makefile +1
-0@@@ -1098,7 -1178,7 +1178,8 @@@ export MODULES_NSDEPS := $(extmod_prefi ifeq ($(KBUILD_EXTMOD),) core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ core-$(CONFIG_BLOCK) += block/ +core-$(CONFIG_IO_URING) += io_uring/ + core-$(CONFIG_RUST) += rust/ vmlinux-dirs := $(patsubst %/,%,$(filter %/, \ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
This is now a conflict between the rust tree and Linus' tree.
Signature · 2 lines
Cheers, Stephen Rothwell