Superenv scripts have a stripped PATH, which may not include
the brew binary itself. Make this explicitly available to
superenv scripts.
Fixes bsdmake wrapper.
ClosesHomebrew/homebrew#16805.
ClosesHomebrew/homebrew#16846.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
bsdmake used to be keg-only, so some users still have it unlinked (presumably they never run brew-doctor). Even though there is code to abort if dependencies are unlinked, it appears broken for this case. So let's just be thorough anyway.
ClosesHomebrew/homebrew#14751.
It was dumb to have make call different compilers to configure depending on the `servile?` flag. This is not a route to reliability.
Instead now we set CC (formula that break if CC is set like Jack be damned, their build-systems are just plain broken and should not be supported). When cc is called we examine HOMEBREW_CC, otherwise we instantiate the tool that was called, just like the formula's build-system will expect.
FixesHomebrew/homebrew#14659 (though the build fails later for me, with the same error for stdenv and superenv).
This patch removes most of the settings for CC, CXX etc. because we are trying to be minimal. Then we force the compiler to Homebrew's choice underneath in superenv. We however leave LD because we prefer that build-systems use the c-compiler for linking, it generally works better (copiously tested), however when the build-system explicitly calls ld, we respect that. This gets around the ocaml bug in question, since somehow clang was crashing during link, but the ld tool itself (which is kind of clang, kind of llvm-gcc) is okay with this.
Also moved the setting of O (so that cc-args are refurbished) into a make wrapper. Not sure if this matter much, but seems more consistent.