mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ext/openssl/extconf.rb: do not use -Werror=deprecated-declarations
It fails to build on Solaris: ``` ossl_cipher.c: 関数 ‘ossl_cipher_init’ 内: ossl_cipher.c:228:2: エラー: ‘EVP_md5’ is deprecated [-Werror=deprecated-declarations] 228 | EVP_BytesToKey(EVP_CIPHER_CTX_cipher(ctx), EVP_md5(), iv, | ^~~~~~~~~~~~~~ In file included from /usr/include/openssl/x509.h:73, from /usr/include/openssl/x509v3.h:63, from ossl.h:23, from ossl_cipher.c:10: /usr/include/openssl/evp.h:732:26: 備考: ここで宣言されています 732 | DEPRECATED const EVP_MD *EVP_md5(void); | ^~~~~~~ ``` I agree that `-Werror=` is a good habit, but adding it by default is too aggressive.
This commit is contained in:
parent
c0d118f41a
commit
0d7d8b2989
2 changed files with 1 additions and 16 deletions
|
@ -1,19 +1,7 @@
|
||||||
# frozen_string_literal: false
|
# frozen_string_literal: false
|
||||||
module OpenSSL
|
module OpenSSL
|
||||||
def self.deprecated_warning_flag
|
|
||||||
unless flag = (@deprecated_warning_flag ||= nil)
|
|
||||||
if try_compile("", flag = "-Werror=deprecated-declarations")
|
|
||||||
$warnflags << " #{flag}"
|
|
||||||
else
|
|
||||||
flag = ""
|
|
||||||
end
|
|
||||||
@deprecated_warning_flag = flag
|
|
||||||
end
|
|
||||||
flag
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.check_func(func, header)
|
def self.check_func(func, header)
|
||||||
have_func(func, header, deprecated_warning_flag)
|
have_func(func, header)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.check_func_or_macro(func, header)
|
def self.check_func_or_macro(func, header)
|
||||||
|
|
|
@ -19,9 +19,6 @@ dir_config("kerberos")
|
||||||
|
|
||||||
Logging::message "=== OpenSSL for Ruby configurator ===\n"
|
Logging::message "=== OpenSSL for Ruby configurator ===\n"
|
||||||
|
|
||||||
# Add -Werror=deprecated-declarations to $warnflags if available
|
|
||||||
OpenSSL.deprecated_warning_flag
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Adds -DOSSL_DEBUG for compilation and some more targets when GCC is used
|
# Adds -DOSSL_DEBUG for compilation and some more targets when GCC is used
|
||||||
# To turn it on, use: --with-debug or --enable-debug
|
# To turn it on, use: --with-debug or --enable-debug
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue