Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Mar 2015 11:02:09 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Mark Millard <markmi@dsl-only.net>
Cc:        freebsd-toolchain@freebsd.org, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: On powerpc 11.0-CURRENT CROSS_TOOLCHAIN=powerpc64-gcc fails: clang-tblgen use attempted before it exists
Message-ID:  <58E2D419-7DD0-4D93-942C-DA225BDC3455@FreeBSD.org>
In-Reply-To: <FD3C3142-B6CC-410E-8ADF-DFF17AB445A1@dsl-only.net>
References:  <81E69CED-2977-4146-A1DA-B199FDAFE146@dsl-only.net> <20150130005619.GA11558@ivaldir.etoilebsd.net> <89F97E94-AB9F-46C0-9AA2-C4D0680D64E7@dsl-only.net> <60F1C8B5-8621-452B-A6A3-DEE4B48B848D@dsl-only.net> <E053A305-8925-4CDB-B7D3-A632CB6BBE3D@bsdimp.com> <E3F9CFA6-04C2-482B-A649-035C41C0113C@dsl-only.net> <E5D42704-E94A-4E81-83C2-2B851EA8D023@bsdimp.com> <357555BE-7F87-4B25-95BE-43DD33CD8FE2@dsl-only.net> <FD3C3142-B6CC-410E-8ADF-DFF17AB445A1@dsl-only.net>

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

--Apple-Mail=_17593A11-0470-4458-AD4D-83699C7AD831
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 16 Mar 2015, at 09:02, Mark Millard <markmi@dsl-only.net> wrote:
>=20
> I found why gcc 4.2.1's cc1plus was getting -std=3Dc++11 for the =
CROSS_TOOLCHAIN=3Dpowerpc64-gcc compiles that involve WITH_CLANG=3D . =
(WITHOUT_CLANG=3D does not get the "unrecognized" notices.) There is a =
global assignment to CXXFLAGS for all compilers whenever clang.build.mk =
is in use (showing my experimental change...):
>=20
> # svnlite diff /usr/srcC/lib/clang/clang.build.mk
> Index: /usr/srcC/lib/clang/clang.build.mk
> =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
> --- /usr/srcC/lib/clang/clang.build.mk	(revision 279514)
> +++ /usr/srcC/lib/clang/clang.build.mk	(working copy)
> @@ -34,8 +34,8 @@
> CFLAGS+=3D	-DLLVM_DEFAULT_TARGET_TRIPLE=3D\"${TARGET_TRIPLE}\" \
> 		-DLLVM_HOST_TRIPLE=3D\"${BUILD_TRIPLE}\" \
> 		-DDEFAULT_SYSROOT=3D\"${TOOLS_PREFIX}\"
> -CXXFLAGS+=3D	-std=3Dc++11 -fno-exceptions -fno-rtti
> -CXXFLAGS.clang+=3D -stdlib=3Dlibc++
> +CXXFLAGS+=3D	-fno-exceptions -fno-rtti
> +CXXFLAGS.clang+=3D -std=3Dc++11 -stdlib=3Dlibc++
>=20
> .PATH:	${LLVM_SRCS}/${SRCDIR}
>=20
> It may be that the "-fno-exceptions -fno-rtti" are also suspect for =
being not limited to clang contexts.

This is incorrect.  Clang needs -std=3Dc++11, otherwise it cannot =
compile.

I suspect you also need WITHOUT_CLANG_BOOTSTRAP (and =
WITHOUT_GCC_BOOTSTRAP, probably).

-Dimitry


--Apple-Mail=_17593A11-0470-4458-AD4D-83699C7AD831
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-----
Version: GnuPG/MacGPG2 v2.0.26

iEYEARECAAYFAlUGqiUACgkQsF6jCi4glqPU9QCfVrQ0FCVkgxUnw9gbQcTp7gCE
YhkAoKKsKoRh5Fy55v7wYM97lm83uHU4
=lUZt
-----END PGP SIGNATURE-----

--Apple-Mail=_17593A11-0470-4458-AD4D-83699C7AD831--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58E2D419-7DD0-4D93-942C-DA225BDC3455>