From owner-svn-src-all@FreeBSD.ORG Sun Sep 8 20:18:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7776348C; Sun, 8 Sep 2013 20:18:50 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 2F3882F00; Sun, 8 Sep 2013 20:18:50 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 6DD034CEF; Sun, 8 Sep 2013 20:18:49 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 0258B36128; Sun, 8 Sep 2013 22:18:22 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: David Chisnall Subject: Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options References: <201309062008.r86K836C048843@svn.freebsd.org> Date: Sun, 08 Sep 2013 22:18:22 +0200 In-Reply-To: <201309062008.r86K836C048843@svn.freebsd.org> (David Chisnall's message of "Fri, 6 Sep 2013 20:08:03 +0000 (UTC)") Message-ID: <86a9jnoynl.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, dim@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2013 20:18:50 -0000 David Chisnall writes: > Log: > On platforms where clang is the default compiler, don't build gcc or li= bstdc++. This uncovers what I think is a bug in bsd.prog.mk: des@ds4 /usr/src/usr.bin% make =3D=3D=3D> alias (all) =3D=3D=3D> apply (all) =3D=3D=3D> ar (all) =3D=3D=3D> asa (all) =3D=3D=3D> at (all) =3D=3D=3D> atf (all) =3D=3D=3D> atf/atf-config (all) make[2]: /usr/obj/usr/src/usr.bin/atf/atf-config/.depend, 111: ignoring sta= le .depend for /usr/obj/usr/src/tmp/usr/lib/libstdc++.a c++ -O2 -pipe -march=3Dnative -DGDB=3D\"gdb\" -DHAVE_CONFIG_H -I/usr/src/us= r.bin/atf/atf-config/../../../contrib/atf -g -Qunused-arguments -fstack-pro= tector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parame= ter -Wpointer-arith -Wno-uninitialized -Wno-empty-body -Wno-string-plus-int= -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno= -unused-function -Wno-conversion -Wno-c++11-extensions -g -o atf-config at= f-config.o -latf-c++ -latf-c des@ds4 /usr/src/usr.bin% grep libstdc /usr/obj/usr/src/usr.bin/atf/atf-con= fig/.depend=20 atf-config: /usr/obj/usr/src/tmp/usr/lib/libstdc++.a des@ds4 /usr/src/usr.bin% stat /usr/obj/usr/src/tmp/usr/lib/libstdc++.a stat: /usr/obj/usr/src/tmp/usr/lib/libstdc++.a: stat: No such file or direc= tory That line was added by bsd.prog.mk: .if defined(PROG_CXX) .if !empty(CXXFLAGS:M-stdlib=3Dlibc++) echo ${PROG}: ${LIBCPLUSPLUS} >> ${DEPENDFILE} .else echo ${PROG}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE} .endif .endif AFAICT, this logic should be inverted on platforms where clang is the default compiler - perhaps like this: Index: share/mk/bsd.prog.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 --- share/mk/bsd.prog.mk (revision 255393) +++ share/mk/bsd.prog.mk (working copy) @@ -173,7 +173,7 @@ .else echo ${PROG}: ${LIBC} ${DPADD} >> ${DEPENDFILE} .if defined(PROG_CXX) -.if !empty(CXXFLAGS:M-stdlib=3Dlibc++) +.if ${MK_CLANG_IS_CC} !=3D "no" || !empty(CXXFLAGS:M-stdlib=3Dlibc++) echo ${PROG}: ${LIBCPLUSPLUS} >> ${DEPENDFILE} .else echo ${PROG}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE} although this misses the case where CLANG_IS_CC but we still want the old libstdc++ - is that even possible? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no