On 6/15/23 21:16, Miguel Ojeda wrote:
`bindgen`'s output for `libclang`'s version check contains paths, which in turn may contain strings that look like version numbers [1][2]: .../6.1.0-dev/.../rust_is_available_bindgen_libclang.h:2:9: warning: clang version 11.1.0 [-W#pragma-messages], err: false which the script will pick up as the version instead of the latter. It is also the case that versions may appear after the actual version (e.g. distribution's version text), which was the reason behind `head` [3]: .../rust-is-available-bindgen-libclang.h:2:9: warning: clang version 13.0.0 (Fedora 13.0.0-3.fc35) [-W#pragma-messages], err: false Thus instead ask for a match after the `clang version` string. Reported-by: Jordan Isaacs <mail@xxxxxxxxxxxx> Closes: https://github.com/Rust-for-Linux/linux/issues/942 [1] Reported-by: Ethan D. Twardy <ethan.twardy@xxxxxxxxx> Closes: https://lore.kernel.org/rust-for-linux/20230528131802.6390-2-ethan.twardy@xxxxxxxxx/ [2] Reported-by: Tiago Lam <tiagolam@xxxxxxxxx> Closes: https://github.com/Rust-for-Linux/linux/pull/789 [3] Fixes: 78521f3399ab ("scripts: add `rust_is_available.sh`") Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx> --- [...]
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@xxxxxxxxx>