Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Mar 2015 12:47:26 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Craig Rodrigues <rodrigc@FreeBSD.org>
Cc:        "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>, freebsd-toolchain@freebsd.org
Subject:   Re: Failed to build with external toolchain
Message-ID:  <1A90C16A-1A23-4EFD-BB61-0E956C8CB49D@bsdimp.com>
In-Reply-To: <CAG=rPVfC%2BoVr35Ayp_gudkGXctYprpxW2D7tj%2BT3tOOh=OyLpg@mail.gmail.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> <CAG=rPVfC%2BoVr35Ayp_gudkGXctYprpxW2D7tj%2BT3tOOh=OyLpg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_53C848BF-B03D-4A9E-BD33-490E9A632FF2
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=windows-1252


> On Mar 26, 2015, at 2:12 AM, Craig Rodrigues <rodrigc@FreeBSD.org> =
wrote:
>=20
>=20
>=20
> On Tue, Mar 24, 2015 at 8:39 PM, Warner Losh <imp@bsdimp.com> wrote:
>=20
>=20
> No. The in-tree gcc doesn=92t grok =97sysroot.
>=20
> 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.
>=20
> Eg
>=20
> +.else if ${COMPILER_VERSION} > 40201
> +XCFLAGS+=3D      --sysroot=3D${WORLDTMP} ${BFLAGS}
> +XCXXFLAGS+=3D    --sysroot=3D${WORLDTMP} ${BFLAGS}
> .endif
>=20
>=20
> The following worked for me.  Is it OK to commit?
>=20
> Index: Makefile.inc1
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- Makefile.inc1       (revision 280353)
> +++ Makefile.inc1       (working copy)
> @@ -375,10 +375,14 @@
>  .endif
>  .if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} =3D=3D gcc
>  XCFLAGS+=3D      -isystem ${WORLDTMP}/usr/include =
-L${WORLDTMP}/usr/lib
>  XCXXFLAGS+=3D    -I${WORLDTMP}/usr/include/c++/v1 -std=3Dgnu++11 =
-L${WORLDTMP}/../lib/libc++
>  DEPFLAGS+=3D     -I${WORLDTMP}/usr/include/c++/v1
> +.if ${COMPILER_VERSION} > 40201
> +XCFLAGS+=3D      --sysroot=3D${WORLDTMP} ${BFLAGS}
> +XCXXFLAGS+=3D    --sysroot=3D${WORLDTMP} ${BFLAGS}
> +.endif
>  .else
>  TARGET_ABI?=3D   unknown
>  TARGET_TRIPLE?=3D        =
${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0
>  XCFLAGS+=3D      -target ${TARGET_TRIPLE}
>  XCFLAGS+=3D      --sysroot=3D${WORLDTMP} ${BFLAGS}

OK. I have a bit of egg on my face=85

The test is for X_COMPILER_TYPE, so COMPILER_VERSION isn=92t relevant. =
It=92s 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

--Apple-Mail=_53C848BF-B03D-4A9E-BD33-490E9A632FF2
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJVFFQ+AAoJEGwc0Sh9sBEAyi0QAKD7MsHe58oHThFw0Du2jmRi
9Y2qpVuaWa3RmHVRb1cZewowtxWOIGnaFE8MWWSd8S0PE3gaO8nOzzUQV9FndMHp
FETLvRX7bL0I+sJ/nZwQt4Sb4oOH4hv5KgoeXz/aShO5MKdAFOp7CjG6iLlkpGwg
qts/d313jeeqkPBiwtAMhtXzVIW8LALHF0YyEE6bGlyO9k9f9ZLCVgZmFF+sNN1x
S+I9qGNI3Oum3eTJ36uHMQmteJbKjIf1HgqMlhlms0UAJRUcKBlKQuqMExRGCtu/
1AWL66smfYe2ofFutsFlmTVSXs/yNdDz0dwpbcYx2OgUMEH2h6ngNtRIgXyRj6fK
eIouQp5/WKrMg6dgVibkPX923MOfG2xAJ3YmhlM13kq+s6ilocJ4GrZ75zDitdAg
bDabyuMMRU2CF2qWQgDKPo69ICEcORrnG6rC5gjJNjR+c0F6LUejfYnxYs8Sui81
AMhGRBWv8I6V6vPC0jX1BamsM7dtTD+u0OKVFlc8GaiZJteRrk+U/WhFD7rHNxcC
+L4t6zjh/2q/fXkxTfIPXWqzsAAPBa2KI/EOPvwxebIy/bjbz3g08fzZzAB/sDdy
Olty3pnjETZbnsKxI9VVgJzc+DIumRjlnJyIgVWUhIEaFfEabQRmKobIdAzdp/ON
/9rdAMWvh8v/9Qz92EIX
=t/wk
-----END PGP SIGNATURE-----

--Apple-Mail=_53C848BF-B03D-4A9E-BD33-490E9A632FF2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1A90C16A-1A23-4EFD-BB61-0E956C8CB49D>