From owner-freebsd-ports@FreeBSD.ORG Mon Feb 20 04:38:15 2006 Return-Path: X-Original-To: freebsd-ports@FreeBSD.org 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 8D40D16A42B for ; Mon, 20 Feb 2006 04:38:15 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B11C43D4C for ; Mon, 20 Feb 2006 04:38:15 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id F38DC1A3C1B; Sun, 19 Feb 2006 20:38:14 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 03D6551870; Sun, 19 Feb 2006 23:38:14 -0500 (EST) Date: Sun, 19 Feb 2006 23:38:13 -0500 From: Kris Kennaway To: pfgshield-freebsd@yahoo.com Message-ID: <20060220043813.GA82552@xor.obsecurity.org> References: <20060220041815.3229.qmail@web32907.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline In-Reply-To: <20060220041815.3229.qmail@web32907.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-ports@FreeBSD.org Subject: Re: amd64 and -fPIC X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2006 04:38:15 -0000 --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 20, 2006 at 05:18:15AM +0100, pfgshield-freebsd@yahoo.com wrote: > Hi; >=20 > amd64 has a rather nasty issue: in order to mix shared and static librari= es > everything has to be built with -fPIC. Most ports are either static or dy= namic > so it's usually not a problem, but I'm stating to find problems in the ma= th > section: packages like arpack and glpk are only built static and without = -fPIC. > And lately we are only building the dynamic version of ATLAS so packages = that > use many math libraries will have problems on amd64. >=20 > Someone would say the easy way out of this would be to add -fPIC to every= thing > by default, which works, but has some performance issues. If someone has a > better solution I would like to hear it (please!) but if not I would like= to > suggest instead a general guideline: >=20 > If the package includes a library that might be used frequently and doesn= 't > include a shared version please add -fPIC to the amd64 version of the por= t, for > example for math/arpack (and feel free to commit this): The best solution is to make the port also build a shared version; it's usually not that difficult to modify the makefile. That way you don't have to add nasty hacks. Kris --h31gzZEtNLTqOjlF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD+Ue1Wry0BWjoQKURApl4AJ4sxK5w66kWfT8Hz9COxF45d/o0NQCg+Y66 hKC/DsC1siWcTOyYUHTRems= =o8Sr -----END PGP SIGNATURE----- --h31gzZEtNLTqOjlF--