Misc #21371
openProposal to Remove SPARC Architecture Support from Ruby
Description
We propose removing support for the SPARC architecture from Ruby. SPARC has seen little to no community usage in recent years, and its continued presence in the codebase, particularly through special cases like rb_sparc_flush_register_windows
adds complexity without clear benefit. Removing SPARC support will reduce maintenance overhead and simplify Ruby’s internals.
Proposal¶
We propose removing all SPARC-specific code from the Ruby source tree, including rb_sparc_flush_register_windows
and related build system conditionals. This change would be noted in the release documentation and targeted for inclusion in Ruby 4.0.
Updated by ioquatix (Samuel Williams) 4 days ago
- Tracker changed from Bug to Misc
- Backport deleted (
3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN)
Updated by mame (Yusuke Endoh) 4 days ago
- Status changed from Open to Assigned
- Assignee changed from ioquatix (Samuel Williams) to ngoto (Naohisa Goto)
Updated by jeremyevans0 (Jeremy Evans) 4 days ago
Can you explain who the "we" is here?
Removing SPARC support would not only eventually remove Ruby from OpenBSD/sparc64, it would also prevent building of any software that directly or indirectly depends on Ruby on OpenBSD/sparc64. This is currently 862 separate packages, of which 550 are not Ruby libraries. I assume that other operating systems supporting sparc64 (Debian and NetBSD at least) would have similar issues if Ruby support for SPARC was removed.
Updated by ioquatix (Samuel Williams) 4 days ago
· Edited
Are there any official distributions other than OpenBSD/sparc64 that still support SPARC? There appears to be a somewhat active (unofficial?) Debian port, but I couldn't find anything else. (Of course, Solaris still exists but for how long?)
SPARC appears to be a dead end. No new CPUs since 2017, Oracle ceased SPARC processor development after the M8, and Fujitsu has shifted its focus to ARM-based architectures, planning to discontinue SPARC production by 2029.
Nothing prevents users of SPARC from continuing to use an older release of Ruby (e.g. 3.4). But since hardware is hard to come by, it's difficult to develop for. I also imagine it's a lot of work to maintain our testing environments and the cost/benefit ratio is probably not that great. Finally, I imagine the toolchain for compiling is only going to get (relatively speaking) more and more antiquated. So it may eventually hold back our usage of more advanced C language features, etc.
My main exposure to this is through maintenance of coroutines, which are a bit more complicated because of shadow registers. No other architecture has as much special cased behaviour as SPARC, so it sticks out as a high cost low value architecture.
If we think Ruby 4.0 is too soon to drop support, maybe we can at least plan on a later date.
Updated by jeremyevans0 (Jeremy Evans) 4 days ago
ioquatix (Samuel Williams) wrote in #note-5:
Are there any official Linux distributions other than OpenBSD/sparc64 that still support SPARC? There appears to be a somewhat active (unofficial?) Debian port, but I couldn't find anything else. (Of course, Solaris still exists but for how long?)
As far as I can see, active operating systems supporting SPARC:
- Solaris
- OpenBSD (officially supported: https://www.openbsd.org/plat.html)
- NetBSD (Tier I support: https://wiki.netbsd.org/ports/)
- Debian (unofficial according to https://wiki.debian.org/SupportedArchitectures, but appears maintained)
- Gentoo (appears official: https://www.gentoo.org/downloads/#sparc)
Updated by ioquatix (Samuel Williams) 4 days ago
Thanks for that list.
What do you think a realistic deprecation/removal timeline might look like for SPARC?
Updated by jeremyevans0 (Jeremy Evans) 4 days ago
ioquatix (Samuel Williams) wrote in #note-7:
Thanks for that list.
What do you think a realistic deprecation/removal timeline might look like for SPARC?
After the open source operating systems that currently support SPARC (OpenBSD, NetBSD, Debian, and Gentoo) drop support for it, then I think removing support for SPARC in Ruby would be fine.
Updated by ioquatix (Samuel Williams) 4 days ago
If that's the case, we need to ensure (1) we have CI running and (2) we have resources available for development/testing. At present, I don't think we have either, but I'm happy to be corrected.
Updated by mame (Yusuke Endoh) 3 days ago
FYI, Ruby has a Solaris platform maintainer, @ngoto (Naohisa Goto).
He still has access to Solaris/SPARC machines. And he is active enough that he worked on getting Ruby to compile on Solaris just five months ago.
Updated by kosaki (Motohiro KOSAKI) 2 days ago
As long as the SPARC Platform Maintainer is actively maintaining SPARC code, it should not be removed. I think.