From: Joern Rennecke Date: Mon, 3 Mar 2014 21:51:58 +0000 (+0000) Subject: opts.h (CL_PCH_IGNORE): Define. X-Git-Tag: releases/gcc-4.9.0~592 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=212bfe71ed5aa782df8d5e5b22b915b65380f9e0;p=thirdparty%2Fgcc.git opts.h (CL_PCH_IGNORE): Define. * opts.h (CL_PCH_IGNORE): Define. * targhooks.c (option_affects_pch_p): Return false for options that have CL_PCH_IGNORE set. * opt-functions.awk: Process PchIgnore. * doc/options.texi: Document PchIgnore. From-SVN: r208292 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db741fd4dd2c..71a56c044741 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2014-03-03 Joern Rennecke + + * opts.h (CL_PCH_IGNORE): Define. + * targhooks.c (option_affects_pch_p): + Return false for options that have CL_PCH_IGNORE set. + * opt-functions.awk: Process PchIgnore. + * doc/options.texi: Document PchIgnore. + 2014-03-03 Bill Schmidt * config/rs6000/rs6000.c (rs6000_preferred_reload_class): Disallow diff --git a/gcc/doc/options.texi b/gcc/doc/options.texi index ff80dac19212..938017adeac8 100644 --- a/gcc/doc/options.texi +++ b/gcc/doc/options.texi @@ -478,4 +478,8 @@ record. @xref{Option file format}. @item NoDWARFRecord The option is omitted from the producer string written by @option{-grecord-gcc-switches}. + +@item PchIgnore +Even if this is a target option, this option will not be recorded / compared +to determine if a precompiled header file matches. @end table diff --git a/gcc/opt-functions.awk b/gcc/opt-functions.awk index 4db2521612f9..381bb50028a3 100644 --- a/gcc/opt-functions.awk +++ b/gcc/opt-functions.awk @@ -97,6 +97,7 @@ function switch_flags (flags) result = result \ test_flag("Common", flags, " | CL_COMMON") \ test_flag("Target", flags, " | CL_TARGET") \ + test_flag("PchIgnore", flags, " | CL_PCH_IGNORE") \ test_flag("Driver", flags, " | CL_DRIVER") \ test_flag("Joined", flags, " | CL_JOINED") \ test_flag("JoinedOrMissing", flags, " | CL_JOINED") \ diff --git a/gcc/opts.h b/gcc/opts.h index 67dc28ba56a2..f69408234039 100644 --- a/gcc/opts.h +++ b/gcc/opts.h @@ -146,6 +146,7 @@ extern const unsigned int cl_lang_count; #define CL_SEPARATE (1U << 23) /* If takes a separate argument. */ #define CL_UNDOCUMENTED (1U << 24) /* Do not output with --help. */ #define CL_NO_DWARF_RECORD (1U << 25) /* Do not add to producer string. */ +#define CL_PCH_IGNORE (1U << 26) /* Do compare state for pch. */ /* Flags for an enumerated option argument. */ #define CL_ENUM_CANONICAL (1 << 0) /* Canonical for this value. */ diff --git a/gcc/targhooks.c b/gcc/targhooks.c index f3b5d5648994..79491c7c59ba 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -1456,6 +1456,8 @@ option_affects_pch_p (int option, struct cl_option_state *state) { if ((cl_options[option].flags & CL_TARGET) == 0) return false; + if ((cl_options[option].flags & CL_PCH_IGNORE) != 0) + return false; if (option_flag_var (option, &global_options) == &target_flags) if (targetm.check_pch_target_flags) return false;