-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/compile: implement powerpc 32-bit backend (ppc32) #22885
Comments
any update ¿? |
Updates will be posted here. There are no updates. I only see ten thumbs-up which is not really very many, though of course if someone volunteers to do the work and maintain a builder we will accept the port. |
I want to help to work with g4/g5 |
32-bit PowerPC would be the 4xx, 6xx, 7xx (G3, Broadway/Wii, etc), and 74xx (G4), in addition to a few others. The G5 is a POWER4+-based 64-bit PowerPC, which was supported until Go 1.9: see #19074 for more. We at Adélie have a ppc32 builder that could potentially be used for CI if this went anywhere. |
any update about go with 32 bit for g4/g3 ? |
I'm interested in create backend for ppc32, but currently I only have POWER8. I need to try build and run ppc32 binaries on my machine. |
Linux installs on 64-bit PowerPC can do 32-bit chroots. You can set up a distro that supports ppc32, like Adélie or Debian, into a chroot and work with it there. I don't know if you can cross-endian chroot; I think you will need to be using big-endian PowerPC on the host. |
I want to work with go in openbsd with powerpc g3/g4. |
I'm interested in ppc32 in order to use prometheus node_exporter on a Dell/Cumulus switch |
I'm interested in order to build restic backup on a MacMini PPC 7450. |
I'll make a note that if you're using Linux and glibc, gcc-go works fine on PPC32. It does not yet work properly on musl, but I'm investigating that. This way we have a platform to bootstrap golang with, if there is ever such a backend. |
Interested by PPC32 here for "qoriq" Synology architectures |
Also interested in this for deployment of Go code, including but not limited to Prometheus node_exporter & blackbox_exporter on PPC32-based network switches. |
@ianlancetaylor Having read up on #19074 and #24358, and fumbling slightly in the dark here except for knowing that I'd definitely would like to be able to build go apps for ppc32, it seems based on your comment alone that all that is required in order to enable this support is:
But given those two referenced tickets, is there opposition within the go community against having ppc32 supported? ppc32 runs on millions of devices, not only Wii's but various network devices with either Linux or BSD. I believe the use case me and @travbrack lists could see see significant adoption (for some value of significant). If those two items are the "only" things required, perhaps I'd be interested in helping out. I can definitely provide a few linux & bsd-builders, but I would absolutely need help with the second point. |
I can help testing with openbsd in ppc32 and 64 . (macppc , old powerpc apple) |
Yes, having a builder and doing the work are all that is required. But maybe I should use scare quotes around "all" because the work is not trivial. I can't think of any reason why anybody would be opposed to adding ppc32 support to Go. It seems like a good idea to me. |
I'll note again here that any ppc64 (big endian) host can function as a ppc32 builder with a simple chroot. That's what we're doing at Adélie to take advantage of the build speed of POWER9 hardware. You'll just have to be careful to not use any newer ISA instructions, since ppc32 goes back to at least the 700. (Not sure if the 4xx and 6xx would be supported by Go. Very popular in embedded still.) |
The devices I'm looking at, I believe have 7xx, and it is exactly the fear (due to my ignorance) of accidentally using too new instruction sets that made me believe some Wii or similar would be an apt 7xx builder. But with less ignorance I guess newer hardware can be used as you say @awilfox. The big unknown for me is: where to even start looking at the scope of adding an arch to "cmd/compiler". @ianlancetaylor is non-trivial order of 100 hours, 1000 hours or more? |
The length of time it takes is very hard to say, since it depends on how much you know about compilers already and how well you understand the PPC/PPC64 architecture. Adding PPC32 support should be much simpler than supporting a new architecture from scratch, since it will be very similar to the existing PPC64 support. The length of time is not really in doing the actual work; it is in understanding what has to be done. |
I'm not sure exactly how to set it up to be usable in this role, but I have an iBook G3 with a PPC750 running Adélie Linux that I could probably be convinced to turn in to a builder. (Or, I could simply smoketest on it when asked.) |
Hi everybody. I can help with testing in PowerMac dual G5, iMac G4 & PowerBook G4, all with Ubuntu 16.04.5:
|
SynoCommunity#1011 (comment) and Go has no ppc32 support: golang/go#22885
Synology has no PPC64 devices and Go has no ppc32 support golang/go#22885
* Fix script having 0 bytes after wget failes to get an IP Use the cached file to fix the 0 byte file on upgrade Can also be upgraded in the future * Address issues raised #3501 (comment) * Disable online checks after saving file and reduce netprobe_timeout * This decreases the boot time when offline (e.g setting up a new network) * Should also reduce long service status updates in the package center. Also allow the user to change the logfile location and the ability to disable it * PPC is unsupported #1011 (comment) and Go has no ppc32 support: golang/go#22885 * dnscrypt-proxy 2.0.19
Interested by PPC32 for "ppc853x" Synology architectures |
the right place to look at gccgo is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986 - AFAIR the compiler, itself, builds but we do not have complete runtime support. It is, sadly, quite far down my list of priorities. |
For my application; it was for Synology rather than a Mac |
Didn’t know Synology uses ppc. Anyway, to a certain extent implementation for MacOS and Linux will be overlapping, though the former gonna require more, for obvious reasons. |
It had, but migrated to Intel a few years ago. |
Maybe implementing a Darwin-PowerPC backend could be a Google Summer of Code project. |
@iains Do you know if that will be sufficient to bootstrap That was used on AIX, apparently:
|
Sorry, I have no idea - stretched way too thin at the moment - I have not tried go since maybe GCC-7 ..
|
fyi, gccgo does work for non-Darwin ppc32. I’ve only tested a fork of gccgo that targeted VxWorks, however. |
@ericlagergren So it is not in GCC upstream, you mean? Could you please refer to the fork in question? (This won’s be sufficient for macOS, but it may be helpful.) |
Correct. The isn't currently public, sorry. Most of the work was adding or working around APIs that don't exist on VxWorks 6. For example, VxWorks 6 doesn't have pread/pwrite or getcontext/setcontext. I also had to implement the atomic APIs, too. I'll post on this thread if/when we (my work) ever release the source code. |
@ericlagergren Got it, thank you. On a side note, did you work only on |
I think Ian was pretty clear about what areas needed work for Darwin (not just PowerPC - but all Darwin). Big Endian powerpc64-linux (with a 32b multilib) also has working go/libgo - so there is another example to work from. |
Only gccgo and libbacktrace. We actually didn't need libbacktrace, but it was easier to get it to compile than it was to make gccgo not use it. We enabled software floats for some reason, I don't remember why. We were targeting an e500 core btw. |
Just checked back here, so essentially, yall are saying that if 1.4 could build, modern Go could be bootstrapped for PPC? I'm specifically concerned about PPC32 Linux here, I don't have Mac hardware to test this on.
I would be willing to chuck some hours at this if there's a chance it could acutally get up-to-date Go working on PowerPC Linux (primarily, my target is the PPC750CL in the Nintendo Wii, as I am one of the lead developers of the Wii-Linux project, but I'll try to get it working for all 32-bit PPC regardless). If I were to get 1.4 building properly, someone else would need to figure out how to use it to get modern Go boostrapping with it, as I don't have unlimited time unfortunately. I'll post an update here if I'm successful. |
I would say that, since gcc-go already works on PPC32, you don't have to start with 1.4. Adding support to mainline Go could probably be in anything that gcc-go could bootstrap. |
I don't entirely understand the bootstrapping issue. Just build a recent Go on amd64/linux and cross-compile a toolchain from there. There's no need to bootstrap completely from ancient Go versions on the platform itself. |
Some platforms (OpenBSD/macppc comes to mind) might want to bootstrap the whole thing from the base system without cross-compiling, but I agree, that's probably the easiest way. |
So that sounds that it might be possible to have a Go Version for darwin/ppc32 and darwin/ppc64 right now? |
Unfortunately I don't believe gcc-go supports the Mac OS, at least not versions of that age. It does however support Linux on these systems. Mainline Go should work on G5 machines running Linux, too, but doesn't because of #19074. I still believe this was a mistake to merge, it still impedes my work on G5s and Power6/Power7 systems (including trying to make Docker run on them), and it still makes me frustrated, but what are you going to do… |
Mainline Go dosnt work on G5 since (Go 1.9) quite some time... |
Well, in practice current versions of Go will not build even on Intel, and somewhat earlier versions which can be built do not work :( I have fixed Go 1.11.13 for 10.6 i386 in macports/macports-ports@0435fe5 – however when I tried to build a few dependents, it is either too old or just does not work.
It does not work on any macOS, as of now: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986 |
This is not accurate. The last PPC capable system is 10.5 (Leopard). There are some beta builds of 10.6 for PPC, but no released version. There is a community effort called Sorbet Leopard to make more bits of it work, but I wouldn't call it official at all. If you want real Darwin PPC support, you'd need to support 10.5 at least. Note also that many systems were dropped with 10.5, including all G3 and a wide swath of G4, so you really would want to target 10.4 for maximal compatibility. |
@yhaenggi Do you know whether it was a policy to break it or just accidental breakage? macOS aside, OpenBSD/FreeBSD/NetBSD support PowerPC systems back to G4, and it would be nice to have Go working there. |
As I linked above, #19074 made it policy, but it's one I would be willing to help overturn if such a thing exists in the Go community. I would be more than happy to put the work in to make it work on down level ISA versions again, provide CI, and whatever else needed. |
@awilfox Well, first of all 10.6.8 is ppc-capable. It does not boot on PowerPC, but it can build and run Then, here is 10.6 on PowerPC, running natively:
That is just 10.5.8 with a few tweaks, not on a system level. For all practical purposes it is 10.5.8.
Aside from some archaic G4, later ones run 10.5 and 10.6 with no issues. I do not think it is a realistic concern to support G3 and super-old G4, they are too slow for anything. |
Building PPC binaries is not that big of a deal; you can do that on any Mac running Big Sur or earlier with Xcode 12 and XcodeLegacy.
This is 10A190, which is a beta build. Yes, you can get it to work, but it is not entirely stable and has bugs that are even fixed in 10.5.8 (10.5.8 is newer than 10.6 final, let alone a WWDC build). I just don't think 10.6/ppc is a useful target for a compiler. You would literally be having users install a private beta OS that was never meant for public consumption.
Any G4 < 867 MHz will not run Leopard without hacks. My G3 runs gitlab-runner fine with gcc-go, and it would run it fine with mainline Go if it had a ppc32 backend. 🤷♀️ 10.5 is old enough that it doesn't have the *64 APIs (open64, readdir64, etc), as a single omission that comes directly to my mind. I'm not sure what APIs Go uses internally, but I'm pretty sure porting it backwards to 10.5 would be a lot more work than the work to go the bit further to make it work on 10.4 as well. I will admit I don't know that for certain. |
As an aside, I don't think it is particularly useful to discuss a theoretical Darwin port for ppc32. It will be hard enough convincing upstream to accept ppc32 at all, so can we at least focus on operating systems that have existed in the last decade as a bare minimum to even see if this is viable? |
so can we at least focus on operating systems
Let's not dictate how people spend
<https://gist.github.com/cellularmitosis/2def88bdf2b772a8635e6a2972fac9c7>
their free time <https://github.com/cellularmitosis/leopard.sh>. Sergey
has contributed an incredible amount of effort to supporting all kinds of
software on Darwin/PPC.
This thread is the only space on the internet for discussing the pipedream
of a Darwin/PPC Golang. Please do not silence it.
…On Wed, Mar 20, 2024 at 5:21 PM A. Wilcox ***@***.***> wrote:
As an aside, I don't think it *is* particularly useful to discuss a
theoretical Darwin port for ppc32. It will be hard enough convincing
upstream to accept ppc32 at all, so can we at least focus on operating
systems that have existed in the last decade as a bare minimum to even see
if this is viable?
—
Reply to this email directly, view it on GitHub
<#22885 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABWRJHTQJ7FKPZB72KVKTDYZIDXPAVCNFSM4EFNHA5KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBRGA3TIOJZGI2Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@awilfox While ppc ABI of Darwin is not identical to BSD or Linux, it is perhaps a secondary problem, which we could realistically deal with on our end, provided some ppc works and provided x86 Go works on 10.6. (10.5 is not hugely different; perhaps one issue which will matter is a lack of GCD, so mach semaphores are to be used instead.) |
For my 0.02GBP (noting that I will keep testing/supporting ppc 10.5 until the hardware is no longer working)
|
Tracking bug for missing PowerPC 32-bit backend. People interested in this can put a 👍 reaction here so that we can track interest.
The text was updated successfully, but these errors were encountered: