If the system is built with lib32 support (WITH_LIB32, which is the default),
building gcc from ports results in a compiler that can target both 64-bit and
32-bit binaries on powerpc64.
However, when lib32 support is disabled (WITHOUT_LIB32), gcc should only be
built with 64-bit support or otherwise the build fails.
To fix this, explicitly disable 32-bit support when /usr/lib32 is not present.
However, add a MULTILIB option (which is only defined for powerpc64 when
32-bit support is possible and defaults to yes to preserve the current
behavior) to allow the user to explicitly control this feature.
The above would be the commit message. Now, some commentary: I don't know
the gcc build system much, so this might be incorrect. According to the
documentation, the --enable/disable-multilib feature controls more than just
32-bit and 64-bit builds. However, because the only thing I see when running
"gcc -print-multi-lib" are targets for 32-bit and 64-bit (and, say, no soft
float), I think this is fine. Also, there does not seem to be a separate
flag to disable 32-bit support.
Note that if you want to play with enabling and later disabling lib32 on
a system, you will need D3923 or else the lib32 files won't be cleaned up.
Submitting D3923 is not a prerequisite for this commit.