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).

-Dimitry

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to