History

Merge tag 'rust-fixes-6.11' of https://github.com/Rust-for-Linux/linux

Pull rust fixes from Miguel Ojeda: - Fix '-Os' Rust 1.80.0+ builds adding more intrinsics (also tweaked in upstream Rust for the upcoming 1.82.0). - Fix support for the latest version of rust-analyzer due to a change on rust-analyzer config file semantics (considered a fix since most developers use the latest version of the tool, which is the only one actually supported by upstream). I am discussing stability of the config file with upstream -- they may be able to start versioning it. - Fix GCC 14 builds due to '-fmin-function-alignment' not skipped for libclang (bindgen). - A couple Kconfig fixes around '{RUSTC,BINDGEN}_VERSION_TEXT' to suppress error messages in a foreign architecture chroot and to use a proper default format. - Clean 'rust-analyzer' target warning due to missing recursive make invocation mark. - Clean Clippy warning due to missing indentation in docs. - Clean LLVM 19 build warning due to removed 3dnow feature upstream. * tag 'rust-fixes-6.11' of https://github.com/Rust-for-Linux/linux: rust: x86: remove `-3dnow{,a}` from target features kbuild: rust-analyzer: mark `rust_is_available.sh` invocation as recursive rust: add intrinsics to fix `-Os` builds kbuild: rust: skip -fmin-function-alignment in bindgen flags rust: Support latest version of `rust-analyzer` rust: macros: indent list item in `module!`'s docs rust: fix the default format for CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT rust: suppress error messages from CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT

Linus Torvalds committed 2 years ago

Commit 60cb1da2 parents 5b179fe 0eba65f7 files · +18 −11Browse files

Showing the changes to scripts (2 of 7 files). Show all

Unified · Split

2 files
  1. scripts/generate_rust_analyzer.py +5 −1
  2. scripts/generate_rust_target.rs +2 −2
scripts/generate_rust_analyzer.py+5−1
@@ -145,6 +145,7 @@ def main(): · 144 unmodified lines
145145 parser.add_argument('--cfgs', action='append', default=[])
146146 parser.add_argument("srctree", type=pathlib.Path)
147147 parser.add_argument("objtree", type=pathlib.Path)
148+ parser.add_argument("sysroot", type=pathlib.Path)
148149 parser.add_argument("sysroot_src", type=pathlib.Path)
149150 parser.add_argument("exttree", type=pathlib.Path, nargs="?")
150151 args = parser.parse_args()
@@ -154,9 +155,12 @@ def main(): · 3 unmodified lines
154155 level=logging.INFO if args.verbose else logging.WARNING
155156 )
156157
158+ # Making sure that the `sysroot` and `sysroot_src` belong to the same toolchain.
159+ assert args.sysroot in args.sysroot_src.parents
160+
157161 rust_project = {
158162 "crates": generate_crates(args.srctree, args.objtree, args.sysroot_src, args.exttree, args.cfgs),
159− "sysroot_src": str(args.sysroot_src),
163+ "sysroot": str(args.sysroot),
160164 }
161165
162166 json.dump(rust_project, sys.stdout, sort_keys=True, indent=4)
scripts/generate_rust_target.rs+2−2
@@ -162,7 +162,7 @@ fn main() { · 161 unmodified lines
162162 "data-layout",
163163 "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
164164 );
165− let mut features = "-3dnow,-3dnowa,-mmx,+soft-float".to_string();
165+ let mut features = "-mmx,+soft-float".to_string();
166166 if cfg.has("MITIGATION_RETPOLINE") {
167167 features += ",+retpoline-external-thunk";
168168 }
@@ -179,7 +179,7 @@ fn main() { · 10 unmodified lines
179179 "data-layout",
180180 "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",
181181 );
182− let mut features = "-3dnow,-3dnowa,-mmx,+soft-float".to_string();
182+ let mut features = "-mmx,+soft-float".to_string();
183183 if cfg.has("MITIGATION_RETPOLINE") {
184184 features += ",+retpoline-external-thunk";
185185 }