Clang and -frandom-seed

Erik Cederstrand erik at cederstrand.dk
Mon Nov 22 14:55:32 UTC 2010


Den 22/11/2010 kl. 15.47 skrev Erik Cederstrand:

> Den 22/11/2010 kl. 15.24 skrev Dimitry Andric:
> 
>> 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...
> 
> I was wondering, since the first thing usr.bin/clang/clang/Makefile does is import bsd.own.mk. It then imports src/usr.bin/clang/clang.prog.mk which again imports lib/clang/clang.build.mk.
> 
> The Makefiles in lib/clang/[subdir] import lib/clang/clang.lib.mk, which imports bsd.lib.mk, which in turn imports bsd.own.mk. But lib/clang/clang.build.mk is imported first, which is probably why src.conf isn't available in clang.build.mk. Would it be possible to swap the two .includes around in lib/clang/clang.lib.mk?


If not, I added my CXXFLAGS to share/mk/bsd.own.mk which seems logical anyway since other C++ programs may benefit from it.

Erik


More information about the freebsd-toolchain mailing list