From bec42276e00a9bfcb30169f36fa25551507ded96 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Thu, 14 May 1992 22:26:14 +0000 Subject: [PATCH] *** empty log message *** From-SVN: r981 --- gcc/cccp.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/cccp.c b/gcc/cccp.c index 00c33802059..4487af180fa 100644 --- a/gcc/cccp.c +++ b/gcc/cccp.c @@ -524,6 +524,10 @@ static struct file_name_list *dont_repeat_files = 0; around the entire contents, and ->control_macro gives the macro name. */ static struct file_name_list *all_include_files = 0; +/* Directory prefix that should replace `/usr' in the standard + include file directories. */ +static char *include_prefix; + /* Global list of strings read in from precompiled files. This list is kept in the order the strings are read in, with new strings being added at the end through stringlist_tailp. We use this list to output @@ -1002,6 +1006,12 @@ main (argc, argv) else pend_files[i] = argv[i+1], i++; } + if (!strcmp (argv[i], "-iprefix")) { + if (i + 1 == argc) + fatal ("Filename missing after -iprefix option"); + else + include_prefix = argv[++i]; + } /* Add directory to end of path for includes. */ if (!strcmp (argv[i], "-idirafter")) { struct file_name_list *dirtmp; @@ -1511,7 +1521,7 @@ main (argc, argv) tack on the standard include file dirs to the specified list */ if (!no_standard_includes) { struct default_include *p = include_defaults; - char *specd_prefix = getenv ("GCC_EXEC_PREFIX"); + char *specd_prefix = include_prefix; char *default_prefix = savestring (GCC_INCLUDE_DIR); int default_len = 0; /* Remove the `include' from /usr/local/lib/gcc.../include. */ -- 2.30.2