From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 10 16:16:16 2013 Return-Path: Delivered-To: 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 EF861B9E for ; Tue, 10 Sep 2013 16:16:16 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay001.isp.belgacom.be (mailrelay001.isp.belgacom.be [195.238.6.51]) by mx1.freebsd.org (Postfix) with ESMTP id 8C2F42764 for ; Tue, 10 Sep 2013 16:16:16 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkEKAJZFL1JbsL2o/2dsb2JhbABbgwd9sCwBk0MXdIMCXzQqiD2fLKBSj3iEBwOQJIdRkWyDIjo Received: from 168.189-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.189.168]) by relay.skynet.be with ESMTP; 10 Sep 2013 18:16:09 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id r8AGG8Df070088 for ; Tue, 10 Sep 2013 18:16:08 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Tue, 10 Sep 2013 18:16:01 +0200 From: Tijl Coosemans To: toolchain@FreeBSD.org Subject: i386 clang optimisation problem with stack alignment Message-ID: <20130910181601.2e89af87@kalimero.tijl.coosemans.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA256; boundary="Sig_/gEVVo3ItF0VCrtW6P+SuGFL"; protocol="application/pgp-signature" X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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: Tue, 10 Sep 2013 16:16:17 -0000 --Sig_/gEVVo3ItF0VCrtW6P+SuGFL Content-Type: multipart/mixed; boundary="MP_/OBal1sZBrqwL6nV1BuLfBxk" --MP_/OBal1sZBrqwL6nV1BuLfBxk Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I've attached a small test program extracted from multimedia/gstreamer-ffmp= eg (libavcodec/h264_cabac.c:ff_h264_init_cabac_states(H264Context *h)). When you compile and run it like this on FreeBSD/i386, it results in a SIGBUS: % cc -o paddd paddd.c -O3 -msse2 -fPIE -fomit-frame-pointer=20 % ./paddd Bus error The reason is this instruction where %esp isn't 16-byte aligned: paddd (%esp), %xmm7 Is this an upstream bug or is this because of local changes (to make the stack 4 byte aligned by default or something)? --MP_/OBal1sZBrqwL6nV1BuLfBxk-- --Sig_/gEVVo3ItF0VCrtW6P+SuGFL Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iF4EAREIAAYFAlIvRccACgkQfoCS2CCgtit/jgD/a+S+G3cvtUtMLnJWPjsPmvdB zvkRsr9B64VuWVEPsOAA/jDa4txTanfzio69/H3qHv0aeTJe9MXR2PsNgAuAne0b =iiie -----END PGP SIGNATURE----- --Sig_/gEVVo3ItF0VCrtW6P+SuGFL-- From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 10 16:35:07 2013 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 544FE425 for ; Tue, 10 Sep 2013 16:35:07 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay009.isp.belgacom.be (mailrelay009.isp.belgacom.be [195.238.6.176]) by mx1.freebsd.org (Postfix) with ESMTP id E674828ED for ; Tue, 10 Sep 2013 16:35:06 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AloGAIlJL1JbsL2o/2dsb2JhbABbgwd9v1CCfIEkF3SCJQEBBVYzCxgJJQ8qHogfwCiPYhaEBwOQJIdRkWyDIjo Received: from 168.189-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.189.168]) by relay.skynet.be with ESMTP; 10 Sep 2013 18:34:58 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id r8AGYvHf070380 for ; Tue, 10 Sep 2013 18:34:57 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Tue, 10 Sep 2013 18:34:56 +0200 From: Tijl Coosemans To: toolchain@FreeBSD.org Subject: Re: i386 clang optimisation problem with stack alignment Message-ID: <20130910183456.175162f7@kalimero.tijl.coosemans.org> In-Reply-To: <20130910181601.2e89af87@kalimero.tijl.coosemans.org> References: <20130910181601.2e89af87@kalimero.tijl.coosemans.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA256; boundary="Sig_/5VDEFAF.LE0.vGvdKaQumHB"; protocol="application/pgp-signature" 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: Tue, 10 Sep 2013 16:35:07 -0000 --Sig_/5VDEFAF.LE0.vGvdKaQumHB Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 10 Sep 2013 18:16:01 +0200 Tijl Coosemans wrote: > I've attached a small test program extracted from multimedia/gstreamer-ff= mpeg > (libavcodec/h264_cabac.c:ff_h264_init_cabac_states(H264Context *h)). >=20 > When you compile and run it like this on FreeBSD/i386, it results in a > SIGBUS: >=20 > % cc -o paddd paddd.c -O3 -msse2 -fPIE -fomit-frame-pointer=20 > % ./paddd > Bus error >=20 > The reason is this instruction where %esp isn't 16-byte aligned: > paddd (%esp), %xmm7 >=20 > Is this an upstream bug or is this because of local changes (to make the > stack 4 byte aligned by default or something)? Sigh, let me just inline the attachment: #define NUM 16 signed char state[NUM]; signed char tab[NUM][2]; void init_states(int slice) { int i; /* calculate pre-state */ for( i=3D 0; i < NUM; i++ ) { int pre =3D 2*(((tab[i][0] * slice) >>4 ) + tab[i][1]) - 127; pre^=3D pre>>31; if(pre > 124) pre=3D 124 + (pre&1); state[i] =3D pre; } } int main(void) { init_states(10); } --Sig_/5VDEFAF.LE0.vGvdKaQumHB Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iF4EAREIAAYFAlIvSjEACgkQfoCS2CCgtivHBgD9Hk96eyg3rHbXETFqcIE1TxOb /DZOb3Dkr3apof85M/AA/06mAtqDSj8sfqCOL6bEYRqtbdzhiZlIgilI4rjJRZAL =fJ17 -----END PGP SIGNATURE----- --Sig_/5VDEFAF.LE0.vGvdKaQumHB-- From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 11 20:28:30 2013 Return-Path: Delivered-To: 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 12EA59BA; Wed, 11 Sep 2013 20:28:30 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CE6532611; Wed, 11 Sep 2013 20:28:29 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r8BKST9r053636; Wed, 11 Sep 2013 20:28:29 GMT (envelope-from obrien@freefall.freebsd.org) Received: (from obrien@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r8BKSS1o053630; Wed, 11 Sep 2013 20:28:28 GMT (envelope-from obrien) Date: Wed, 11 Sep 2013 13:28:27 -0700 From: "David O'Brien" To: David Chisnall Subject: Re: GCC withdraw Message-ID: <20130911202827.GC85978@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, David Chisnall , John Baldwin , "Sam Fourman Jr." , toolchain@FreeBSD.org, "freebsd-current@freebsd.org CURRENT" , Boris Samorodov , FreeBSD Current References: <20130822200902.GG94127@funkthat.com> <201308291057.43027.jhb@freebsd.org> <8F836479-BC3A-4679-A7AA-3BCDD34AE6C5@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8F836479-BC3A-4679-A7AA-3BCDD34AE6C5@FreeBSD.org> X-Operating-System: FreeBSD 10.0-CURRENT X-MUA-Host: dragon.NUXI.org X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-NSA-real-insignia: https://www.eff.org/sites/default/files/nsa-all-your-data.png User-Agent: Mutt/1.5.20 (2009-06-14) Cc: FreeBSD Current , John Baldwin , toolchain@FreeBSD.org, "freebsd-current@freebsd.org CURRENT" , Boris Samorodov X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: obrien@freebsd.org List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2013 20:28:30 -0000 On Thu, Aug 29, 2013 at 06:02:06PM +0100, David Chisnall wrote: > rather busy organising the DevSummit. The notes for the sessions will > be posted to various mailing lists soon (and summarised for a special > status report), but since the ports and toolchain build sessions are > already largely up you can check these on the wiki. You'll notice that > in both sessions the topic of removing gcc / libstdc++ was raised and > there was no objection (not sure if it's in the notes, but there was a > lot of support during the ports session from people who didn't want the > pain of maintaining compatibility with gcc-in-base, and especially with > g++/libstdc++ in base). And committers need to learn that Devsummit discussions (and optional wiki's) are just like IRC ones -- we're all not there. But we're on the mailing lists. That's how we communicate far-and-wide. John and others bring up really good points. Until GCC is no longer used to build FreeBSD on any platform it should remain in all platforms. If part of your reasoning is to free up "gcc" and "g++" commands for ports -- fine, but change the names /usr/bin/gcc and /usr/bin/g++ on all platforms for something else. /usr/bin/fbsd-gcc & /usr/bin/fbsd-g++ or what not. -- -- David (obrien@FreeBSD.org) From owner-freebsd-toolchain@FreeBSD.ORG Fri Sep 13 01:54:37 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 AD0C5925 for ; Fri, 13 Sep 2013 01:54:37 +0000 (UTC) (envelope-from murray@stokely.org) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F46C2D69 for ; Fri, 13 Sep 2013 01:54:36 +0000 (UTC) Received: by mail-vb0-f43.google.com with SMTP id h11so476793vbh.2 for ; Thu, 12 Sep 2013 18:54:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to:content-type; bh=GJv4Aj5pl/SZimx5lQ2IWg4fk2M3mtMYbR/6cqU0VZ0=; b=P2VhrLc0FO7QR7fLm+g3ejtzj2N5fZLr5rv0bt9w4uSZTWXjEDuFbJgA5JWig0CYnR AYPlAMjLB+sBO4ZmVEcV0cEOC93UegTSd9JQH/Y5dd9psQ9sdBNbInfa+xMqiVpAkXB6 gwJVI4uEZFccO+RK4B77GFvnXeI7JkYzDHOTx2iXyDUGSXhKPSGZAbZ0xXIXT3a1s8a1 IdMuwtacUdDBNSNQnfzrw9eL+4dL37UBDJlyn3ho+Wv7ExhTN8A6KfM15K91afItfxyp l+9oDY1CCpcxFhvaVagAQUuFr+lmqFsYD0M/Y1iqexrall1piyzHkhMen2vfFcjchuO9 VDbw== X-Gm-Message-State: ALoCoQm2RX/w6lLKcQQBf3jG6K/mhjKoZBr3w0dpuWaXrwJIFLenZAiuG6eGwbqdElPAdOWrksFS MIME-Version: 1.0 X-Received: by 10.52.173.165 with SMTP id bl5mr8136777vdc.18.1379035966162; Thu, 12 Sep 2013 18:32:46 -0700 (PDT) Sender: murray@stokely.org Received: by 10.220.137.204 with HTTP; Thu, 12 Sep 2013 18:32:46 -0700 (PDT) Date: Thu, 12 Sep 2013 18:32:46 -0700 X-Google-Sender-Auth: w15v2gbSmRxkYFhqdFRAj76ZT3c Message-ID: Subject: Best autoconf recipe to use for modern FreeBSD From: Murray Stokely To: freebsd-toolchain@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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 01:54:37 -0000 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? - Murray From owner-freebsd-toolchain@FreeBSD.ORG Fri Sep 13 01:56:55 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 123F9957 for ; Fri, 13 Sep 2013 01:56:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-oa0-f50.google.com (mail-oa0-f50.google.com [209.85.219.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D145F2D78 for ; Fri, 13 Sep 2013 01:56:54 +0000 (UTC) Received: by mail-oa0-f50.google.com with SMTP id i4so639655oah.9 for ; Thu, 12 Sep 2013 18:56:48 -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=MP4B//kxLlLTrpSMRVaEWPOBnkkMig4NpqVcA6I2g9I=; b=XI/Y1LDMwwyA7b+qQLxTKTvcw6xufJoUwxAnFP31SA78C98EHmjeJd/OGgwtNtxeA/ LirvwaJ4GkIujvJscU/833XVymlgyJ2DTGqjE0VxCBLh3XrD1WADLxBuCzuYkdD50sZG cdp2FQooKF0/YVNI5bW1FNvSh1JaMYa98ZPeIb1ApziF039yEJaTZPEkhYzQmkPeK7mq tcm2u/L4nC5VN6dUjlxl6cnR7JpAN3FsUJf2Az1U6PAW63gtl0MZDniafq49dfGYUbu9 z18rvPctzjxzmxoFi9CTC21DGWbHSvsLdtwPo6DjoYepJdtmeFxREGngoWoWzPiAJXIb V+Rg== X-Gm-Message-State: ALoCoQlZAFzkpmGHL3WRfbjb6FSAwntt+Rkg4BlG4DhiiaRYnhbAkLoUOGytUnCj0+iloZf7bi/K X-Received: by 10.60.138.136 with SMTP id qq8mr4977188oeb.59.1379037408596; Thu, 12 Sep 2013 18:56:48 -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 ru3sm10086296obc.2.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Sep 2013 18:56:48 -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 19:56:44 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: 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 01:56:55 -0000 On Sep 12, 2013, at 7:32 PM, Murray Stokely wrote: > Some application software I use seems to prefer ancient gcc release or > gcc46 from ports rather than clang. >=20 > Is there a recommended autoconf recipe for third party software to use = the > right compilers across FreeBSD versions? I thought the compiler was passed with the CC variable to gnu = configure... Or are you asking for something else? Warner= 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 From owner-freebsd-toolchain@FreeBSD.ORG Fri Sep 13 11:33:04 2013 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 16FD3B13 for ; Fri, 13 Sep 2013 11:33:04 +0000 (UTC) (envelope-from murray@stokely.org) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C971C2B9A for ; Fri, 13 Sep 2013 11:33:03 +0000 (UTC) Received: by mail-ve0-f182.google.com with SMTP id oy12so862018veb.13 for ; Fri, 13 Sep 2013 04:32:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=mZLi62UOSf1KjMnOFESfNFkqO1YRJLEvjECbBOCnYiU=; b=kmk01qjVL/XiJA+BL5cvuQ/yFSL7QLXgiTFl257X4AVTExc0VVHVLCCprJhsv7HPOu ASzeWos7ePPYotTdZxKb4Qc27YANiM8bItpdJBz0UrP2NO9YW3i7Rq6O428zl9AjcHZ2 kNqOCBIY0GLkfOxXRL8QAsXiQZu/j9Ev4tBPY/U7ME/ooe0cUA3qRbr3OEm+kVUOlcGk GOPv9s4TDmoD5fO7hKICrzKwZzbRpDUqm7aBHNBSRcm5gpNTF9vxUVIw5vmJixkjkZxa H657A4tyR8n2kN5krGFG0JLEEs00QhoceChVtalkwRDulUGeXbn2CXhB7/W9q2YoiDaE o/Sw== X-Gm-Message-State: ALoCoQng4XlFowqJ5e5PT5/Veb3U5GAZYNTW06ZKw+g5seg9+6jQomlk9kH91AlcgxKRx/Y1LfnC MIME-Version: 1.0 X-Received: by 10.221.24.70 with SMTP id rd6mr14527vcb.42.1379038243215; Thu, 12 Sep 2013 19:10:43 -0700 (PDT) Received: by 10.220.137.204 with HTTP; Thu, 12 Sep 2013 19:10:43 -0700 (PDT) In-Reply-To: References: Date: Thu, 12 Sep 2013 19:10:43 -0700 Message-ID: Subject: Re: Best autoconf recipe to use for modern FreeBSD From: Murray Stokely To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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 11:33:04 -0000 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. Given the preference for gcc in configure I guess I could just use something as simple as : if uname="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 ? - Murray On Thu, Sep 12, 2013 at 6:56 PM, Warner Losh wrote: > > On Sep 12, 2013, at 7:32 PM, Murray Stokely wrote: > > > 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? > > I thought the compiler was passed with the CC variable to gnu configure... > Or are you asking for something else? > > Warner