On powerpc 11.0-CURRENT CROSS_TOOLCHAIN=powerpc64-gcc fails: clang-tblgen use attempted before it exists

Warner Losh imp at bsdimp.com
Mon Mar 16 11:52:01 UTC 2015


> On Mar 16, 2015, at 7:02 PM, Dimitry Andric <dim at freebsd.org> wrote:
> 
> On 16 Mar 2015, at 09:02, Mark Millard <markmi at 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-toolchain/attachments/20150316/7f52f600/attachment.sig>


More information about the freebsd-toolchain mailing list