Date: Thu, 12 Sep 2013 20:13:59 -0600 From: Warner Losh <imp@bsdimp.com> To: Murray Stokely <murray@stokely.org> Cc: freebsd-toolchain@freebsd.org Subject: Re: Best autoconf recipe to use for modern FreeBSD Message-ID: <48EEFB2B-C6ED-497C-8CBF-8F044C3D96EE@bsdimp.com> In-Reply-To: <CAECWzi%2BaWyvO8JCg2GpyJ8OixRw1NkXtxsV0-U8DBGfeBCPgXQ@mail.gmail.com> References: <CAECWzi%2BxJPHaGDt84e1NpaezK6=H2sjFmVws0dgPG-mX03jhXA@mail.gmail.com> <C15E1ED4-CBBA-41D3-89B3-EBAAB42D8D2A@bsdimp.com> <CAECWzi%2BaWyvO8JCg2GpyJ8OixRw1NkXtxsV0-U8DBGfeBCPgXQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
You might want to ask over in the ports... Since the ports system has a = good mechanism for specifying a good compiler to use. I'm not sure that your approach will actually work, since it is a bit = too fuzzy, but I'm sure others who know better will fill this in... Warner On Sep 12, 2013, at 8:10 PM, Murray Stokely wrote: > Well one can do that, yes, but by default any configure script is = going to look for g++ first, find an ancient g++4.2 installed in = /usr/bin/g++ and use that unless the user specifically sets CC. I'm a = bit fuzzy on the timeline of FreeBSD's transition to clang over the last = few years and so was hoping for a autoconf recipe that prefers the = appropriate compiler (e.g. did we have clang on FreeBSD 7?) when the = user doesn't manually specify CC. >=20 > Given the preference for gcc in configure I guess I could just use = something as simple as : >=20 > if uname=3D"FreeBSD" > # override configure preference for gcc since FreeBSD ships an = ancient one. > AC_PROG_CC(clang llvm-gcc gcc) > AC_PROG_CXX(clang++ llvm-g++ g++) > else > AC_PROG_CC > AC_PROG_CXX > fi >=20 > ?=20 >=20 > - Murray >=20 >=20 >=20 > On Thu, Sep 12, 2013 at 6:56 PM, Warner Losh <imp@bsdimp.com> wrote: >=20 > On Sep 12, 2013, at 7:32 PM, Murray Stokely wrote: >=20 > > Some application software I use seems to prefer ancient gcc release = or > > gcc46 from ports rather than clang. > > > > Is there a recommended autoconf recipe for third party software to = use the > > right compilers across FreeBSD versions? >=20 > I thought the compiler was passed with the CC variable to gnu = configure... Or are you asking for something else? >=20 > Warner >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48EEFB2B-C6ED-497C-8CBF-8F044C3D96EE>