Backport upstream pull request for ruby3.2 build issue
Add -Werror=implicit-function explicitly to detect such function
This commit is contained in:
parent
d1919849e7
commit
ee2720c212
4 changed files with 116 additions and 3 deletions
29
ruby-shadow-2.5.1-extconf-ruby32-fix.patch
Normal file
29
ruby-shadow-2.5.1-extconf-ruby32-fix.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
commit eab4aba3f5e06ea8f124d3e5ff6b3fa88c4807cd
|
||||
Author: Mamoru TASAKA <mtasaka@fedoraproject.org>
|
||||
Date: Thu Dec 1 12:23:05 2022 +0900
|
||||
|
||||
extconf.rb: use Rbconfig::CONFIG instead of mkmf CONFIG
|
||||
|
||||
In mkmf.rb CONFIG is defined as CONFIG is defined as RbConfig::MAKEFILE_CONFIG
|
||||
and RbConfig::MAKEFILE_CONFIG is almost same as RbConfig::CONFIG
|
||||
except that RbConfig::MAKEFILE_CONFIG uses reference for other variables.
|
||||
|
||||
Using CONFIG in extconf.rb causes error with ruby3.2 because now
|
||||
CONFIG['host_os'] uses reference for target_os variable, and extconf.rb
|
||||
expects that this variable is all expanded. So instead, use RbConfig::CONFIG .
|
||||
|
||||
Closes #30
|
||||
|
||||
diff --git a/extconf.rb b/extconf.rb
|
||||
index d17f926..55dcff5 100644
|
||||
--- a/extconf.rb
|
||||
+++ b/extconf.rb
|
||||
@@ -14,7 +14,7 @@ $CFLAGS = case RUBY_VERSION
|
||||
else; ''
|
||||
end
|
||||
|
||||
-implementation = case CONFIG['host_os']
|
||||
+implementation = case RbConfig::CONFIG['host_os']
|
||||
when /linux/i; 'shadow'
|
||||
when /sunos|solaris/i; 'shadow'
|
||||
when /freebsd|mirbsd|netbsd|openbsd/i; 'pwd'
|
||||
Loading…
Add table
Add a link
Reference in a new issue