From owner-freebsd-toolchain@FreeBSD.ORG Fri Sep 13 02:14:10 2013 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2F0C9B4C for ; Fri, 13 Sep 2013 02:14:10 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ob0-f172.google.com (mail-ob0-f172.google.com [209.85.214.172]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EB16E2E40 for ; Fri, 13 Sep 2013 02:14:09 +0000 (UTC) Received: by mail-ob0-f172.google.com with SMTP id gq1so605063obb.3 for ; Thu, 12 Sep 2013 19:14:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=O52HQdRpDDk9U4SH8rS4QXF186Vqfmv1ljZuu1tv/lw=; b=Ua69NJiyefoGDFRFNNrTI56iRv74Z3CpQf3faQbgvqYV6AnnO6HzxW4jqCEjPazrII 1YPW59jZMy+BVqOKARScpPwgvciQB6z8ZBDmcbDnOZ/npAYB2tXO/ER/cbzMajbG8IRF YH+3acHDiG9m1DSxm+f41WrC2zY6dwVO2ZxJARnLjuVRxys1oNsjAiG8TpLgp3msZE3D tXc8omY9boLEQ8w8LPwoTL2wg9vvHGBEa57R6JqC1rpjiby6IE0GDLSHcfu/Bq2okT3Y uY63fHsCHIbIMcLKBZZ4XAKLisZwAJNScT7KqIp3z99BjL3MZNUgNVyBnKEXBrx+A+ao obqQ== X-Gm-Message-State: ALoCoQkkR7uBkNhJBoGDv7syecYgeISerIurOm4z/x/oKmW1fT+WfwCfqYe17zlwOpDzaaVKZ5FP X-Received: by 10.60.44.240 with SMTP id h16mr9776640oem.2.1379038443187; Thu, 12 Sep 2013 19:14:03 -0700 (PDT) Received: from [10.0.0.53] (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id u3sm10632196oeq.3.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Sep 2013 19:14:02 -0700 (PDT) Sender: Warner Losh Subject: Re: Best autoconf recipe to use for modern FreeBSD Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Thu, 12 Sep 2013 20:13:59 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <48EEFB2B-C6ED-497C-8CBF-8F044C3D96EE@bsdimp.com> References: To: Murray Stokely X-Mailer: Apple Mail (2.1085) Cc: freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2013 02:14:10 -0000 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 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