Don't use libc++ when cross-building for gcc arches

Authored by dim on Jul 28 2017, 11:16 PM.



Since we imported clang 5.0.0, the version check in Makefile.inc1 which
checks whether to use libc++ fires even when the compiler for the target
architecture is gcc 4.2.1. This is because only X_COMPILER_VERSION is
checked. Also check X_COMPILER_TYPE, so it will only use libc++ when an
external gcc toolchain is used.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
dim created this revision.Jul 28 2017, 11:16 PM

I confirmed that this mips.mips.buildworld works; the other MIPS builds, PowerPC, and Sparc64 are in progress.

rpokala accepted this revision.Jul 29 2017, 12:47 AM

make tinderbox JFLAG=-j16 TARGETS="mips powerpc sparc64" UNIVERSE_TARGET=buildworld

Ran to completion and passed.

This revision is now accepted and ready to land.Jul 29 2017, 12:47 AM
emaste accepted this revision.Jul 29 2017, 11:46 AM
emaste added inline comments.
627 ↗(On Diff #31328)

This XXX comment can probably go now.

This revision was automatically updated to reflect the committed changes.
bdrewery edited edge metadata.Jul 29 2017, 5:25 PM

The same logic is in Makefile.libcompat and may need to be handled as well.