public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/103398] New: configure: Enable --enable-default-pie by default for Linux
@ 2021-11-23 21:46 i at maskray dot me
2021-11-23 22:27 ` [Bug driver/103398] " pinskia at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: i at maskray dot me @ 2021-11-23 21:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103398
Bug ID: 103398
Summary: configure: Enable --enable-default-pie by default for
Linux
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: i at maskray dot me
Target Milestone: ---
Many Linux distros configure GCC with --enable-default-pie (at least
Arch/Debian/Fedora/Gentoo/Ubuntu). I think it makes sense to default to
--enable-default-pie for Linux.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug driver/103398] configure: Enable --enable-default-pie by default for Linux
2021-11-23 21:46 [Bug driver/103398] New: configure: Enable --enable-default-pie by default for Linux i at maskray dot me
@ 2021-11-23 22:27 ` pinskia at gcc dot gnu.org
2021-11-24 1:02 ` i at maskray dot me
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-23 22:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103398
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WONTFIX
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
No. The whole reason why there is an option is because it is optional.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug driver/103398] configure: Enable --enable-default-pie by default for Linux
2021-11-23 21:46 [Bug driver/103398] New: configure: Enable --enable-default-pie by default for Linux i at maskray dot me
2021-11-23 22:27 ` [Bug driver/103398] " pinskia at gcc dot gnu.org
@ 2021-11-24 1:02 ` i at maskray dot me
2021-11-24 1:03 ` sam at gentoo dot org
2023-10-18 21:14 ` mark.esler at canonical dot com
3 siblings, 0 replies; 5+ messages in thread
From: i at maskray dot me @ 2021-11-24 1:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103398
--- Comment #2 from Fangrui Song <i at maskray dot me> ---
I want to switch the default because:
* It seems to me that every Linux distro uses --enable-default-pie GCC. I use
"many", but it is likely "most" at this point (2021).
* When a user builds GCC on Linux, the generated GCC does not default PIE. This
almost certainly does not match the behavior of their host GCC.
On the libc-alpha mailing list, I have seen that contributors waste time
because they don't notice that scripts/build-many-glibcs.py built GCC uses the
implicit --disable-default-pie, which has a behavior different from the host
GCC or cross compiler provided by system packages.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug driver/103398] configure: Enable --enable-default-pie by default for Linux
2021-11-23 21:46 [Bug driver/103398] New: configure: Enable --enable-default-pie by default for Linux i at maskray dot me
2021-11-23 22:27 ` [Bug driver/103398] " pinskia at gcc dot gnu.org
2021-11-24 1:02 ` i at maskray dot me
@ 2021-11-24 1:03 ` sam at gentoo dot org
2023-10-18 21:14 ` mark.esler at canonical dot com
3 siblings, 0 replies; 5+ messages in thread
From: sam at gentoo dot org @ 2021-11-24 1:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103398
--- Comment #3 from Sam James <sam at gentoo dot org> ---
(In reply to Andrew Pinski from comment #1)
> No. The whole reason why there is an option is because it is optional.
A fair amount of future-new-defaults start off as optional and eventually
become it. This isn't a particularly strong reason to reject it.
The alternative would be that there was.. never a configure option? And one day
it just flipped without any chance of changing it? I think this would probably
benefit from more discussion.
As meowray noted, this has been set by every major Linux distro for quite some
time. It would make sense to re-evaluate GCC's defaults in that context and
whether the reasons for them still make sense.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug driver/103398] configure: Enable --enable-default-pie by default for Linux
2021-11-23 21:46 [Bug driver/103398] New: configure: Enable --enable-default-pie by default for Linux i at maskray dot me
` (2 preceding siblings ...)
2021-11-24 1:03 ` sam at gentoo dot org
@ 2023-10-18 21:14 ` mark.esler at canonical dot com
3 siblings, 0 replies; 5+ messages in thread
From: mark.esler at canonical dot com @ 2023-10-18 21:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103398
Mark Esler <mark.esler at canonical dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark.esler at canonical dot com
--- Comment #4 from Mark Esler <mark.esler at canonical dot com> ---
(In reply to Andrew Pinski from comment #1)
> No. The whole reason why there is an option is because it is optional.
Could this issue be re-considered?
Or should -fhardened and related endeavors all re-suggest the specific flags
that --enable-default-pie provides?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-10-18 21:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 21:46 [Bug driver/103398] New: configure: Enable --enable-default-pie by default for Linux i at maskray dot me
2021-11-23 22:27 ` [Bug driver/103398] " pinskia at gcc dot gnu.org
2021-11-24 1:02 ` i at maskray dot me
2021-11-24 1:03 ` sam at gentoo dot org
2023-10-18 21:14 ` mark.esler at canonical dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).