From owner-cvs-all@FreeBSD.ORG Sat Mar 20 11:05:59 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E537916A4CE; Sat, 20 Mar 2004 11:05:59 -0800 (PST) Received: from smtp.eos.ocn.ne.jp (eos.ocn.ne.jp [211.6.83.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id B032543D1D; Sat, 20 Mar 2004 11:05:59 -0800 (PST) (envelope-from hrs@FreeBSD.org) Received: from delta.allbsd.org (p32146-adsao12honb4-acca.tokyo.ocn.ne.jp [219.161.175.146]) by smtp.eos.ocn.ne.jp (Postfix) with ESMTP id 2BAD2E43; Sun, 21 Mar 2004 04:05:58 +0900 (JST) Received: from localhost (alph.allbsd.org [192.168.0.10]) by delta.allbsd.org (8.12.9p2/8.12.9) with ESMTP id i2KJ55A2072457; Sun, 21 Mar 2004 04:05:06 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sun, 21 Mar 2004 04:03:13 +0900 (JST) Message-Id: <20040321.040313.90113953.hrs@eos.ocn.ne.jp> To: chat95@mac.com From: Hiroki Sato In-Reply-To: <20040319.142958.783378669.chat95@mac.com> References: <20040317111525.GA62305@xor.obsecurity.org> <20040317171904.GC93838@dragon.nuxi.com> <20040319.142958.783378669.chat95@mac.com> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 4.0.62 on Emacs 21.3.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Sun_Mar_21_04_03_14_2004_799)--" Content-Transfer-Encoding: 7bit cc: maho@FreeBSD.org cc: cvs-ports@FreeBSD.org cc: ports-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: kris@obsecurity.org Subject: Re: -fPIC or -fpic? X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2004 19:06:00 -0000 ----Security_Multipart(Sun_Mar_21_04_03_14_2004_799)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Nakata Maho wrote in <20040319.142958.783378669.chat95@mac.com>: chat95> Note: chat95> at least amd64, in some cases, we need -fpic or -fPIC when we make chat95> shared libraries. some programs don't set such flag when compiling as you know. chat95> in i386, we don't need -fpic to make shared lib, so we force to make No, even if for i386 we should add -fpic. Without -fpic (or -fPIC) the dynamic loader has to perform the relocation, and as a result it creates a private copy of the library for each process at runtime. chat95> is not a good idea at all, since it doesn't sync with bsd.lib.mk. chat95> splitting bsd.lib.mk to bsd.lib.pic.mk that contains only this, chat95> then include at bsd.port.mk might be a better idea, but still dirty. chat95> chat95> How do I do? Since this problem depends on the program, putting -fPIC globally is not a good solution and application developers should take care of it, I think. -- | Hiroki SATO ----Security_Multipart(Sun_Mar_21_04_03_14_2004_799)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBAXJVyTyzT2CeTzy0RAgzCAJoCbxVTVptj643rWSNov5b+emUdewCg32NN XscsN9x/abRBfqtGRhm4jSo= =/AKG -----END PGP SIGNATURE----- ----Security_Multipart(Sun_Mar_21_04_03_14_2004_799)----