new (old) -isystem-cxx flag to set a C++ system include directory.

* c-opts.c: Document -isystem-cxx.
* cppinit.c (new_pending_directive): Add -isystem-cxx entry.
* gcc.h. (DEFAULT_WORD_SWITCH_TAKES_ARG): add -isystem.


XXX: possibly can use $CPLUS_INCLUDE_DIR.
This commit is contained in:
mrg 2003-08-01 13:37:28 +00:00
parent a2a4308b26
commit 774d0597a5
3 changed files with 12 additions and 2 deletions

View File

@ -1731,6 +1731,10 @@ Switches:\n\
-iwithprefix <dir> Add <dir> to the end of the system include path\n\
-iwithprefixbefore <dir> Add <dir> to the end of the main include path\n\
-isystem <dir> Add <dir> to the start of the system include path\n\
"), stdout);
fputs (_("\
-isystem-cxx <dir> Add <dir> to the start of the system C++ include\n\
path\n\
"), stdout);
fputs (_("\
-idirafter <dir> Add <dir> to the end of the system include path\n\

View File

@ -1179,6 +1179,7 @@ new_pending_directive (pend, text, handler)
DEF_OPT("include", no_fil, OPT_include) \
DEF_OPT("iprefix", no_pth, OPT_iprefix) \
DEF_OPT("isystem", no_dir, OPT_isystem) \
DEF_OPT("isystem-cxx", no_dir, OPT_isystemcxx) \
DEF_OPT("iwithprefix", no_dir, OPT_iwithprefix) \
DEF_OPT("iwithprefixbefore", no_dir, OPT_iwithprefixbefore)
@ -1362,6 +1363,11 @@ cpp_handle_option (pfile, argc, argv)
include directory. */
append_include_chain (pfile, xstrdup (arg), SYSTEM, 0);
break;
case OPT_isystemcxx:
/* Add directory to beginning of system C++ include path, as a system
include directory. */
append_include_chain (pfile, xstrdup (arg), SYSTEM, 1);
break;
case OPT_include:
case OPT_imacros:
{

View File

@ -48,8 +48,8 @@ struct spec_function
|| !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \
|| !strcmp (STR, "idirafter") || !strcmp (STR, "iprefix") \
|| !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \
|| !strcmp (STR, "isystem") || !strcmp (STR, "-param") \
|| !strcmp (STR, "specs") \
|| !strcmp (STR, "isystem") || !strcmp (STR, "isystem-cxx") \
|| !strcmp (STR, "-param") || !strcmp (STR, "specs") \
|| !strcmp (STR, "MF") || !strcmp (STR, "MT") || !strcmp (STR, "MQ"))