$OpenBSD: patch-src_bootstrap_config_rs,v 1.6 2021/09/09 15:07:40 semarie Exp $

Override initial_cargo value to use ".../cargo" instead of the
executable path as returned by env::current_exe() to avoid using
bootstrap binary without the shell wrapper.

Index: src/bootstrap/config.rs
--- src/bootstrap/config.rs.orig
+++ src/bootstrap/config.rs
@@ -947,6 +947,9 @@ impl Config {
             }
         });
 
+        // Override default and use bootstrap shell wrapper
+        config.initial_cargo = config.initial_rustc.with_file_name(exe("cargo", config.build));
+
         // Now that we've reached the end of our configuration, infer the
         // default values for all options that we haven't otherwise stored yet.
 
