On Tue, Mar 24, 2015 at 8:39 PM, Warner Losh <i...@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}

--
Craig
_______________________________________________
freebsd-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"

Reply via email to