It does build on newer systems with Apple Clang 1316 or later and on older systems when using a newer llvm.org clang compiler but it would be better if a newer compiler were not required.
https://github.com/ruby/ruby/pull/11405 - I think this should fix it. It seems new toolchains truncate the section name, rather than throwing that error about "length is between 1 and 16 characters", but in any case the section is meaningless on MacOS so it's best to just not emit it.
These apparently break compilation on old MacOS toolchains, because the
MachO section name is capped to 16 chars (although, on my MacOS, at
least, the section name just gets truncated). Nevertheless, these serve
no purpose on non-ELF platforms (they're part of the LSB Linux ABI).