From owner-freebsd-ports@FreeBSD.ORG Tue Mar 1 08:37:28 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C75D8106566B; Tue, 1 Mar 2011 08:37:28 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5A2D78FC13; Tue, 1 Mar 2011 08:37:28 +0000 (UTC) Received: by gwaa18 with SMTP id a18so4369599gwa.17 for ; Tue, 01 Mar 2011 00:37:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=EotIQa+HUbLepFdlvU3Y6i8AJ/Yj0i9SROSw+9bgXXo=; b=Wc83mb5WzMuqLHs3yPdm4dMUNm8PTuXPRiITQ1slreZNDGjCQiBmwQpzJtRjB7zRkj +tdEwxKYRV0vLdHXIgbx27jNXLfXgDRL/IZw/4AZSA4ovQy6x9R3F9GkJ3e0XzYQeQ6X mXwsldjhK3b7fxucmHrlESH581Je3In3Ad/fI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=gfGDZ4WP8rWOH2QcRCGyZyixAAs0KuZ0o7n2kvnvCRK9apZlv+dTFiaZWqVeQikgWO 9RdL+3r/ZWGd0GyxMV+ulay6ajU1ZoCLoAvscBfXGid9XqIwTn6SEacAp7/S0VEhfbQE Er273MlaQrccHWu3wtDYVW3PZFkBNy77WvBdU= MIME-Version: 1.0 Received: by 10.236.109.51 with SMTP id r39mr11351253yhg.66.1298968646829; Tue, 01 Mar 2011 00:37:26 -0800 (PST) Received: by 10.236.108.44 with HTTP; Tue, 1 Mar 2011 00:37:26 -0800 (PST) In-Reply-To: <4D6C793C.7070803@missouri.edu> References: <4D6BB565.3050006@missouri.edu> <4D6C793C.7070803@missouri.edu> Date: Tue, 1 Mar 2011 08:37:26 +0000 Message-ID: From: "b. f." To: Stephen Montgomery-Smith Content-Type: text/plain; charset=ISO-8859-1 Cc: "gerald@FreeBSD.org" , "freebsd-ports@FreeBSD.org" , Ade Lovett Subject: Re: multiple definition of `__i686.get_pc_thunk.bx' X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2011 08:37:28 -0000 On 3/1/11, Stephen Montgomery-Smith wrote: > Stephen Montgomery-Smith wrote: >> b. f. wrote: >>>>> On Sun 27 Feb 2011 at 12:24:06 PST Stephen Montgomery-Smith wrote: ... >>> >>> As is clear from bsd.gcc.mk, in almost every case now in use, >>> USE_FORTRAN sets _USE_GCC, which sets CC, CPP, and CXX to the proper >>> values. Also, it sets USE_BINUTILS where appropriate, which sets LD, >>> etc. The problem is rather with libtool, particularly in the link >>> mode, where it may not respect the choice of compiler and toolchain. >>> This problem has been remarked, for two years or more, in the mailing >>> lists and forums, when people discuss the use of compilers other than >>> the base system compiler. With the recent updates, it is more >>> obtrusive, and several ports that were building successfully with >>> default settings are now broken. This needs to be fixed, and it would >>> be better to fix libtool than to add a bunch of ad-hoc fixes to >>> individual ports. ... > > OK, this problem was more subtle than I originally thought. The error I > pointed out doesn't occur consistently, but it does occur in the context > of building vis5d+. > > But I have a patch that definitely fixes libtool enough for me. What do > you guys think? This perhaps doesn't fix all the problems, but maybe it > can act as a model to fix them all. > > libtool caches more than just the compiler name. It also stores the path to various utilities (ar, as, ld, etc.), various compiler flags, compiler search directories, (pre|post)dep objects, etc. These aren't always used, but they may sometimes be important, and they vary among the different compilers in ports, so I think that any modifications should take these into account. One of the problems is that the upstream developers didn't think that (outside of cross-building, which is handled a bit differently) more than one toolchain would be in use on a given system. On my system I adopted the expedient of modifying bsd.autotools.mk and adding separate per-compiler libtool ports. That's not the prettiest way of handlng this problem either, and it is awkward for the libltdl ports, so I'm not saying that this method should be adopted. b.