From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20784 invoked from network); 22 Nov 2004 09:55:01 +0000 Received: from smtp.gentoo.org (156.56.111.197) by lists.gentoo.org with AES256-SHA encrypted SMTP; 22 Nov 2004 09:55:01 +0000 Received: from lists.gentoo.org ([156.56.111.196] helo=parrot.gentoo.org) by smtp.gentoo.org with esmtp (Exim 4.41) id 1CWAuS-0004Ce-MD for arch-gentoo-dev@lists.gentoo.org; Mon, 22 Nov 2004 09:55:00 +0000 Received: (qmail 3856 invoked by uid 89); 22 Nov 2004 09:55:00 +0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 6901 invoked from network); 22 Nov 2004 09:55:00 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@lists.gentoo.org From: Duncan <1i5t5.duncan@cox.net> Date: Mon, 22 Nov 2004 02:54:52 -0700 Organization: Sometimes Message-ID: References: <20041118194529.3ff36a8a@snowdrop.home> <419D074E.6010802@gentoo.org> <20041118204021.5f562eb0@snowdrop.home> <419D1B17.7060202@gentoo.org> <41A10443.2070108@gentoo.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1250 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ip68-230-66-193.ph.ph.cox.net User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table) Sender: news Subject: [gentoo-dev] Re: Re: Common make.conf screwups? X-Archives-Salt: 3c19b27a-ad77-4ca4-917d-520c9b89f3de X-Archives-Hash: daa97c305a612fc035efe995ad227243 Robert Moss posted <41A10443.2070108@gentoo.org>, excerpted below, on Sun, 21 Nov 2004 21:10:27 +0000: > No, this is wrong. On amd64, you should *not* use -fPIC in make.conf. > That's been policy since 2004.0. It is required that -fPIC is used for > shared things (such as shared libraries) and it is required that -fPIC is > not used for non-shared things (such as binaries). Thus, it must not be > set in make.conf, otherwise you break this. If something does not compile > without using -fPIC in CFLAGS, then that is a bug. > > Hardened is different, however. > > Duncan wrote: >> No, not all archs follow x86 (or whatever arch rules you are assuming) >> rules. On some archs (amd64 comes to mind as that's what I use), -fPIC >> is required. Gentoo amd64 officially discourages it in make.conf, so as >> to hilite ebuilds which do NOT set it so they can be patched to do so, >> but it's required on the arch, regardless, whether it's configured in >> the source, in the ebuild, or in make.conf, so on some archs anyway, >> it's NOT wrong to have it in make.conf, hardened or not. That's why I said "Gentoo officially discourages". As for required, you are correct that it's "required" for shared libs on amd64. However, you are incorrect in that it's NOT "required that it be OFF for unshared ELF executables, because the fact that I can type this message and send it on such a system, in PAN, on KDE, on X, on Gentoo for amd64, with -fPIC in my CFLAGS when I compiled a good share of what's running, indicates that it cannot be a "requirement" for it to be off in those cases in the same way that it's "required" to be on (on pain of compile error) for libraries. As I stated, "Gentoo officially discourages" setting it in CFLAGS, for bug hunting and reporting reasons, but it works, and some of use use it even on non-hardened (because hardened did NOT work here, couldn't run xorg) because we like the idea of "position independent code" even in our executables, with the fact that it prevents occasional hassles with unpatched libs where it's definitely required, just a very pleasant side effect. -- Duncan - List replies preferred. No HTML msgs. "They that can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety." -- Benjamin Franklin -- gentoo-dev@gentoo.org mailing list