Open barracuda156 opened 2 years ago
the newer gcc issues were being tracked here https://github.com/classilla/tenfourfox/issues/464 but we stopped a few years ago, so nobody tried gcc10 or gcc11.
note that TFF has "10.4" in the title, and 10.4 has very little support for ppc64 (essentially nothing beyond the base libs; no frameworks, no objc .. ) so I would not expect something targeting 10.4 to be useful for a ppc64 case.
note that TFF has "10.4" in the title, and 10.4 has very little support for ppc64 (essentially nothing beyond the base libs; no frameworks, no objc .. ) so I would not expect something targeting 10.4 to be useful for a ppc64 case.
@iains Honestly I don’t know if support for 10.4 implies that ppc64
variant should be impossible. Included profiles to be used for the build have dedicated G5 versions: https://github.com/classilla/tenfourfox/blob/master/G5.mozcfg
But those nevertheless use -m32
flags.
I don't know, I've never tried personally. The reason the G5 version is built in 32-bit mode is because of the JIT, which definitely won't work in 64-bit mode (also, assuming you're building this for Mac OS X, TenFourFox has some legacy Carbon code).
I don't know, I've never tried personally. The reason the G5 version is built in 32-bit mode is because of the JIT, which definitely won't work in 64-bit mode (also, assuming you're building this for Mac OS X, TenFourFox has some legacy Carbon code).
@classilla Thank you! The JIT is this one? js/src/jit/osxppc
Given that neighboring mips
has both 32- and 64-bit versions, I would imagine ppc64
to be feasible, though I dunno how much effort that could require.
It would need to be written from scratch. The one I'm writing for POWER9 is little-endian and specific to that ISA level.
It would need to be written from scratch. The one I'm writing for POWER9 is little-endian and specific to that ISA level.
@classilla Oh… I had an impression that as far as Darwin goes, ppc
and ppc64
aren’t hugely different. Few assembler instructions should be replaced, in a predictable fashion, and maybe handling of 64-bit numbers (takes more instructions on ppc32?). ABI documentation does not seem to suggest huge differences. Well, r13 is used for some thread-related stuff on ppc64.
But @iains noted earlier that Apple documentation is incomplete, so I guess I miss something here.
it’s not the toolchain exactly, or Apple documentation, or ABI.
the code itself has conditional compilation for systems, endianness, and bit depth. All different paths.
a pathway for darwin big endian 64bit was never written into the code, far as I recall it.
it’s not the toolchain exactly, or Apple documentation, or ABI.
the code itself has conditional compilation for systems, endianness, and bit depth. All different paths.
a pathway for darwin big endian 64bit was never written into the code, far as I recall it.
To avoid any confusion : PowerPC Darwin is always Big Endian (32 and 64B),
AFAIK the only LE Power systems are ELF (v2) and for Power >= 9 (ICBW, maybe Power 8 is also covered).
yeah, pre-coffee brainfart after reading Cameron's comment; I changed it to BE 10 seconds after I wrote that, and went 'What -- no'. :>
By 'from scratch' I mean it's probably a bit more than a few tweaks or other trivial changes. Yes, the code runs on the 970 except for things like mcrxr
. However, it is inherently 32-bit, all calling conventions are 32-bit, JIT entry and exit uses 32-bit, etc. There are also relatively few 64-bit operations that the JIT performs that would benefit. Even current versions of Firefox mostly deal in 32-bit ints other than bignums, which TenFourFox's JavaScript doesn't support.
The POWER9 JIT (for the record, POWER8 also supports LE, POWER7 sort of) is fully 64-bit. Some code was used as a template, but it's been almost completely redone to make it 64-bit clean. Even then I'm still banging bugs out of it, mostly with sign extension and 32-bit thunking.
The POWER9 JIT (for the record, POWER8 also supports LE, POWER7 sort of) is fully 64-bit. Some code was used as a template, but it's been almost completely redone to make it 64-bit clean. Even then I'm still banging bugs out of it, mostly with sign extension and 32-bit thunking.
@classilla Why a choice of LE btw? All POWER CPUs support BE.
Largely convenience. There are relatively few Linux distros that still offer spins with BE support, and they tend to be more fringe. Plus, TenFourFox has a lot of hacks for a Web that now assumes little-endian (little endian typed array emulation being the most notable). I like BE personally and when I upgrade my server to POWER whatever-is-current I'll probably try to run it big with FreeBSD or something, but the desktop experience is better with Linux IMHO, and it's just simpler to run it LE.
I like BE personally and when I upgrade my server to POWER whatever-is-current I'll probably try to run it big with FreeBSD or something, but the desktop experience is better with Linux IMHO, and it's just simpler to run it LE.
I am planning to install FreeBSD 13 as a second system into my G5 Quad in fact. There is a nice GUI for FreeBSD, quite MacOS-like: https://github.com/helloSystem
P. S. From what I understand, even ELF2 can be used in BE mode. No good reason to downgrade to LE.
@classilla Not to create a separate topic: does TFF use v8
-related or similar code? I am trying to fix nodejs12
for Darwin PPC :)
No, it doesn't use V8.
@classilla A bit offtop, just want to share a success: just built tenfourfox
on 10.6 PPC in Macports (I have adapted an earlier work of @kencu to PPC).
P. S. Just noticed my RAM got cooked – been wondering why is it so slow LOL
@classilla Do you know if it is hard to allow building TFF with a newer version of
gcc
than 4.8? @kencu confirms here that later versions failed, at least for Intel: https://github.com/iains/gcc-10-branch/issues/7#issuecomment-1135058045 At the moment, we gotgcc10
andgcc11
available for PPC, via Macports (not yet officially supported, but they work perfectly) or standalone (from @iains branches). Would be nice if TFF builds with these.The second question is re
ppc64
support, raised here: https://forums.macrumors.com/threads/llvm-and-ld64-for-ppc64-on-leopard.2336740/?post=31178811#post-31178811 From what I understand, TFF is 32-bit for PPC? Is there some inherent issue preventingppc64
build, or it simply has not been tested?