public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/67812] New: Default-PIE patch broke building compiler as PIE and on esp toolchains
@ 2015-10-02  0:06 bugdal at aerifal dot cx
  2015-10-02  0:11 ` [Bug other/67812] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bugdal at aerifal dot cx @ 2015-10-02  0:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67812

            Bug ID: 67812
           Summary: Default-PIE patch broke building compiler as PIE and
                    on esp toolchains
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bugdal at aerifal dot cx
  Target Milestone: ---

The default-pie patch added the following to gcc/Makefile.in:

+# We don't want to compile the compilers with -fPIE, it make PCH fail.
+COMPILER += @NO_PIE_CFLAGS@
+
+# Link with -no-pie since we compile the compiler with -fno-PIE.
+LINKER += @NO_PIE_FLAG@

This precludes building the compiler as PIE, which leads to multiple problems:

1. On existing PIE-by-default toolchains (ESP patches), -fno-PIE gets added to
NO_PIE_CFLAGS, but NO_PIE_FLAG remains blank, because the negative option was
called -nopie rather than -no-pie. Using -fno-PIE without -no-pie/-nopie
results in link errors on some host archs.

2. Refusal to build as PIE may violate distro policy of shipping only PIE
binaries.

3. For nommu systems, building as PIE is mandatory; non-PIE binaries simply
cannot run.

If there's an issue where PCH does not work with PIE then PCH should just be
disabled when the compiler is built as PIE. This worked fine before, and is
completely orthogonal to whether the compiler produces PIE by default; one is a
host issue and the other is a target issue.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-02  3:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-02  0:06 [Bug other/67812] New: Default-PIE patch broke building compiler as PIE and on esp toolchains bugdal at aerifal dot cx
2015-10-02  0:11 ` [Bug other/67812] " pinskia at gcc dot gnu.org
2015-10-02  0:20 ` bugdal at aerifal dot cx
2015-10-02  3:18 ` bugdal at aerifal dot cx

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).