Re: Building clang in buildworld as part of the bootstrap process -- is it really necessary?

2014-09-05 Thread Garrett Cooper

> tl;dr: NO.

Makes sense. I'll do some poking around and see if things could potentially be 
optimized with the clang build. On beefy machines it's not a big deal, but as 
we know on machines without a ton of memory or SSDs, it can become painful, as 
expected.

Thanks :)!
-Garrett
___
freebsd-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


Re: Building clang in buildworld as part of the bootstrap process -- is it really necessary?

2014-09-05 Thread Warner Losh

On Sep 5, 2014, at 8:21 PM, Garrett Cooper  wrote:

> Hi all,
>One of the questions that came up from a co-worker is "why do I
> need to build clang in buildworld if I already installed it from
> ports"? I could see some valid reasons for doing this (one needs a
> cross-compiler, one might need specific options that might not be set
> in the ports version), but for native builds I would tend to agree
> with this logic. With gcc it was wasteful building the compiler each
> buildworld, but with clang it seems annoying continuing on this path
> because the compile takes a long time to complete.

The clang built during buildworld is used to bootstrap. So it is required 
sometimes. Usually when there’s a binary compatibility issue, which is rare but 
does happen. It is also installed as cc.

The ports clang may or may not build the world. However, if you want to say “I 
know what I’m doing” you can set WITHOUT_CLANG_BOOTSTRAP and 
WITHOUT_GCC_BOOTSTRAP to tell the build to do no building of bootstrap tools 
and to use the host’s instead. This usually works, but may fail from time to 
time with port-built compilers.

If you don’t want buildworld to build any compiler, you can add WITHOUT_CLANG=t 
and WITHOUT_GCC=t. This will create the system without any compilers. You’ll 
need to set CC to /usr/local/bin/clang35 or whatever as well. There may be 
other settings you need as well.

>Alternatively, would anyone be opposed to adding some logic to
> automatically bypass the bootstrap compiler, i.e. add some logic to
> Makefile.inc1 that would skip compiling clang/gcc if and only if the
> target triplet and version met some required values?

There’s enough violent opposition to this that it will never happen. buildworld 
is supposed to always be safe. Don’t mess with that. It isn’t designed to be 
fast. If you want fast, you can tell it to be fast with different options, but 
it will never be fast by default because we guessed that we think it might be 
safe. don’t mess with buildworld. There might be support for a go-fast 
catch-all flag that sets a bunch of other flags to make things go fast, but 
once you get down that rabbit hole you’ll find one man’s optimization is 
another woman’s intolerable omission.

tl;dr: NO.

Warner



signature.asc
Description: Message signed with OpenPGP using GPGMail


Building clang in buildworld as part of the bootstrap process -- is it really necessary?

2014-09-05 Thread Garrett Cooper
Hi all,
One of the questions that came up from a co-worker is "why do I
need to build clang in buildworld if I already installed it from
ports"? I could see some valid reasons for doing this (one needs a
cross-compiler, one might need specific options that might not be set
in the ports version), but for native builds I would tend to agree
with this logic. With gcc it was wasteful building the compiler each
buildworld, but with clang it seems annoying continuing on this path
because the compile takes a long time to complete.
Alternatively, would anyone be opposed to adding some logic to
automatically bypass the bootstrap compiler, i.e. add some logic to
Makefile.inc1 that would skip compiling clang/gcc if and only if the
target triplet and version met some required values?
Thanks!
-Garrett
___
freebsd-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"