Failed to build with external toolchain
Warner Losh
imp at bsdimp.com
Thu Mar 26 18:47:21 UTC 2015
> On Mar 26, 2015, at 2:12 AM, Craig Rodrigues <rodrigc at FreeBSD.org> wrote:
>
>
>
> On Tue, Mar 24, 2015 at 8:39 PM, Warner Losh <imp at bsdimp.com> wrote:
>
>
> No. The in-tree gcc doesn’t grok —sysroot.
>
> We assume that version gcc 4.2.1 is special and our in-tree compiler elsewhere,
> so please add a check for that and just go ahead and duplicate those two lines.
>
> Eg
>
> +.else if ${COMPILER_VERSION} > 40201
> +XCFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS}
> +XCXXFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS}
> .endif
>
>
> The following worked for me. Is it OK to commit?
>
> Index: Makefile.inc1
> ===================================================================
> --- Makefile.inc1 (revision 280353)
> +++ Makefile.inc1 (working copy)
> @@ -375,10 +375,14 @@
> .endif
> .if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc
> XCFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib
> XCXXFLAGS+= -I${WORLDTMP}/usr/include/c++/v1 -std=gnu++11 -L${WORLDTMP}/../lib/libc++
> DEPFLAGS+= -I${WORLDTMP}/usr/include/c++/v1
> +.if ${COMPILER_VERSION} > 40201
> +XCFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS}
> +XCXXFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS}
> +.endif
> .else
> TARGET_ABI?= unknown
> TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0
> XCFLAGS+= -target ${TARGET_TRIPLE}
> XCFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS}
OK. I have a bit of egg on my face…
The test is for X_COMPILER_TYPE, so COMPILER_VERSION isn’t relevant. It’s always outside the tree.
So your original patch is correct. Please go ahead and commit that and accept my apologies for the wild goose chase.
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-testing/attachments/20150326/d5954377/attachment.sig>
More information about the freebsd-testing
mailing list