Date: Mon, 22 Nov 2010 15:24:13 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Erik Cederstrand <erik@cederstrand.dk> Cc: freebsd-toolchain@freebsd.org Subject: Re: Clang and -frandom-seed Message-ID: <4CEA7D0D.7030309@FreeBSD.org> In-Reply-To: <1F5D7910-3AC6-4ACA-A7C5-EC28B9EABF52@cederstrand.dk> References: <E135940E-F79C-4DFA-811D-18CCBF3C609E@cederstrand.dk> <4CE06C4F.7000002@FreeBSD.org> <FD61324A-1A22-4731-A563-B0BE8AB93069@cederstrand.dk> <4CE93959.7070600@FreeBSD.org> <1F5D7910-3AC6-4ACA-A7C5-EC28B9EABF52@cederstrand.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2010-11-22 15:05, Erik Cederstrand wrote: > .ifdef WITH_DETERMINISTIC > CXXFLAGS+=-frandom-seed=\"${.IMPSRC:S/^${.CURDIR}\///}\" > .endif > > to lib/clang/clang.build.mk > > and "WITH_DETERMINISTIC=true" 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=true buildworld > > Why isn't the flag available in clang.build.mk? Well, src.conf is only picked up if you .include <bsd.own.mk>, or another bsd.*.mk file that includes bsd.own.mk in turn. So normally, you would have a Makefile in e.g. usr.bin/clang/clang, which includes bsd.own.mk, and then includes clang.build.mk. Only in that case the variables from src.conf are available. In contrast, make.conf is read from sys.mk, so its contents are always available. Same if you put variables on the command line; those even override *any* assignment in the Makefiles themselves...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CEA7D0D.7030309>