From owner-freebsd-toolchain@FreeBSD.ORG Fri Mar 13 03:44:09 2015 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E98EE7B7 for ; Fri, 13 Mar 2015 03:44:09 +0000 (UTC) Received: from asp.reflexion.net (outbound-241.asp.reflexion.net [69.84.129.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D3DCF6F for ; Fri, 13 Mar 2015 03:44:09 +0000 (UTC) Received: (qmail 6730 invoked from network); 13 Mar 2015 03:44:02 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 13 Mar 2015 03:44:02 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v7.40.1) with SMTP; Thu, 12 Mar 2015 23:44:02 -0400 (EDT) Received: (qmail 16958 invoked from network); 13 Mar 2015 03:44:02 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (DHE-RSA-AES256-SHA encrypted) SMTP; 13 Mar 2015 03:44:02 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-67-189-19-145.hsd1.or.comcast.net [67.189.19.145]) by iron2.pdx.net (Postfix) with ESMTPSA id 5EA341C4052; Thu, 12 Mar 2015 20:43:55 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) 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 From: Mark Millard In-Reply-To: <7A17FBA1-9499-4862-83DF-1C4010D96003@dsl-only.net> Date: Thu, 12 Mar 2015 20:43:59 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <7E317915-DBBE-4BCF-B6DD-45F3F723B9AC@dsl-only.net> References: <7A17FBA1-9499-4862-83DF-1C4010D96003@dsl-only.net> To: Nathan Whitehorn 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: Fri, 13 Mar 2015 03:44:10 -0000 Nathan W. wrote: > This is not the right one. That is related to clang 3.4. The issue is=20= > that clang 3.5+ require a C++11 compiler to build. ... The text that I quoted is from the 11.0-CURRENT UPDATING entry that = starts with the non-FreeBSD-variant-specific 3.5.0 background = information below. May be I originally should not have only extracted = the material I thought fit best for being instructions for powerpc64 = 10.x: i.e., I should have given more context. For future readers, quoting more UPDATING context this time... > 20141231: > Clang, llvm and lldb have been upgraded to 3.5.0 release. >=20 > As of this release, a prerequisite for building clang, llvm = and lldb is > a C++11 capable compiler and C++11 standard library. This = means that to > be able to successfully build the cross-tools stage of = buildworld, with > clang as the bootstrap compiler, your system compiler or cross = compiler > should either be clang 3.3 or later, or gcc 4.8 or later, and = your > system C++ library should be libc++, or libdstdc++ from gcc = 4.8 or > later. The later FreeBSD-variants-specific material makes for a complicated to = read entry for powerpc/powerpc64 10.x. Why? Paragraph by paragraph for = the next couple of paragraphs that follow the above... > On any standard FreeBSD 10.x or 11.x installation, where clang = and > libc++ are on by default (that is, on x86 or arm), this should = work out > of the box. "where clang and libc++ are on by default": the libc++ part excludes = powerpc/powerpc64 10.x. The 3.4.1 status for clang is not sufficient = here, despite being after 3.3. > On 9.x installations where clang is enabled by default, e.g. = on x86 and > powerpc, libc++ will not be enabled by default, so libc++ = should be > built (with clang) and installed first. If both clang and = libc++ are > missing, build clang first, then use it to build libc++. The "9.x" wording above makes no mention of 10.x but powerpc/powerpc64 = 10.x also has clang without having libc++ enabled by default. (Nor the = libcxxrt that libc++ requires.) The instructions from here seem to be = the ones that would apply (and likely do for powerpc64 --but not for = powerpc as stands, see later). After that is 8.x, Sparc64, and mips notes that are not a match to the = powerpc/powerpc64 10.x context --and embedded system notes about cross = builds: > On 8.x and earlier installations, upgrade to 9.x first, and = then follow > the instructions for 9.x above. >=20 > Sparc64 and mips users are unaffected, as they still use gcc = 4.2.1 by > default, and do not build clang. >=20 > Many embedded systems are resource constrained, and will not = be able to > build clang in a reasonable time, or in some cases at all. In = those > cases, cross building bootable systems on amd64 is a = workaround. Taken literally no paragraph explicitly covers powerpc/powerpc64 10.x = contexts for how to bootstrap to have clang present in 11.0-CURRENT. By content the one starting with "On 9.x" is the closest match for = powerpc/powerpc64 10.x. My variant text with []'s might better have been: On 9.x installations where clang is enabled by default, e.g. on = x86 and powerpc [10.x too], libc++ will not be enabled by default, so = libc++ should be built (with clang) and installed first. If both clang and = libc++ are missing, build clang first, then use it to build libc++. That would avoid odd implications for the combination x86 and 10.x by = being explicitly localized to powerpc for the 10.x part. But for powerpc (on-64) 10.1-STABLE even that adjustment would be = wrong/incomplete... powerpc 10.1-STABLE (3.4.1 clang present) does not build libcxxrt: > ... > building shared library libcxxrt.so.1 > /usr/bin/ld: warning: creating a DT_TEXTREL in a shared object. > clang: error: linker command failed with exit code 1 (use -v to see = invocation) > *** Error code 1 That in turn means libc++'s build fails from the missing libcxxrt file = that libc++'s build uses in its linking step. That would make it rather hard to follow the instructions. powerpc64 10.1-STABLE had no such problems building and installing those = two libraries. =3D=3D=3D Mark Millard markmi at dsl-only.net On 2015-Mar-12, at 10:01 AM, Mark Millard = wrote: Well there is an entry but when I read it I did not find it clear about = the 10.x status. I think the implication is that the 9.x paragraph also applies to 10.x: On 9.x [and 10.x] installations where clang is enabled by = default, e.g. on x86 and powerpc, libc++ will not be enabled by default, so libc++ should = be built (with clang) and installed first. If both clang and libc++ = are missing, build clang first, then use it to build libc++. =3D=3D=3D Mark Millard markmi at dsl-only.net