On 2010-11-15 11:10, Erik Cederstrand wrote:
I was thinking of something along the same lines. I think we agree
that it only needs to be random across files, not across builds.
Someone on llvm-dev also suggested using the path (either full or
relative to src/) as a seed.

The path should relative, to guarantee the same result for every
location you can put the source.


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.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "[email protected]"

Reply via email to