summaryrefslogtreecommitdiff
path: root/libcpp/init.c
diff options
context:
space:
mode:
authorsimonb <simonb@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-16 17:14:05 +0000
committersimonb <simonb@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-16 17:14:05 +0000
commit52bc861d91439efe60110d1b64280e401ddcf902 (patch)
tree709320b578253406cba90335431f68194bf6b70a /libcpp/init.c
parentb5228c55900494653f0f2050af2b7a5969461594 (diff)
downloadgcc-52bc861d91439efe60110d1b64280e401ddcf902.tar.gz
* include/cpplib.h (struct cpp_options): Add canonical_system_headers.
* files.c (find_file_in_dir): Call maybe_shorter_path() only if canonical_system_headers is set. * init.c (cpp_create_reader): Initialize canonical_system_headers. * configure.ac: Add new --enable-canonical-system-headers. * configure: Regenerate. * config.in: Regenerate. * doc/cppopts.texi: Document -f[no-]canonical-system-headers. * doc/install.texi: Document --enable-canonical-system-headers. * c.opt: Add f[no-]canonical-system-headers. * c-opts.c (c_common_handle_option): Handle OPT_fcanonical_system_headers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193569 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/init.c')
-rw-r--r--libcpp/init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcpp/init.c b/libcpp/init.c
index ebe51c76c86..2ec5ecbce11 100644
--- a/libcpp/init.c
+++ b/libcpp/init.c
@@ -28,6 +28,10 @@ along with this program; see the file COPYING3. If not see
#include "localedir.h"
#include "filenames.h"
+#ifndef ENABLE_CANONICAL_SYSTEM_HEADERS
+#define ENABLE_CANONICAL_SYSTEM_HEADERS 0
+#endif
+
static void init_library (void);
static void mark_named_operators (cpp_reader *, int);
static void read_original_filename (cpp_reader *);
@@ -182,6 +186,8 @@ cpp_create_reader (enum c_lang lang, cpp_hash_table *table,
CPP_OPTION (pfile, track_macro_expansion) = 2;
CPP_OPTION (pfile, warn_normalize) = normalized_C;
CPP_OPTION (pfile, warn_literal_suffix) = 1;
+ CPP_OPTION (pfile, canonical_system_headers)
+ = ENABLE_CANONICAL_SYSTEM_HEADERS;
CPP_OPTION (pfile, ext_numeric_literals) = 1;
/* Default CPP arithmetic to something sensible for the host for the