From owner-freebsd-toolchain@FreeBSD.ORG Mon Nov 22 14:05:27 2010 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DDC8106564A; Mon, 22 Nov 2010 14:05:27 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp2.one.com (csmtp2.one.com [91.198.169.22]) by mx1.freebsd.org (Postfix) with ESMTP id 889FE8FC12; Mon, 22 Nov 2010 14:05:26 +0000 (UTC) Received: from [192.168.0.22] (0x573fa596.cpe.ge-1-1-0-1109.ronqu1.customer.tele.dk [87.63.165.150]) by csmtp2.one.com (Postfix) with ESMTPA id A9C474BC07C27; Mon, 22 Nov 2010 14:05:24 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: multipart/signed; boundary=Apple-Mail-2732-742395410; protocol="application/pkcs7-signature"; micalg=sha1 From: Erik Cederstrand In-Reply-To: <4CE93959.7070600@FreeBSD.org> Date: Mon, 22 Nov 2010 15:05:24 +0100 Message-Id: <1F5D7910-3AC6-4ACA-A7C5-EC28B9EABF52@cederstrand.dk> References: <4CE06C4F.7000002@FreeBSD.org> <4CE93959.7070600@FreeBSD.org> To: Dimitry Andric X-Mailer: Apple Mail (2.1081) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-toolchain@freebsd.org Subject: Re: Clang and -frandom-seed X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2010 14:05:27 -0000 --Apple-Mail-2732-742395410 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Den 21/11/2010 kl. 16.23 skrev Dimitry Andric: > On 2010-11-15 11:10, Erik Cederstrand wrote: >=20 >> Where in the build scripts would I need to add this flag? Something = like: >>=20 >> CXXFLAGS +=3D -frandom-seed=3D${.TARGET} >=20 > Rather use: >=20 > CXXFLAGS+=3D-frandom-seed=3D${.IMPSRC:S/^${.CURDIR}\///} >=20 > which is rather contorted, but I see no other way to generate a = relative > path. :) >=20 > Also, this generates an empty '-frandom-seed=3D' option for every = command > that uses CXXFLAGS but isn't a compilation at all, such as most = linking > commands. It is probably not harmful, though. I added .ifdef WITH_DETERMINISTIC CXXFLAGS+=3D-frandom-seed=3D\"${.IMPSRC:S/^${.CURDIR}\///}\" .endif to lib/clang/clang.build.mk and "WITH_DETERMINISTIC=3Dtrue" to src.conf, but apparently the flag = isn't being propagated to clang.build.mk. However it is being picked up = if I pass it on the command-line: make WITH_DETERMINISTIC=3Dtrue buildworld Why isn't the flag available in clang.build.mk? Erik= --Apple-Mail-2732-742395410--