From owner-freebsd-ports@FreeBSD.ORG Mon Mar 25 17:21:18 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 34045F4F; Mon, 25 Mar 2013 17:21:18 +0000 (UTC) (envelope-from andrew.w.nosenko@gmail.com) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) by mx1.freebsd.org (Postfix) with ESMTP id 018803A4; Mon, 25 Mar 2013 17:21:17 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id a11so7630989iee.11 for ; Mon, 25 Mar 2013 10:21:17 -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=qXZ60GW/ZJIKUIlusx2yLTfiMcHaoHNduWUl4k0EZXE=; b=QR3fwgBQJrezjMuIN+y8uN8J9BVkr0WMHGmj+7KgTwIWxwvPzQKM9IndCdGpRuEIe/ XIa5DdZ9wpT4d3EWLpi1MsgrzKGpZtmms8xvZGTUYjfdAIUJrbodtqO9z7uxMVbIqP/V LPzteFwgT3QVEzxVAR+RuRWvxx+9e81UHhXhYGZJtZIHmygOzepI+6V8KKdZz6NYlj2c bOSl+N/7F9eeVsidD4LtjHK7Qcooz9uEqRi4cwufzliGtmNwuHzSHKwsWLa9s5nGy0pk WHJU9C4fcmCAi9qt3MMqCCJCNb2nFQWtC3zpZccE4U3zqWIa4T+WcmiB4hXMAMhtkaNS Sz6A== MIME-Version: 1.0 X-Received: by 10.50.51.226 with SMTP id n2mr8676614igo.25.1364232077697; Mon, 25 Mar 2013 10:21:17 -0700 (PDT) Received: by 10.64.68.106 with HTTP; Mon, 25 Mar 2013 10:21:17 -0700 (PDT) In-Reply-To: References: <201303251549.r2PFnx8W004768@mech-cluster241.men.bris.ac.uk> Date: Mon, 25 Mar 2013 19:21:17 +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: Gerald Pfeifer Content-Type: text/plain; charset=ISO-8859-1 Cc: Anton Shterenlikht , 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: Mon, 25 Mar 2013 17:21:18 -0000 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. Reason, as I see it, the reality may be slightly different or more complex, but, I hope it will give a hint about direction: 1. glib'c configure checks whether -Bsymbolic-functions option is supported by linker (by passing it as -Wl,-Bsymbolic-functions through CC/CXX frontend) 2. Because gcc47 frontend calls /usr/local/lib/ld, which is fresh enough, the check passes as "supported". 3. configure registers gcc47 as linker frontend, generates libtool script, and so on... 4. At the real link time the port machinery hijacks invocations to the generated libtool scrips and redirects them to the own gnome-libtool, which know nothing about configure results, and which uses hardcoded "cc" instead of requested gcc47 5. cc is /usr/bin/cc aka gcc-4.2 in my case. It uses /usr/bin/ld (from base) instead of /usr/local/bin/ld (from ports). 6. Base version lf ld is old enough and know nothing about -Bsymbolic-functions flag. 7. As consequence, build finishes with linker error. Again: The description above may be inaccurate or wrong in details. I didn't investigate the problem throughly. But it is how it looks like. -- Andrew W. Nosenko