Albert D. Cahalan wrote:
You sure did make a mess for library developers. The Alpha is trivial to support.
Maybe, but AFAIR, the Alpha doesn't have a 32-bit mode like 64-bit PowerPC processors do. IIRC, S390x and SPARC64 have the same issues... except the number of 32-bit users on those platforms doesn't come close to the large number of users running linux on Macs.
Excellent. How do I do it? This would be ideal: 1. plain 32-bit procps for a 32-bit kernel 2. plain 64-bit procps for a 64-bit kernel 3. special 32-bit procps library for a 64-bit kernel Regular ppc gets #1, while ppc64 gets #2 and #3.
Why the special 32-bit procps? If you're worried about slowing down/bloating apps running on 32-bit kernels just so they can run unmodified on 64-bit kernels, why not just ship a 64-bit app on the 64-bit kernel? I can't believe there are that many apps affected by this. Looking at SuSE's SLES8 distro for PPC64, they ship 64-bit versions for top, ps,... You don't want to do the same?
a. How do I force gcc into 64-bit mode? b. How do I force gcc into 32-bit mode?
Well, 64-bit userland on PPC64 is still fairly new, so we don't have a biarch gcc setup yet. We hope to have that fairly soon, but there are more important things on the list like TLS/NPTL support in gcc/binutils/glibc, etc. Therefore, for the time being, you'll have a 32-bit gcc and a seperate 64-bit gcc. OTOH, binutils runs just fine biarch using --target=powerpc-linux --enable-targets=powerpc64-linux.
c. How do I tell if a 32-bit build is meant for ppc64?
There isn't any way to tell.
d. Where do I install a 64-bit library e. Where do I install a 32-bit library?
To allow 32-bit applications to run unmodified, all 32-bit libs are located in the same location you're used to seeing them on your 32-bit Macs. The 64-bit libs are located in /lib64/, /usr/lib64/, etc. I'll check and see if I have some docs that spells this out.
f. How do I prevent a plain 32-bit lib from running on ppc64?
There isn't any. I suppose you could add some type of special PT_NOTE to the ELF header and have the 64-bit kernel reject any 32-bit apps with that PT_NOTE, but that capability doesn't exist at the moment.
g. Can I handle ppc64 and mips64 the same way?
I'm not familiar with mips64, so...
BTW, I could use an account on such a machine. Even a plain user account would be helpful.
I _think_ IBM may have a program where they give out temp accounts to developers on a PPC64 Linux machine like they did with S390, but I could just as easily be mistaken. I'll check into it. Peter