Discussion:
[gentoo-alt] [PREFIX] ppc-macos support
Fabian Groffen
2018-06-29 08:25:02 UTC
Permalink
For whoever is interested in this.

Just as a pet-project of mine, I recently re-vamped ppc-macos support in
Prefix. I've only done Leopard (10.5), don't think my enthusiasm spans
to Tiger (10.4). :)

Because clang really doesn't want to work/compile at all on PowerPC
(missing implementations for atomics and more) I decided to use FSF
gcc-7.3.0 instead. It compiles out of the box, and allows to use newer
C++ standards (the real problem with newer software basically).

At some point I was able to bootstrap, it currently is probably broken,
because FSF GCC can't compile binutils-apple and csu. I "fixed" the
latter by requiring gcc-apple-4.2.1, and could do the same for binutils,
but I was hoping to get binutils-apple-7.3.1 compiling, as that version
is much more recent and has some experimental PPC support (added back).

I don't know if anyone is (like me, crazy enough) interested in
ppc-macos, but if there is, at least this is the headsup :)

Thanks,
Fabian
--
Fabian Groffen
Gentoo on a different level
Konstantin Tokarev
2018-06-29 12:14:21 UTC
Permalink
Post by Fabian Groffen
For whoever is interested in this.
Just as a pet-project of mine, I recently re-vamped ppc-macos support in
Prefix. I've only done Leopard (10.5), don't think my enthusiasm spans
to Tiger (10.4). :)
Because clang really doesn't want to work/compile at all on PowerPC
(missing implementations for atomics and more) I decided to use FSF
gcc-7.3.0 instead. It compiles out of the box, and allows to use newer
C++ standards (the real problem with newer software basically).
At some point I was able to bootstrap, it currently is probably broken,
because FSF GCC can't compile binutils-apple and csu.
Did you try to compile clang with it?
Post by Fabian Groffen
I "fixed" the
latter by requiring gcc-apple-4.2.1, and could do the same for binutils,
but I was hoping to get binutils-apple-7.3.1 compiling, as that version
is much more recent and has some experimental PPC support (added back).
I don't know if anyone is (like me, crazy enough) interested in
ppc-macos, but if there is, at least this is the headsup :)
Thanks,
Fabian
--
Fabian Groffen
Gentoo on a different level
--
Regards,
Konstantin
Fabian Groffen
2018-06-29 13:18:58 UTC
Permalink
Post by Konstantin Tokarev
Post by Fabian Groffen
For whoever is interested in this.
Just as a pet-project of mine, I recently re-vamped ppc-macos support in
Prefix. I've only done Leopard (10.5), don't think my enthusiasm spans
to Tiger (10.4). :)
Because clang really doesn't want to work/compile at all on PowerPC
(missing implementations for atomics and more) I decided to use FSF
gcc-7.3.0 instead. It compiles out of the box, and allows to use newer
C++ standards (the real problem with newer software basically).
At some point I was able to bootstrap, it currently is probably broken,
because FSF GCC can't compile binutils-apple and csu.
Did you try to compile clang with it?
IIRC clang-3.5.1 can be built, but it can't compile a newer clang.
Post by Konstantin Tokarev
Post by Fabian Groffen
I "fixed" the
latter by requiring gcc-apple-4.2.1, and could do the same for binutils,
but I was hoping to get binutils-apple-7.3.1 compiling, as that version
is much more recent and has some experimental PPC support (added back).
I don't know if anyone is (like me, crazy enough) interested in
ppc-macos, but if there is, at least this is the headsup :)
Thanks,
Fabian
--
Fabian Groffen
Gentoo on a different level
--
Regards,
Konstantin
--
Fabian Groffen
Gentoo on a different level
Michael Weiser
2018-07-03 17:31:11 UTC
Permalink
Hi Fabian,
Post by Fabian Groffen
Post by Konstantin Tokarev
Did you try to compile clang with it?
IIRC clang-3.5.1 can be built, but it can't compile a newer clang.
I also once spent quite some time on this and found that ld64 mislinked
clang. I think I was trying 3.4.2 at the time and the resulting binary
was bus-erroring.

That was the reason I added PPC support back into newer versions of ld64
in the hope that the cause of the mislinkage had been fixed
incidentally somehow. But that was not the case. (The newer ld64 linked
no worse either, though. :)

A workaround I found was to link the mislinked library (one of the
zillon libLLVM*.dylibs) incrementally. I'm not quite sure any more how I
did that exactly but it produced a working clang.
--
Best of luck!
Micha
Loading...