From: Duncan <1i5t5.duncan@cox.net>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Re: Re: Common make.conf screwups?
Date: Mon, 22 Nov 2004 02:54:52 -0700 [thread overview]
Message-ID: <pan.2004.11.22.09.54.51.787535@cox.net> (raw)
In-Reply-To: 41A10443.2070108@gentoo.org
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
next prev parent reply other threads:[~2004-11-22 9:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-18 19:45 [gentoo-dev] Common make.conf screwups? Ciaran McCreesh
2004-11-18 20:34 ` Robert Moss
2004-11-18 20:40 ` Ciaran McCreesh
2004-11-18 21:58 ` Robert Moss
2004-11-19 14:50 ` Ned Ludd
2004-11-20 8:17 ` [gentoo-dev] " Duncan
2004-11-21 21:10 ` Robert Moss
2004-11-22 9:54 ` Duncan [this message]
2004-11-22 4:22 ` Luke-Jr
2004-11-19 14:42 ` [gentoo-dev] " Brian Jackson
2004-11-19 22:00 ` Drake Wyrm
2004-11-19 23:31 ` Jason Stubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pan.2004.11.22.09.54.51.787535@cox.net \
--to=1i5t5.duncan@cox.net \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox