From owner-freebsd-toolchain@FreeBSD.ORG Thu Mar 12 12:00:44 2015 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA7A05CC for ; Thu, 12 Mar 2015 12:00:44 +0000 (UTC) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B3AE4D54 for ; Thu, 12 Mar 2015 12:00:44 +0000 (UTC) Received: by pabrd3 with SMTP id rd3so20039628pab.6 for ; Thu, 12 Mar 2015 05:00:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=jN/Nqrerb8lXkznM/zqAiRsI9Q5ftmHWAgeZOlBnBN8=; b=axAWXQpYaUm/dHLyxye8unkiDkWz0S+dR9G6O4o7Mb/X/lduPihFWBluZawnmgAAX6 jMu8YD2dcMXS+HUgQTPvXg0z1Ch/uIDSaj5oAEGKwAf8kJ4BL+CX3K5t2R+7aSzCuG9o 1ofUNmtNsEBQI/M73eQPr/Pm9xPL9z7HFd5GE3cDP0+elZ4xZXJGXN4rN/juSeMDBJzZ S3tmIxmLY2nAQ9MEaRcKgaP4bSV/l84Y4bzcBGnA3bVghUW54yMmbLFkC0tqu5g4Ro89 P7f4KF1SVZkp2vioMoa6tk9VH1KTL4DYyJqXv2e1qiUB8Zlrn/fbeb4DMilEAWeCYU4F LL7g== X-Gm-Message-State: ALoCoQlZ/w4s2do6YVYBQoAEcx4HI6OL5EZTX2vM0tmHq07gurGniUTlwjQb9teoY2TQkNj5LH+n X-Received: by 10.66.121.129 with SMTP id lk1mr28256396pab.155.1426161638529; Thu, 12 Mar 2015 05:00:38 -0700 (PDT) Received: from [192.168.18.23] (221x253x176x170.ap221.ftth.ucom.ne.jp. [221.253.176.170]) by mx.google.com with ESMTPSA id se2sm10724528pac.38.2015.03.12.05.00.35 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Mar 2015 05:00:37 -0700 (PDT) Sender: Warner Losh Subject: Re: powerpc/powerpc64 11.0-CURRENT not building clang by default: src.opt.mk not equivalent to 10.1-STABLE bsd.own.mk on the issue Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_6A1F383F-178D-40FC-8401-540EAFC36504"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b5 From: Warner Losh In-Reply-To: Date: Thu, 12 Mar 2015 21:00:33 +0900 Message-Id: References: To: Mark Millard X-Mailer: Apple Mail (2.2070.6) Cc: freebsd-toolchain@freebsd.org, FreeBSD PowerPC ML X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2015 12:00:45 -0000 --Apple-Mail=_6A1F383F-178D-40FC-8401-540EAFC36504 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 12, 2015, at 6:36 PM, Mark Millard wrote: >=20 > Basic context for the observation (powerpc64 example): >=20 > # freebsd-version -ku; uname -a > 11.0-CURRENT > 11.0-CURRENT > FreeBSD FBSDG5C0 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r279514M: Wed = Mar 11 19:23:14 PDT 2015 = root@FBSDG4C0:/usr/obj/powerpc.powerpc64/usr/srcC/sys/GENERIC64vtsc-NODEBU= G powerpc >=20 >=20 > As COMPILER_FEATURES context first I note that bsd.compiler.mk uses = the rule... >=20 > .if ${COMPILER_TYPE} =3D=3D "clang" || \ > (${COMPILER_TYPE} =3D=3D "gcc" && ${COMPILER_VERSION} >=3D = 40800) > COMPILER_FEATURES=3D c++11 > .else > COMPILER_FEATURES=3D > .endif >=20 > So powerpc/powerpc64 ends up with COMPILER_FEATURES being empty unless = COMPILER_TYPE has been forced to be "clang" or ${CC} already is clang = based. >=20 > But src.opts.mk will never indicate to build clang when = !${COMPILER_FEATURES:Mc++11} : that logic has priority over things like = ${__T:Mpowerpc*} tests=E2=80=A6 Clang can only be built by a new gcc or clang. Old gcc can=E2=80=99t = build it, so if you don=E2=80=99t have a new gcc, you can=E2=80=99t = build clang. The default compiler was gcc on 10.1. There likely should = be an UPDATING entry to make this clear. Warner > .include > .if !${COMPILER_FEATURES:Mc++11} > # If the compiler is not C++11 capable, disable clang and use gcc = instead. > __DEFAULT_YES_OPTIONS+=3DGCC GCC_BOOTSTRAP GNUCXX > __DEFAULT_NO_OPTIONS+=3DCLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC > .elif ${__T} =3D=3D "amd64" || ${__T} =3D=3D "i386" > # On x86, clang is enabled, and will be installed as the default cc. > __DEFAULT_YES_OPTIONS+=3DCLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC > __DEFAULT_NO_OPTIONS+=3DGCC GCC_BOOTSTRAP GNUCXX > .elif ${__TT} =3D=3D "arm" && ${__T:Marm*eb*} =3D=3D "" > # On little-endian arm, clang is enabled, and it is installed as the = default > # cc, but since gcc is unable to build the full clang, disable it by = default. > __DEFAULT_YES_OPTIONS+=3DCLANG CLANG_BOOTSTRAP CLANG_IS_CC > __DEFAULT_NO_OPTIONS+=3DCLANG_FULL GCC GCC_BOOTSTRAP GNUCXX > .elif ${__T:Mpowerpc*} > # On powerpc, clang is enabled, but gcc is installed as the default = cc. > __DEFAULT_YES_OPTIONS+=3DCLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX > __DEFAULT_NO_OPTIONS+=3DCLANG_BOOTSTRAP CLANG_IS_CC > .else > # Everything else disables clang, and uses gcc instead. > __DEFAULT_YES_OPTIONS+=3DGCC GCC_BOOTSTRAP GNUCXX > __DEFAULT_NO_OPTIONS+=3DCLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC > .endif >=20 >=20 >=20 > By contrast the old bsd.own.mk logic from 10.1-STABLE did not depend = on testing !${COMPILER_FEATURES:Mc++11} (or analogous) before deciding = for powerpc/powerpc64... >=20 > # Clang is only for x86, powerpc and little-endian arm right now, by = default. > .if ${__T} =3D=3D "amd64" || ${__T} =3D=3D "i386" || ${__T:Mpowerpc*} > __DEFAULT_YES_OPTIONS+=3DCLANG CLANG_FULL > .elif ${__T} =3D=3D "arm" || ${__T} =3D=3D "armv6" > __DEFAULT_YES_OPTIONS+=3DCLANG > # GCC is unable to build the full clang on arm, disable it by default. > __DEFAULT_NO_OPTIONS+=3DCLANG_FULL > .else > __DEFAULT_NO_OPTIONS+=3DCLANG CLANG_FULL > .endif > # Clang the default system compiler only on little-endian arm and x86. > .if ${__T} =3D=3D "amd64" || ${__T} =3D=3D "arm" || ${__T} =3D=3D = "armv6" || \ > ${__T} =3D=3D "i386" > __DEFAULT_YES_OPTIONS+=3DCLANG_IS_CC > # The pc98 bootloader requires gcc to build and so we must leave gcc = enabled > # for pc98 for now. > .if ${__TT} =3D=3D "pc98" > __DEFAULT_NO_OPTIONS+=3DGNUCXX > __DEFAULT_YES_OPTIONS+=3DGCC > .else > __DEFAULT_NO_OPTIONS+=3DGCC GNUCXX > .endif > .else > # If clang is not cc, then build gcc by default > __DEFAULT_NO_OPTIONS+=3DCLANG_IS_CC > __DEFAULT_YES_OPTIONS+=3DGCC > # And if g++ is c++, build the rest of the GNU C++ stack > .if defined(WITHOUT_CXX) > __DEFAULT_NO_OPTIONS+=3DGNUCXX > .else > __DEFAULT_YES_OPTIONS+=3DGNUCXX > .endif > .endif >=20 >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 > _______________________________________________ > freebsd-toolchain@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain > To unsubscribe, send any mail to = "freebsd-toolchain-unsubscribe@freebsd.org" --Apple-Mail=_6A1F383F-178D-40FC-8401-540EAFC36504 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 iQIcBAEBCgAGBQJVAX/hAAoJEGwc0Sh9sBEAwgIQANRi0LrupCGQz4G5KErQJxZy bj8D1ePk4nXsoU/wZFqkzBhblVICVINYMz9fp/qo0qCfU1gqvrwS28wl9vX+igSP WsNF/gOy294zfGhsz+Aw4BDXyYIFpYzFzzv7HFHYRasLmdSvVRg7p789ahMv6e1U FaopGD/VKA28CFjeTHO4Q0OED44QPhdEaoPDM+GY3X8wWGNwTrXkrt7vK5yLnlsi u5OlgTERpM4mUGaIcGLsNAGSaXRlDg2bsDCduoL7wRS/KWj7VHEVogzokDuEkIxm y05G6OP+1XolQOV46y1Fmep1ojhTzwOmsVqp3wGLlCbg16E7bD4pTSfyfU1s6n0F MwOqI6ih5v5xCMPmgIVAdwNXpWhkmKbMfkwJkn/RIYXcEFTwLwbADYhnnkuUNmf0 YRxSl8wIh2YQFV0SeSv/0LW5wk9s9N5TLBaPvtY4vQ0+UWm/v9JidE0r0kXAcYpk F3MaMNoDbnrfpHDbN438VYVfaVg0LnEDWVIoa5PFi7UePNx9covi5+fSKCbW7yjZ tWtOnHGnyTJKURoAr+8/PeyLUWwfJ9M8x5qy0UIrXm9Sl9s/dSMPSc6SiVCFjkWm ZzRTZgay229wKNx+m0rHQ6J8Kmde8qXaU5D7cZ36KlWlsOg6jQWmf8Xim7vv7N/9 5Suc1gfvaL4f6gCI++Gj =xlm5 -----END PGP SIGNATURE----- --Apple-Mail=_6A1F383F-178D-40FC-8401-540EAFC36504--