linux-stable/scripts
Gary Guo 60d8db49ef rust: compile libcore with edition 2024 for 1.87+
commit f4daa80d6b upstream.

Rust 1.87 (released on 2025-05-15) compiles core library with edition
2024 instead of 2021 [1]. Ensure that the edition matches libcore's
expectation to avoid potential breakage.

[ J3m3 reported in Zulip [2] that the `rust-analyzer` target was
  broken after this patch -- indeed, we need to avoid `core-cfgs`
  since those are passed to the `rust-analyzer` target.

  So, instead, I tweaked the patch to create a new `core-edition`
  variable and explicitly mention the `--edition` flag instead of
  reusing `core-cfg`s.

  In addition, pass a new argument using this new variable to
  `generate_rust_analyzer.py` so that we set the right edition there.

  By the way, for future reference: the `filter-out` change is needed
  for Rust < 1.87, since otherwise we would skip the `--edition=2021`
  we just added, ending up with no edition flag, and thus the compiler
  would default to the 2015 one.

  [2] https://rust-for-linux.zulipchat.com/#narrow/channel/291565/topic/x/near/520206547

    - Miguel ]

Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs).
Link: https://github.com/rust-lang/rust/pull/138162 [1]
Reported-by: est31 <est31@protonmail.com>
Closes: https://github.com/Rust-for-Linux/linux/issues/1163
Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://lore.kernel.org/r/20250517085600.2857460-1-gary@garyguo.net
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
[ Solved conflicts for 6.12.y backport. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-27 11:11:40 +01:00
..
atomic
basic
clang-tools
coccinelle
dtc
dummy-tools
gcc-plugins randstruct: gcc-plugin: Fix attribute addition 2025-06-19 15:32:04 +02:00
gdb scripts/gdb: fix aarch64 userspace detection in get_current_task 2025-02-17 10:05:42 +01:00
genksyms
include
ipe
kconfig kconfig: do not clear SYMBOL_VALID when reading include/config/auto.conf 2025-05-29 11:02:17 +02:00
ksymoops
mod
package kbuild: deb-pkg: don't set KBUILD_BUILD_VERSION unconditionally 2025-04-10 14:39:35 +02:00
selinux selinux: Chain up tool resolving errors in install_policy.sh 2025-04-10 14:39:11 +02:00
tracing
.gitignore
as-version.sh
asn1_compiler.c
bloat-o-meter
bootgraph.pl
bpf_doc.py
build-version
cc-can-link.sh
cc-version.sh
check_extable.sh
check-git
check-sysctl-docs
check-uapi.sh
check-variable-fonts.sh
checkdeclares.pl
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl
checkstack.pl
checksyscalls.sh
checktransupdate.py
checkversion.pl
cleanfile
cleanpatch
coccicheck
config kbuild: fix argument parsing in scripts/config 2025-05-29 11:02:17 +02:00
const_structs.checkpatch
decode_stacktrace.sh
decodecode
depmod.sh
dev-needs.sh
diffconfig
documentation-file-ref-check
export_report.pl
extract_xc3028.pl
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
faddr2line
file-size.sh
find-unused-docs.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen-randstruct-seed.sh
generate_builtin_ranges.awk kbuild: exclude .rodata.(cst|str)* when building ranges 2025-04-20 10:15:44 +02:00
generate_initcall_order.pl
generate_rust_analyzer.py rust: compile libcore with edition 2024 for 1.87+ 2025-06-27 11:11:40 +01:00
generate_rust_target.rs x86: rust: set rustc-abi=x86-softfloat on rustc>=1.86.0 2025-02-17 10:05:23 +01:00
get_abi.pl
get_dvb_firmware
get_feat.pl
get_maintainer.pl
gfp-translate
git.orderFile
head-object-list.txt
headerdep.pl
headers_install.sh
insert-sys-cert.c
install.sh
jobserver-exec
kallsyms.c
Kbuild.include
Kconfig.include
kernel-doc
ld-version.sh
leaking_addresses.pl
Lindent
link-vmlinux.sh
macro_checker.py
make_fit.py
Makefile
Makefile.asm-headers
Makefile.btf
Makefile.build kbuild: rust: remove the alloc crate and GlobalAlloc 2025-03-13 13:01:47 +01:00
Makefile.clang
Makefile.clean
Makefile.compiler kbuild: rust: add rustc-min-version support function 2025-06-27 11:11:40 +01:00
Makefile.debug
Makefile.defconf kbuild: suppress stdout from merge_config for silent builds 2025-02-21 14:01:27 +01:00
Makefile.dtbinst
Makefile.dtbs
Makefile.extrawarn kbuild: Properly disable -Wunterminated-string-initialization for clang 2025-05-29 11:03:25 +02:00
Makefile.gcc-plugins
Makefile.headersinst
Makefile.host
Makefile.kasan
Makefile.kcov
Makefile.kcsan
Makefile.kmsan
Makefile.lib objtool: Silence more KCOV warnings, part 2 2025-05-02 07:59:33 +02:00
Makefile.modfinal
Makefile.modinst
Makefile.modpost
Makefile.package
Makefile.randstruct
Makefile.ubsan
Makefile.userprogs
Makefile.vdsoinst
Makefile.vmlinux kbuild: add dependency from vmlinux to sorttable 2025-05-02 07:59:21 +02:00
Makefile.vmlinux_o
makelst
markup_oops.pl
min-tool-version.sh
misc-check
mkcompile_h
mksysmap
mkuboot.sh
module-common.c
module.lds.S
modules-check.sh
nsdeps
objdiff
objdump-func
orc_hash.sh
pahole-version.sh
parse-maintainers.pl
patch-kernel
profile2linkerlist.pl
prune-kernel
recordmcount.c
recordmcount.h
recordmcount.pl
relocs_check.sh
remove-stale-files
rust_is_available_bindgen_0_66.h
rust_is_available_bindgen_libclang.h
rust_is_available_test.py
rust_is_available.sh
rustc-llvm-version.sh
rustc-version.sh
rustdoc_test_builder.rs
rustdoc_test_gen.rs rust: remove leftover mentions of the alloc crate 2025-03-22 12:54:23 -07:00
setlocalversion
show_delta
sign-file.c
sorttable.c
sorttable.h
spdxcheck-test.sh
spdxcheck.py
spdxexclude
spelling.txt
sphinx-pre-install
split-man.pl
ssl-common.h
stackdelta
stackusage
subarch.include
syscall.tbl
syscallhdr.sh
syscallnr.sh
syscalltbl.sh
tags.sh
tools-support-relr.sh
unifdef.c
ver_linux
verify_builtin_ranges.awk
xen-hypercalls.sh
xz_wrap.sh