let BSD to use gmake for GNU-make

the diff extends build_helper to provide an function to return the
expected name of GNU-make on the host: "make" or "gmake".

Fixes #38429
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
index 712c4c5..aa15825 100644
--- a/src/bootstrap/check.rs
+++ b/src/bootstrap/check.rs
@@ -13,6 +13,8 @@
 //! This file implements the various regression test suites that we execute on
 //! our CI.
 
+extern crate build_helper;
+
 use std::collections::HashSet;
 use std::env;
 use std::fmt;
@@ -543,7 +545,7 @@
     build.run(&mut cmd);
     build.run(Command::new("./configure")
                      .current_dir(&dir));
-    build.run(Command::new("make")
+    build.run(Command::new(build_helper::make(&build.config.build))
                      .arg("check")
                      .current_dir(&dir));
 }