Project

General

Profile

« Previous | Next » 

Revision 0a84bd6b

Added by Jun Aruga over 2 years ago

[ruby/openssl] Append flags from environment variables.

According to the mkmf.rb#init_mkmf, there are command line options below.

  • --with-cflags to set the cflags
  • --with-ldflags to set the ldflags

For example the following command compiles with the specified flags. Note that
MAKEFLAGS is to print the compiler command lines.

$ 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