On powerpc 11.0-CURRENT CROSS_TOOLCHAIN=powerpc64-gcc fails: clang-tblgen use attempted before it exists
Warner Losh
imp at bsdimp.com
Thu Mar 12 21:33:08 UTC 2015
Thanks Mark. :(
Is cc1plus the g++ compiler that is installed on your bootstrapped system, or is it the one that the powerpc64-gcc toolchain built? cc1plus -v will help determine that. You may have to find it on your system (there’s likely 2) and pass it the -std=c++11 option to see which of them fail. We may have a leak / problem with mkdep that your unique setup is revealing.
Warner
> On Mar 13, 2015, at 5:42 AM, Mark Millard <markmi at dsl-only.net> wrote:
>
> Warner L. wrote about my attempt to use rpc64-xtoolchain-gcc/powerpc64-gcc in a powerpc (non-64) context that has no clang built:
>
>> Trying WITH_CLANG=t ...
>
> So I did...
>
> make WITH_CLANG=t CROSS_TOOLCHAIN=powerpc64-gcc toolchain KERNCONF=GENERICvtsc TARGET=powerpc TARGET_ARCH=powerpc
>
> This results in a different failure (cc1plus not understanding the -std=c++11 option that it ends up being given):
>
> --------------------------------------------------------------
>>>> stage 1.2: bootstrap tools
> --------------------------------------------------------------
> ...
> mkdep -f .depend -a -I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/include -I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/tools/clang/include -I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support -I. -I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DLLVM_DEFAULT_TARGET_TRIPLE=\"powerpc-unknown-freebsd11.0\" -DLLVM_HOST_TRIPLE=\"powerpc-unknown-freebsd11.0\" -DDEFAULT_SYSROOT=\"\" -I/usr/obj/usr/src/tmp/legacy/usr/include -std=c++11 /usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/APFloat.cpp
> ... <OMITTING MANY .cpp's> ... /usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/raw_ostream.cpp
> cc1plus: error: unrecognized command line option "-std=c++11"
> cc1plus: error: unrecognized command line option "-std=c++11"
> cc1plus: error: unrecognized command line option "-std=c++11"
> ...
>
> ===
> Mark Millard
> markmi at dsl-only.net
>
> On 2015-Mar-12, at 01:24 PM, Warner Losh <imp at bsdimp.com> wrote:
>
> Sorry to top post, but try adding WITH_CLANG=t
>
> Warner
>
>> On Mar 13, 2015, at 4:18 AM, Mark Millard <markmi at dsl-only.net> wrote:
>>
>> Basic context:
>>
>> $ freebsd-version -ku; uname -a
>> 11.0-CURRENT
>> 11.0-CURRENT
>> FreeBSD FBSDG4C0 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r279514M: Mon Mar 9 22:24:27 PDT 2015 root at FBSDG4S0:/usr/obj/usr/srcC/sys/GENERICvtsc-NODEBUG powerpc
>> $ svnlite info
>> Path: .
>> Working Copy Root Path: /usr/ports
>> URL: https://svn0.us-west.freebsd.org/ports/head
>> Relative URL: ^/head
>> Repository Root: https://svn0.us-west.freebsd.org/ports
>> Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
>> Revision: 380683
>> Node Kind: directory
>> Schedule: normal
>> Last Changed Author: demon
>> Last Changed Rev: 380683
>> Last Changed Date: 2015-03-07 03:31:11 -0800 (Sat, 07 Mar 2015)
>>
>> I bootstrapped into 11.0-CURRENT from 10.1-STABLE but misunderstood UPDATING for the combination of starting from 10.1 on powerpc/powerpc64 and ended up without clang for both powerpc and powerpc64 before I figure that out.
>>
>> While powerpc64-gcc (and so powerpc64-xtoolchain-gcc) fails to build when portmaster'd on powerpc64 it does build on powerpc.
>>
>> So I portmaster'd powerpc64-xtoolchain-gcc in the powerpc (non-64) 11.0-CURRENT context to attempt a "cross" compile back to powerpc...
>>
>>
>>
>> The problem:
>> (Or is the below attempt a form of abuse of powerpc64-xtoolchain-gcc?)
>> (Remember: no clang exists beforehand.)
>>
>> For...
>>
>> make CROSS_TOOLCHAIN=powerpc64-gcc toolchain KERNCONF=GENERICvtsc TARGET=powerpc TARGET_ARCH=powerpc
>>
>> or
>>
>> make CROSS_TOOLCHAIN=powerpc64-gcc buildworld buildkernel KERNCONF=GENERICvtsc TARGET=powerpc TARGET_ARCH=powerpc
>>
>> Either way the result fails to complete by attempting to use clang-tblgen when it does not exist (yet?):
>>
>>> ...
>>> --------------------------------------------------------------
>>>>>> stage 1.2: bootstrap tools
>>> --------------------------------------------------------------
>>> ...
>>> ===> lib/clang/libllvmx86instprinter (buildincludes)
>>> ===> lib/clang/libllvmx86utils (buildincludes)
>>> ===> lib/clang/include (buildincludes)
>>> clang-tblgen -gen-arm-neon -d arm_neon.d -o arm_neon.h /usr/src/lib/clang/include/../../../contrib/llvm/tools/clang/include/clang/Basic/arm_neon.td
>>> make[6]: exec(clang-tblgen) failed (No such file or directory)
>>> *** Error code 1
>>>
>>> Stop.
>>> make[6]: stopped in /usr/src/lib/clang/include
>>> *** Error code 1
>>>
>>> Stop.
>>> make[5]: stopped in /usr/src/lib/clang
>>> *** Error code 1
>>>
>>> Stop.
>>> make[4]: stopped in /usr/src/lib
>>> *** Error code 1
>>>
>>> Stop.
>>> make[3]: stopped in /usr/src/lib
>>> *** Error code 1
>>>
>>> Stop.
>>> make[2]: stopped in /usr/src
>>> *** Error code 1
>>>
>>> Stop.
>>> make[1]: stopped in /usr/src
>>> *** Error code 1
>>>
>>> Stop.
>>> make: stopped in /usr/src
>>
>>
>>
>> Even if overall this style of bootstrap should not work it seems odd to me that clang-tblgen use was attempted before it was built.
>>
>> ===
>> Mark Millard
>> markmi at dsl-only.net
>>
>> _______________________________________________
>> freebsd-toolchain at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
>> To unsubscribe, send any mail to "freebsd-toolchain-unsubscribe at freebsd.org"
>
>
-------------- 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-ppc/attachments/20150313/f8678069/attachment.sig>
More information about the freebsd-ppc
mailing list