From owner-freebsd-ports@FreeBSD.ORG Tue Mar 26 11:33:25 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0919F245; Tue, 26 Mar 2013 11:33:25 +0000 (UTC) (envelope-from andrew.w.nosenko@gmail.com) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) by mx1.freebsd.org (Postfix) with ESMTP id CAA52341; Tue, 26 Mar 2013 11:33:24 +0000 (UTC) Received: by mail-ie0-f175.google.com with SMTP id c12so8735804ieb.34 for ; Tue, 26 Mar 2013 04:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=bkNecxygoRpeFJVgUTfpGrzGF+QVtahgzJ2XT+OGaGo=; b=x1pMIMOPX0BX2PslAtiiJ5BGWlPV3G0A0H90J7ApMXEI+k6xYlegIKI7mTWa9SlPjP U2ZWlVUxMrgc4CuVZeQKteZmQJ2D9wptm2Q+4TMRvI4fcf+yZGxJexIwKged7Apg6zW5 IUQDtADtBaI2ZiJAmXS6msHCgq4klXBFtmYacNMCITmf3jr6WgRGZ7s+SRmvtOCxezVX yRdWkO6rN5znybT2Q6wIqEnGFPQBrXCLwQfxkucPNNuB/Gew5jgqyHV7M/3z3SsVLY2+ EyiCW8jOd6tOnHvVRjVz3p1t4KgZ/MXeePoX2v+t4qbJtAe+KCoBDWwz6BMKlmH7OsMT feTw== MIME-Version: 1.0 X-Received: by 10.50.11.138 with SMTP id q10mr1103001igb.5.1364297604544; Tue, 26 Mar 2013 04:33:24 -0700 (PDT) Received: by 10.64.68.106 with HTTP; Tue, 26 Mar 2013 04:33:24 -0700 (PDT) In-Reply-To: <201303261050.r2QAo9v6041217@mech-cluster241.men.bris.ac.uk> References: <201303261050.r2QAo9v6041217@mech-cluster241.men.bris.ac.uk> Date: Tue, 26 Mar 2013 13:33:24 +0200 Message-ID: Subject: Re: is it a good idea to overwrite GCC_DEFAULT_VERSION= in Mk/bsd.gcc.mk? From: "Andrew W. Nosenko" To: mexas@bristol.ac.uk Content-Type: text/plain; charset=ISO-8859-1 Cc: gerald@pfeifer.com, freebsd-ports@freebsd.org, bdrewery@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2013 11:33:25 -0000 On Tue, Mar 26, 2013 at 12:50 PM, Anton Shterenlikht wrote: > From andrew.w.nosenko@gmail.com Mon Mar 25 18:09:38 2013 > > On Mon, Mar 25, 2013 at 5:59 PM, Gerald Pfeifer wrote: > > On Mon, 25 Mar 2013, Anton Shterenlikht wrote: > >> I've now run ia64 with the above change for over 2 weeks, > >> mostly rebuilding ports, etc. > >> I didn't see any issues with gcc47. > >> So, from my very limited testing, > >> gcc47 can be made default. > > > > Thanks for the feedback, Anton! To really make that switch > > globally, we'll need more extensive testing, a full ports builds > > run, since there is a chance that some port you are not using may > > be broken, and I hope to get this done in the coming weeks. > > >From my expiriense, devel/glib20 cannot be compiled with gcc47. > > Isn't it built with the system default compiler: > > configure:3954: checking for C compiler version > configure:3963: cc --version >&5 > cc (GCC) 4.2.1 20070831 patched [FreeBSD] > > I think we are only talking about updating lang/gcc to 4.7. By default -- yes, it is going to build with base gcc. But topic and, therefore, my reaction was about overriding compiler to be lang/gcc* from ports and whether there are ports, which fail in that case. At least, as I understand it. Now, why overriding the compiler for Glib seems important to me and why I tried to do that: Since commit aba0f0c38bbfa11ad48b5410ebdbed2a99e68c58 Author: Ryan Lortie Date: Tue Oct 18 16:21:50 2011 -0400 gatomic: introduce G_ATOMIC_LOCK_FREE glib atomics implementation depends on gcc predefined macro __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4, which is absent on the base gcc-4.2 and on Clang (all version, at least at that time). As consequence, we have a mutex-based implementation of atomics. Building Glib using more modern GCC (e.g. gcc-4.7) would help, but gnome-libtool hack prevents us from that. See also: Thread "atomic ops broken on mac/xcode" https://mail.gnome.org/archives/gtk-devel-list/2012-August/msg00089.html Gnome bugzilla #682818: atomic ops broken on mac/xcode https://bugzilla.gnome.org/show_bug.cgi?id=682818 LLVM/Clang bugzilla #11174: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_ http://llvm.org/bugs/show_bug.cgi?id=11174 -- Andrew W. Nosenko