Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Mar 2015 01:12:45 -0700
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>, freebsd-toolchain@freebsd.org
Subject:   Re: Failed to build with external toolchain
Message-ID:  <CAG=rPVfC%2BoVr35Ayp_gudkGXctYprpxW2D7tj%2BT3tOOh=OyLpg@mail.gmail.com>
In-Reply-To: <B768CFD8-FDC1-48EF-91C3-92056F90EE02@bsdimp.com>
References:  <CAG=rPVfP4=BuL8DOuy9FNDcN51zshfBfeuFONiAAONWON6n3kA@mail.gmail.com> <A1580F95-4882-46F3-96C2-3D3D1D493706@FreeBSD.org> <CAG=rPVd9deshQWvMXOHF%2ByfvqZfo3UOsao9iqipX_CQGKs=vHA@mail.gmail.com> <1857A2A3-0C19-4F52-BCAF-6C72FE7D8DF3@FreeBSD.org> <CAG=rPVfKTi5cFyhNBg7pSYi_rUoEw2d8NeqA89Fy%2BiLxZt86hg@mail.gmail.com> <C3173614-08B4-4616-BD76-93CA8417A044@FreeBSD.org> <CAG=rPVc=YxuakeyFL9SXAnas3e9QyozfLqC2uQ_KhkqaavRvNQ@mail.gmail.com> <B768CFD8-FDC1-48EF-91C3-92056F90EE02@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 24, 2015 at 8:39 PM, Warner Losh <imp@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVfC%2BoVr35Ayp_gudkGXctYprpxW2D7tj%2BT3tOOh=OyLpg>