<html lang="en"> <head> <title>PCH Target - GNU Compiler Collection (GCC) Internals</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="GNU Compiler Collection (GCC) Internals"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Target-Macros.html#Target-Macros" title="Target Macros"> <link rel="prev" href="MIPS-Coprocessors.html#MIPS-Coprocessors" title="MIPS Coprocessors"> <link rel="next" href="C_002b_002b-ABI.html#C_002b_002b-ABI" title="C++ ABI"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- Copyright (C) 1988-2015 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being ``Funding Free Software'', the Front-Cover Texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the section entitled ``GNU Free Documentation License''. (a) The FSF's Front-Cover Text is: A GNU Manual (b) The FSF's Back-Cover Text is: You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development.--> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <a name="PCH-Target"></a> <p> Next: <a rel="next" accesskey="n" href="C_002b_002b-ABI.html#C_002b_002b-ABI">C++ ABI</a>, Previous: <a rel="previous" accesskey="p" href="MIPS-Coprocessors.html#MIPS-Coprocessors">MIPS Coprocessors</a>, Up: <a rel="up" accesskey="u" href="Target-Macros.html#Target-Macros">Target Macros</a> <hr> </div> <h3 class="section">17.27 Parameters for Precompiled Header Validity Checking</h3> <p><a name="index-parameters_002c-precompiled-headers-4863"></a> <div class="defun"> — Target Hook: void * <b>TARGET_GET_PCH_VALIDITY</b> (<var>size_t *sz</var>)<var><a name="index-TARGET_005fGET_005fPCH_005fVALIDITY-4864"></a></var><br> <blockquote><p>This hook returns a pointer to the data needed by <code>TARGET_PCH_VALID_P</code> and sets ‘<samp><span class="samp">*</span><var>sz</var></samp>’ to the size of the data in bytes. </p></blockquote></div> <div class="defun"> — Target Hook: const char * <b>TARGET_PCH_VALID_P</b> (<var>const void *data, size_t sz</var>)<var><a name="index-TARGET_005fPCH_005fVALID_005fP-4865"></a></var><br> <blockquote><p>This hook checks whether the options used to create a PCH file are compatible with the current settings. It returns <code>NULL</code> if so and a suitable error message if not. Error messages will be presented to the user and must be localized using ‘<samp><span class="samp">_(</span><var>msg</var><span class="samp">)</span></samp>’. <p><var>data</var> is the data that was returned by <code>TARGET_GET_PCH_VALIDITY</code> when the PCH file was created and <var>sz</var> is the size of that data in bytes. It's safe to assume that the data was created by the same version of the compiler, so no format checking is needed. <p>The default definition of <code>default_pch_valid_p</code> should be suitable for most targets. </p></blockquote></div> <div class="defun"> — Target Hook: const char * <b>TARGET_CHECK_PCH_TARGET_FLAGS</b> (<var>int pch_flags</var>)<var><a name="index-TARGET_005fCHECK_005fPCH_005fTARGET_005fFLAGS-4866"></a></var><br> <blockquote><p>If this hook is nonnull, the default implementation of <code>TARGET_PCH_VALID_P</code> will use it to check for compatible values of <code>target_flags</code>. <var>pch_flags</var> specifies the value that <code>target_flags</code> had when the PCH file was created. The return value is the same as for <code>TARGET_PCH_VALID_P</code>. </p></blockquote></div> <div class="defun"> — Target Hook: void <b>TARGET_PREPARE_PCH_SAVE</b> (<var>void</var>)<var><a name="index-TARGET_005fPREPARE_005fPCH_005fSAVE-4867"></a></var><br> <blockquote><p>Called before writing out a PCH file. If the target has some garbage-collected data that needs to be in a particular state on PCH loads, it can use this hook to enforce that state. Very few targets need to do anything here. </p></blockquote></div> </body></html>