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 .
use the shadow implementation on gnu systems Let extconf knows that it can use the shadow functions, just like on Linux, on Debian archs like kFreeBSD and Hurd.