]> git.lizzy.rs Git - rust.git/commitdiff
Explicitly run perl for OpenSSL Configure
authorSamuel Holland <samuel@sholland.org>
Mon, 28 Aug 2017 16:22:11 +0000 (11:22 -0500)
committerSamuel Holland <samuel@sholland.org>
Mon, 28 Aug 2017 16:22:11 +0000 (11:22 -0500)
OpenSSL's Configure script is missing a shebang. On some platforms,
execve falls back to execution with the shell. Some other platforms,
like musl, will fail with an exec format error. Avoid this by calling
perl explicitly (since it's a perl script).

src/bootstrap/native.rs

index 0a307e72bf61d1a2e391949eaec721eb5f77230a..dfbef044fee86160866e42a25ed74d0e608610b7 100644 (file)
@@ -388,7 +388,8 @@ fn run(self, builder: &Builder) {
         drop(fs::remove_dir_all(&dst));
         build.run(Command::new("tar").arg("xf").arg(&tarball).current_dir(&out));
 
-        let mut configure = Command::new(obj.join("Configure"));
+        let mut configure = Command::new("perl");
+        configure.arg(obj.join("Configure"));
         configure.arg(format!("--prefix={}", dst.display()));
         configure.arg("no-dso");
         configure.arg("no-ssl2");