public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/4] config: Allow a host to opt out of PCH.
@ 2021-11-04 20:02 Iain Sandoe
  2021-11-04 20:02 ` [PATCH 1/4] config: Add top-level flag to disable host PCH Iain Sandoe
  2021-11-05  9:42 ` [PATCH 0/4] config: Allow a host to opt out of PCH Richard Biener
  0 siblings, 2 replies; 39+ messages in thread
From: Iain Sandoe @ 2021-11-04 20:02 UTC (permalink / raw)
  To: gcc-patches

GCC (currently) has an implementation of pre-compiled-headers, that relies
on being able to launch the compiler executable at the same address each
time.  This constraint is not permitted by some system security models.

The facility is an optimisation; saving the output of parsing a covering
header file (that may include many others) so that the parsing need not be
repeated when the same set of headers is needed in many places in a project.

The patch series disables the operation of the PCH-related command lines,
but does not cause an error to be emitted.  The intent is that build
recipes that expect PCH to work will continue to operate, but the compiler
no longer acts on them and therefore is no longer bound to the requirement
to launch at a fixed address.

 * When invoked to "generate PCH" the compiler will carry out the parsing
   as before - producing any diagnostics if relevant and then saving a
   stub file (to satisfy build recipe targets).  The stub file is marked as
   invalid PCH.

 * When an include directive is encountered, the compiler no longer checks
   to see if a PCH header is available.

 * The top-level configure option (--disable-host-pch-support) is also
   propagated to libstdc++ where it causes the automatic invocation of the
   existing --disable-libstdxx-pch.

tested on x86_64-darwin, aarch64-darwin, and on x86_64, powerpc64le-linux,
OK for master?
thanks
Iain

Iain Sandoe (4):
  config: Add top-level flag to disable host PCH.
  libstdc++: Adjust build of PCH files accounting configured host
    support.
  libcpp: Honour a configuration without host support for PCH.
  c-family, gcc: Allow configuring without support for PCH.

 Makefile.def              |  9 ++--
 Makefile.in               | 87 +++++++++++++++++++++++++--------------
 configure                 | 42 +++++++++++++++++++
 configure.ac              | 35 ++++++++++++++++
 gcc/c-family/c-pch.c      | 23 ++++++++++-
 gcc/config.in             |  6 +++
 gcc/config/host-darwin.c  | 18 ++++++++
 gcc/configure             | 29 ++++++++++++-
 gcc/configure.ac          | 17 ++++++++
 gcc/doc/install.texi      |  6 +++
 libcpp/config.in          |  3 ++
 libcpp/configure          | 24 +++++++++++
 libcpp/configure.ac       | 16 +++++++
 libcpp/files.c            | 14 +++++++
 libcpp/pch.c              | 12 ++++++
 libstdc++-v3/acinclude.m4 | 49 +++++++++++++---------
 libstdc++-v3/configure    | 71 +++++++++++++++++++++-----------
 libstdc++-v3/configure.ac | 11 ++++-
 18 files changed, 391 insertions(+), 81 deletions(-)

-- 
2.24.3 (Apple Git-128)


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

end of thread, other threads:[~2021-12-06 11:28 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04 20:02 [PATCH 0/4] config: Allow a host to opt out of PCH Iain Sandoe
2021-11-04 20:02 ` [PATCH 1/4] config: Add top-level flag to disable host PCH Iain Sandoe
2021-11-04 20:02   ` [PATCH 2/4] libstdc++: Adjust build of PCH files accounting configured host support Iain Sandoe
2021-11-04 20:02     ` [PATCH 3/4] libcpp: Honour a configuration without host support for PCH Iain Sandoe
2021-11-04 20:02       ` [PATCH 4/4] c-family, gcc: Allow configuring without " Iain Sandoe
     [not found]     ` <EB9AC754-904B-4877-AD17-94886712C10E@gmail.com>
2021-11-05 23:23       ` [PATCH 2/4] libstdc++: Adjust build of PCH files accounting configured host support Jonathan Wakely
2021-11-05  9:42 ` [PATCH 0/4] config: Allow a host to opt out of PCH Richard Biener
2021-11-05  9:54   ` Jakub Jelinek
2021-11-05 10:31     ` Richard Biener
2021-11-05 15:25       ` Jakub Jelinek
2021-11-05 16:37         ` Iain Sandoe
2021-11-08  7:16           ` Richard Biener
2021-11-08  7:43             ` Iain Sandoe
2021-11-08 11:46           ` Jakub Jelinek
2021-11-08 19:48             ` [PATCH] pch: Add support for PCH for relocatable executables Jakub Jelinek
2021-11-08 21:03               ` John David Anglin
2021-11-09  9:50                 ` Jakub Jelinek
2021-11-09  7:12               ` Richard Biener
2021-11-09  8:07                 ` Iain Sandoe
2021-11-09 11:40                   ` Iain Sandoe
2021-11-09 12:18                     ` Jakub Jelinek
2021-11-10  8:14                       ` Iain Sandoe
2021-11-10 20:24                         ` Iain Sandoe
2021-11-13 20:32                           ` Iain Sandoe
2021-11-16  8:52                             ` Jakub Jelinek
2021-11-09  9:44                 ` Jakub Jelinek
2021-11-09 11:32                   ` Jakub Jelinek
2021-11-09 12:03                     ` Richard Biener
2021-11-09 12:29                       ` Jakub Jelinek
2021-11-09 14:41                         ` Andrew MacLeod
2021-11-09 14:58                           ` Jakub Jelinek
2021-11-09 15:23                             ` Andrew MacLeod
2021-11-09 15:28                               ` Jakub Jelinek
2021-11-09 18:29                                 ` [COMMITTED] Keep x_range_query NULL for global ranges Andrew MacLeod
2021-11-18  8:04               ` [PATCH] pch, v2: Add support for PCH for relocatable executables Jakub Jelinek
2021-12-02 18:26                 ` Jeff Law
2021-12-06 10:00                 ` Martin Liška
2021-12-06 10:23                   ` [committed] avr: Fix AVR build [PR71934] Jakub Jelinek
2021-12-06 11:28                     ` Martin Liška

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