From owner-freebsd-questions@FreeBSD.ORG Fri Jan 13 05:07:26 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DE411065670 for ; Fri, 13 Jan 2012 05:07:26 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout022.mac.com (asmtpout022.mac.com [17.148.16.97]) by mx1.freebsd.org (Postfix) with ESMTP id 2491C8FC16 for ; Fri, 13 Jan 2012 05:07:25 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from [10.1.2.144] (unknown [173.200.187.194]) by asmtp022.mac.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPSA id <0LXQ00AIN0VTW520@asmtp022.mac.com> for freebsd-questions@freebsd.org; Fri, 13 Jan 2012 05:07:06 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110,1.0.211,0.0.0000 definitions=2012-01-13_02:2012-01-13, 2012-01-13, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1201120379 From: Chuck Swiger In-reply-to: <20120113045355.GA166@aperturescience.org> Date: Thu, 12 Jan 2012 21:07:05 -0800 Message-id: <467D6FA8-F0FA-45B3-B367-20FE9AD6443C@mac.com> References: <20120113045355.GA166@aperturescience.org> To: Dmitry Sarkisov X-Mailer: Apple Mail (2.1084) Cc: freebsd-questions@freebsd.org Subject: Re: Ports with modern compilers X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 05:07:26 -0000 On Jan 12, 2012, at 8:53 PM, Dmitry Sarkisov wrote: > Hello list, > > I'd like to try building my ports with features and optimizations modern complers provide. > A couple of q. here: > > 1. What's the safest (less painful) way to go - build with fresh gcc or clang/llvm? For portable code, there shouldn't be much difference in terms of getting a working result. Clang tries to have better diagnostics than gcc; gcc has been around for a lot longer, and is much more likely to work with less-portable code due to GNU'isms. > 2. Is it ok to build new ports with new compiler, while already having a bunch of them build with default gcc version 4.2.1? Yes. A more complete answer would be mostly, so long as nobody has changed C++ symbol mangling or a host of other details. Have fun, but don't expect too much benefit from recompiling things with a newer compiler. Regards, -- -Chuck