Clang and -frandom-seed
Erik Cederstrand
erik at cederstrand.dk
Mon Nov 22 14:05:27 UTC 2010
Den 21/11/2010 kl. 16.23 skrev Dimitry Andric:
> On 2010-11-15 11:10, Erik Cederstrand wrote:
>
>> Where in the build scripts would I need to add this flag? Something like:
>>
>> CXXFLAGS += -frandom-seed=${.TARGET}
>
> Rather use:
>
> CXXFLAGS+=-frandom-seed=${.IMPSRC:S/^${.CURDIR}\///}
>
> which is rather contorted, but I see no other way to generate a relative
> path. :)
>
> Also, this generates an empty '-frandom-seed=' 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+=-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?
Erik
More information about the freebsd-toolchain
mailing list