Closed ttyusupov closed 6 years ago
Homebrew and Linuxbrew by design do not use the users's environment variables to ensure a reproducible build. You may if you like brew edit openssl
to edit the formula and add these options to CFLAGS
using ENV.append_to_cflags "-mno-avx -mno-bmi -mno-bmi2 -mno-fma -no-abm -no-movbe"
.
Is there any other way to update common ENV
contents externally without editing formulas for specific packages and patching Linuxbrew source code?
No, there is not.
There is for environment variables not on this black list: https://github.com/Linuxbrew/brew/blob/9bb758143534754facc589b6d6f8335f1794695d/Library/Homebrew/extend/ENV/shared.rb#L18-L27
Trying to install
openssl
with specific compiler flags:But these flags are not applied:
ENV.cppflags
are considered by https://github.com/Linuxbrew/homebrew-core/blob/master/Formula/openssl.rb#L58, butENV.cppflags
does not include value ofCPPFLAGS
env variable.May be I should use another approach to pass flags into
ENV.cppflags
?