[ruby/openssl] Append flags from environment variables.
According to the mkmf.rb#init_mkmf, there are command line options below.
mkmf.rb#init_mkmf
--with-cflags
cflags
--with-ldflags
ldflags
For example the following command compiles with the specified flags. Note that MAKEFLAGS is to print the compiler command lines.
MAKEFLAGS
$ MAKEFLAGS="V=1" \ bundle exec rake compile -- \ --with-cflags="-Wundef -Werror" \ --with-ldflags="-fstack-protector"
However, I couldn't find command line options to append the flags. And this commit is to append the cflags and ldflags by the environment variables.
$ MAKEFLAGS="V=1" \ RUBY_OPENSSL_EXTCFLAGS="-Wundef -Werror" \ RUBY_OPENSSL_EXTLDFLAGS="-fstack-protector" \ bundle exec rake compile
https://github.com/ruby/openssl/commit/b551eb86f6
[ruby/openssl] Append flags from environment variables.
According to the
mkmf.rb#init_mkmf, there are command line options below.--with-cflagsto set thecflags--with-ldflagsto set theldflagsFor example the following command compiles with the specified flags. Note that
MAKEFLAGSis to print the compiler command lines.However, I couldn't find command line options to append the flags. And this
commit is to append the
cflagsandldflagsby the environment variables.https://github.com/ruby/openssl/commit/b551eb86f6