> On Mar 16, 2015, at 7:02 PM, Dimitry Andric <d...@freebsd.org> wrote: > > On 16 Mar 2015, at 09:02, Mark Millard <mar...@dsl-only.net> wrote: >> >> I found why gcc 4.2.1's cc1plus was getting -std=c++11 for the >> CROSS_TOOLCHAIN=powerpc64-gcc compiles that involve WITH_CLANG= . >> (WITHOUT_CLANG= does not get the "unrecognized" notices.) There is a global >> assignment to CXXFLAGS for all compilers whenever clang.build.mk is in use >> (showing my experimental change...): >> >> # svnlite diff /usr/srcC/lib/clang/clang.build.mk >> Index: /usr/srcC/lib/clang/clang.build.mk >> =================================================================== >> --- /usr/srcC/lib/clang/clang.build.mk (revision 279514) >> +++ /usr/srcC/lib/clang/clang.build.mk (working copy) >> @@ -34,8 +34,8 @@ >> CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ >> -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \ >> -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" >> -CXXFLAGS+= -std=c++11 -fno-exceptions -fno-rtti >> -CXXFLAGS.clang+= -stdlib=libc++ >> +CXXFLAGS+= -fno-exceptions -fno-rtti >> +CXXFLAGS.clang+= -std=c++11 -stdlib=libc++ >> >> .PATH: ${LLVM_SRCS}/${SRCDIR} >> >> It may be that the "-fno-exceptions -fno-rtti" are also suspect for being >> not limited to clang contexts. > > This is incorrect. Clang needs -std=c++11, otherwise it cannot compile. > > I suspect you also need WITHOUT_CLANG_BOOTSTRAP (and WITHOUT_GCC_BOOTSTRAP, > probably).
From earlier debugging, I’m pretty sure that the wrong g++ is being used in the CROSS_TOOLCHAIN case. I’m in Japan right now on travel, so I haven’t been able to track it down. WITHOUT_GCC_BOOTSTRAP should be implied in that case, but if not, that might explain why... Warner
signature.asc
Description: Message signed with OpenPGP using GPGMail