Clang and -frandom-seed

Erik Cederstrand erik at cederstrand.dk
Mon Nov 22 14:48:00 UTC 2010


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?



Erik


More information about the freebsd-toolchain mailing list