How exactly does the base toolchain determine WHICH language to build with?
Greetings, Sorry for the long title. I've been [needlessly] struggling with getting ports within the ports tree to build, on a fresh 11-CURRENT install from 2014-11-05. With custom KERNEL and WORLD built, and installed. Here's my situation, which has worked well since ~8.2; make.conf(5) WITHOUT_CLANG=true FAVORITE_COMPILER=gcc src.conf(5) WITHOUT_CLANG=true I'll neither argue, nor defend rational for w/o clang. To boring and out of scope for this thread. That said; I realize that lang/clang(33/34/35) is the default toolchain for 10+, and that's just fine by me. So I shouldn't be terribly surprised when install kernel/world, followed by make delete-old removes the clang built, or provided by the base install from the (initial) install procedure. But what _does_ surprise me, is that the install of lang/gcc-48 does _not_ become the compiler of choice with the above $ENV, after [seemingly] deleting clang. I understand that it may not be advisable to eliminate the default [base] toolchain. But leaving only remnants of clang, causes quite a bit of what I would consider POLA. Given that clang's bin files are [still] located in /usr/bin, while additional compilers are located in /usr/local/bin. All past installs -- even an older 11, did not exhibit this problem. What's changed? What's the rational, and how to best setup an effective build $ENV under the current circumstances? Or is this simply an [unintended] anomaly? Currently, the only way I can envision overcoming this, is by way of make.conf(5). Using the CC, CXX, and CPP directives. Which IMHO is not ideal. Thank you for all your time, and consideration, and sorry for the somewhat longish post. --Chris ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How exactly does the base toolchain determine WHICH language to build with?
On Fri, Nov 7, 2014 at 6:23 PM, Chris H wrote: > Greetings, > Sorry for the long title. I've been [needlessly] struggling > with getting ports within the ports tree to build, on a > fresh 11-CURRENT install from 2014-11-05. With custom > KERNEL and WORLD built, and installed. > Here's my situation, which has worked well since ~8.2; > make.conf(5) > WITHOUT_CLANG=true > FAVORITE_COMPILER=gcc > src.conf(5) > WITHOUT_CLANG=true > > I'll neither argue, nor defend rational for w/o clang. To > boring and out of scope for this thread. That said; I > realize that lang/clang(33/34/35) is the default toolchain > for 10+, and that's just fine by me. So I shouldn't be lang/clang(33/34/35) is not the default toolchain in 10+. 10+ uses a version of clang that is included in the FreeBSD source (/usr/src). > terribly surprised when install kernel/world, followed by > make delete-old removes the clang built, or provided by > the base install from the (initial) install procedure. But > what _does_ surprise me, is that the install of lang/gcc-48 > does _not_ become the compiler of choice with the above > $ENV, after [seemingly] deleting clang. I understand that FAVORITE_COMPILER is used by Mk/Uses/compiler.mk. If you want ports to build with lang/gcc-48, then you would need to check that the ports you are trying to compile have either USES=compiler or USES_GCC defined in their Makefile. Otherwise the ports will use the compiler that is provided by the FreeBSD source (gcc 2.4.x or clang). When WITHOUT_CLANG is defined in make.conf/src.conf. The FreeBSD source will be built using gcc 2.4.x from the FreeBSD source. /usr/bin/{cc,c++} will then be linked to the gcc versions. The ports will then use this version to build if there is no USES_GCC or USES=compiler in the ports Makefile. -- DISCLAIMER: No electrons were maimed while sending this message. Only slightly bruised. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How exactly does the base toolchain determine WHICH language to build with?
On Fri, 7 Nov 2014 22:39:27 -0600 Scot Hetzel wrote > On Fri, Nov 7, 2014 at 6:23 PM, Chris H wrote: > > Greetings, > > Sorry for the long title. I've been [needlessly] struggling > > with getting ports within the ports tree to build, on a > > fresh 11-CURRENT install from 2014-11-05. With custom > > KERNEL and WORLD built, and installed. > > Here's my situation, which has worked well since ~8.2; > > make.conf(5) > > WITHOUT_CLANG=true > > FAVORITE_COMPILER=gcc > > src.conf(5) > > WITHOUT_CLANG=true > > > > I'll neither argue, nor defend rational for w/o clang. To > > boring and out of scope for this thread. That said; I > > realize that lang/clang(33/34/35) is the default toolchain > > for 10+, and that's just fine by me. So I shouldn't be > > lang/clang(33/34/35) is not the default toolchain in 10+. 10+ uses a > version of clang that is included in the FreeBSD source (/usr/src). > > > terribly surprised when install kernel/world, followed by > > make delete-old removes the clang built, or provided by > > the base install from the (initial) install procedure. But > > what _does_ surprise me, is that the install of lang/gcc-48 > > does _not_ become the compiler of choice with the above > > $ENV, after [seemingly] deleting clang. I understand that > > FAVORITE_COMPILER is used by Mk/Uses/compiler.mk. > > If you want ports to build with lang/gcc-48, then you would need to > check that the ports you are trying to compile have either > USES=compiler or USES_GCC defined in their Makefile. Otherwise the > ports will use the compiler that is provided by the FreeBSD source > (gcc 2.4.x or clang). > > When WITHOUT_CLANG is defined in make.conf/src.conf. The FreeBSD > source will be built using gcc 2.4.x from the FreeBSD source. > /usr/bin/{cc,c++} will then be linked to the gcc versions. The ports > will then use this version to build if there is no USES_GCC or > USES=compiler in the ports Makefile. Perfect, and thank you very much, Scott, for the clarification. For what ever reason. Mine (CC,cc++,...) are linked to what's left of clang. I guess I'll need to try and dig deeper, and see if I can discover, why, and what happened. Just for the record. Re-reading my comment above, I realize that my statement regarding clang, might be interpreted as my having negative feelings about clang/llvm. For clarity, that is not the case. This install is targeted at development. As such, I want more granular control of what I build, and test with. So I'll actually be installing every version of lang/clang, and testing accordingly. Thank you again, Scott, for taking the time to respond. --Chris > > -- > DISCLAIMER: > > No electrons were maimed while sending this message. Only slightly bruised. > ___ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org" ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How exactly does the base toolchain determine WHICH language to build with?
On 08 Nov 2014, at 01:23, Chris H wrote: > Sorry for the long title. I've been [needlessly] struggling > with getting ports within the ports tree to build, on a > fresh 11-CURRENT install from 2014-11-05. With custom > KERNEL and WORLD built, and installed. > Here's my situation, which has worked well since ~8.2; > make.conf(5) > WITHOUT_CLANG=true > FAVORITE_COMPILER=gcc > src.conf(5) > WITHOUT_CLANG=true If you don't want to use and build clang at all, I think you also need these two settings (at least on recent -CURRENT): WITHOUT_CLANG_BOOTSTRAP=foo WITHOUT_CLANG_IS_CC=foo The latter variable determines whether /usr/bin/cc, /usr/bin/c++ and so on are linked to clang or gcc. I suspect the root of all your problems is that you don't have this setting. > I'll neither argue, nor defend rational for w/o clang. To > boring and out of scope for this thread. That said; I > realize that lang/clang(33/34/35) is the default toolchain > for 10+, and that's just fine by me. So I shouldn't be > terribly surprised when install kernel/world, followed by > make delete-old removes the clang built, or provided by > the base install from the (initial) install procedure. But > what _does_ surprise me, is that the install of lang/gcc-48 > does _not_ become the compiler of choice with the above > $ENV, after [seemingly] deleting clang. It does not work that way. If you configure the base system to use gcc only, individual ports can decide that they need newer C++ support, or other features not available in the version of gcc in base (which is very old by now). In that case, they will use one of the gcc ports, or possibly even one of the clang ports. -Dimitry ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: How exactly does the base toolchain determine WHICH language to build with?
On Sat, 8 Nov 2014 14:46:21 +0100 Dimitry Andric wrote > On 08 Nov 2014, at 01:23, Chris H wrote: > > Sorry for the long title. I've been [needlessly] struggling > > with getting ports within the ports tree to build, on a > > fresh 11-CURRENT install from 2014-11-05. With custom > > KERNEL and WORLD built, and installed. > > Here's my situation, which has worked well since ~8.2; > > make.conf(5) > > WITHOUT_CLANG=true > > FAVORITE_COMPILER=gcc > > src.conf(5) > > WITHOUT_CLANG=true > > If you don't want to use and build clang at all, I think you also need > these two settings (at least on recent -CURRENT): > > WITHOUT_CLANG_BOOTSTRAP=foo > WITHOUT_CLANG_IS_CC=foo > > The latter variable determines whether /usr/bin/cc, /usr/bin/c++ and so > on are linked to clang or gcc. I suspect the root of all your problems > is that you don't have this setting. > > > > I'll neither argue, nor defend rational for w/o clang. To > > boring and out of scope for this thread. That said; I > > realize that lang/clang(33/34/35) is the default toolchain > > for 10+, and that's just fine by me. So I shouldn't be > > terribly surprised when install kernel/world, followed by > > make delete-old removes the clang built, or provided by > > the base install from the (initial) install procedure. But > > what _does_ surprise me, is that the install of lang/gcc-48 > > does _not_ become the compiler of choice with the above > > $ENV, after [seemingly] deleting clang. > > It does not work that way. If you configure the base system to use gcc > only, individual ports can decide that they need newer C++ support, or > other features not available in the version of gcc in base (which is > very old by now). In that case, they will use one of the gcc ports, > or possibly even one of the clang ports. Ahh. Thank you. It's now perfectly clear, and makes complete sense, now. For the record; I have nothing against clang/llvm, per se. I am just looking to obtain a bit more control over my environment. As this installation is intended for development purposes. In fact, I'll probably install all 3 versions of lang/clang. :) Oh, and GNC C, as well. Thank you again, for the reply. Now that I have also been informed about freebsd-toolchain@. I should probably take this opportunity to apologize for the noise, and thank all for their thoughtful replies. :) --Chris > > -Dimitry ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"