Hi, On 17 Aug 2010, at 12:32, Dimitry Andric wrote: > Hi, > > Since clang has gone into the tree, there has been an effort to get head > in a state where world can optionally be built with it. > [...] > Now, for building clang as the bootstrap compiler, there are basically > two methods to make it use the correct headers, C startup objects, and > libraries from the object tree (${WORLDTMP}): > > 1) The "isysroot" method: build a regular version of clang, and make > sure WMAKEENV contains something like: > > CC="${CC} -isysroot ${WORLDTMP} -B${WORLDTMP}/usr/lib/ \ > -L${WORLDTMP}/usr/lib/" > > 2) The "tools-prefix" method: build a special version of clang, that > has its default search paths for headers, startup objects and > libraries modified, to look for everything under ${WORLDTMP}. > > Method 1) is used in the clangbsd project branch. > > Method 2) is similar to what is used for building the in-tree gcc as > the bootstrap compiler. During the cross-tools stage, TOOLS_PREFIX is > defined to point at ${WORLDTMP}, and the bootstrap gcc's built-in > search paths get prefixed with it. > > An advantage of method 1) is that it does not require any modifications > to the compiler, and basically just a few extra command line arguments. > The same method could probably even be made to work for gcc. > > However, a disadvantage is that the built-in search paths of the > bootstrap compiler are not entirely disabled by using the -isysroot, -B > and -L flags, This could be viewed as a bug ... > so there is still a chance that headers, objects or > libraries outside of ${WORLDTMP} will be picked up during the world > stage. ... and the last thing you want in buildworld is this kind of POLA violation ... > An advantage of method 2) is that you can be 100% sure all built-in > search paths of the bootstrap compiler point to directories under > ${WORLDTMP}. Of course, a disadvantage is that you have to make some > modifications to the compiler source itself. ... so, which fix to the compiler do you want to make? > [etc] -- Bob Bishop rb_at_gid.co.ukReceived on Tue Aug 17 2010 - 10:05:34 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:06 UTC