From owner-freebsd-ports@FreeBSD.ORG Thu Apr 28 21:27:11 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DFE5B16A4CE; Thu, 28 Apr 2005 21:27:11 +0000 (GMT) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 958EC43D58; Thu, 28 Apr 2005 21:27:11 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id E68E75E86; Thu, 28 Apr 2005 17:27:10 -0400 (EDT) Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 64129-06; Thu, 28 Apr 2005 17:27:10 -0400 (EDT) Received: from [192.168.1.3] (pool-68-161-53-96.ny325.east.verizon.net [68.161.53.96]) by pi.codefab.com (Postfix) with ESMTP id ACE355EB7; Thu, 28 Apr 2005 17:27:09 -0400 (EDT) Message-ID: <4271550C.8080308@mac.com> Date: Thu, 28 Apr 2005 17:26:36 -0400 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: obrien@freebsd.org References: <20050426170115.GB45067@dragon.NUXI.org> <20050426195809.1fb28305.flynn@energyhq.es.eu.org> <20050428152140.GB53068@dragon.NUXI.org> <20050428163450.GA79570@xor.obsecurity.org> <20050428192005.GA87545@dragon.NUXI.org> In-Reply-To: <20050428192005.GA87545@dragon.NUXI.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at codefab.com cc: michael.hopkins@hopkins-research.com cc: freebsd-ports@freebsd.org cc: freebsd-amd64@freebsd.org Subject: Re: Attempted install of an Obj-C Foundation library X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2005 21:27:12 -0000 David O'Brien wrote: > On Thu, Apr 28, 2005 at 09:34:50AM -0700, Kris Kennaway wrote: [ ... ] >>> That is the shared version of libgcc.a. Why can't you use the static >>> version? >> >> Presumably because it wants to link it to relocatable object files. >> In general amd64 (and ia64 and sparc64) needs a PIC version of every >> system library, which FreeBSD doesn't currently do. > > Though we do have /usr/lib/libgcc_pic.a just for this case. At least at one point, Obj-C and the OPENSTEP frameworks supported static linking. [1] Also, the shared libraries evolved from being compiled against a fixed VM address: #define MH_FVMLIB 0x3 /* fixed VM shared library file */ ...to the current default of being PIC, since there were some very ugly collisions when libraries grew too big and started running over each other: #define MH_DYLIB 0x6 /* dynamically bound shared library */ Of course, the GNUSTEP project is using the native object format (presumably ELF), rather than MachO, but how it handles frameworks-- shared libraries in the local parlance-- is likely to closely resemble how OPENSTEP worked. I don't know whether saying that this stuff used to work on other platforms is useful or not to Michael, but it did. :-) -- -Chuck [1]: At least, there was a static version of the System framework, which includes what FreeBSD puts into libc.a, and I think the basic Foundation classes were also available as a static lib, too. Some of the fancier stuff like EOF or database adaptors, were only available as shared libraries, because those things used Mach's equivalent to dlopen() for dynamicly loading stuff when needed as a matter of course.