Index: gcc.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/gcc.c,v retrieving revision 1.344 diff -Idpatel.pbxuser -c -3 -p -r1.344 gcc.c *** gcc.c 14 Oct 2002 07:15:38 -0000 1.344 --- gcc.c 1 Nov 2002 22:05:23 -0000 *************** translate_options (argcp, argvp) *** 1206,1211 **** --- 1207,1216 ---- nskip += 1; else if (! strcmp (p, "Xlinker")) nskip += 1; + else if (! strcmp (p, "Xpreprocessor")) + nskip += 1; + else if (! strcmp (p, "Xassembler")) + nskip += 1; /* Watch out for an option at the end of the command line that is missing arguments, and avoid skipping past the end of the *************** display_help () *** 3100,3105 **** --- 3105,3112 ---- fputs (_(" -print-multi-os-directory Display the relative path to OS libraries\n"), stdout); fputs (_(" -Wa, Pass comma-separated on to the assembler\n"), stdout); fputs (_(" -Wp, Pass comma-separated on to the preprocessor\n"), stdout); + fputs (_(" -Xassembler Pass on to the assembler\n"), stdout); + fputs (_(" -Xpreprocessor Pass on to the preprocessor\n"), stdout); fputs (_(" -Wl, Pass comma-separated on to the linker\n"), stdout); fputs (_(" -Xlinker Pass on to the linker\n"), stdout); fputs (_(" -save-temps Do not delete intermediate files\n"), stdout); *************** warranty; not even for MERCHANTABILITY o *** 3566,3571 **** --- 3572,3591 ---- n_infiles++; i++; } + else if (strcmp (argv[i], "-Xpreprocessor") == 0) + { + if (i + 1 == argc) + fatal ("argument to `-Xpreprocessor' is missing"); + + add_preprocessor_option (argv[i+1], strlen (argv[i+1])); + } + else if (strcmp (argv[i], "-Xassembler") == 0) + { + if (i + 1 == argc) + fatal ("argument to `-Xassembler' is missing"); + + add_assembler_option (argv[i+1], strlen (argv[i+1])); + } else if (strcmp (argv[i], "-l") == 0) { if (i + 1 == argc) *************** warranty; not even for MERCHANTABILITY o *** 3960,3965 **** --- 3980,3995 ---- infiles[n_infiles++].name = argv[i] + prev; } else if (strcmp (argv[i], "-Xlinker") == 0) + { + infiles[n_infiles].language = "*"; + infiles[n_infiles++].name = argv[++i]; + } + else if (strcmp (argv[i], "-Xassembler") == 0) + { + infiles[n_infiles].language = "*"; + infiles[n_infiles++].name = argv[++i]; + } + else if (strcmp (argv[i], "-Xpreprocessor") == 0) { infiles[n_infiles].language = "*"; infiles[n_infiles++].name = argv[++i]; Index: doc/invoke.texi =================================================================== RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v retrieving revision 1.196 diff -Idpatel.pbxuser -c -3 -p -r1.196 invoke.texi *** doc/invoke.texi 20 Oct 2002 19:18:30 -0000 1.196 --- doc/invoke.texi 1 Nov 2002 22:05:24 -0000 *************** in the following sections. *** 305,316 **** -iprefix @var{file} -iwithprefix @var{dir} @gol -iwithprefixbefore @var{dir} -isystem @var{dir} @gol -M -MM -MF -MG -MP -MQ -MT -nostdinc -P -remap @gol ! -trigraphs -undef -U@var{macro} -Wp,@var{option}} @item Assembler Option @xref{Assembler Options,,Passing Options to the Assembler}. @gccoptlist{ ! -Wa,@var{option}} @item Linker Options @xref{Link Options,,Options for Linking}. --- 305,316 ---- -iprefix @var{file} -iwithprefix @var{dir} @gol -iwithprefixbefore @var{dir} -isystem @var{dir} @gol -M -MM -MF -MG -MP -MQ -MT -nostdinc -P -remap @gol ! -trigraphs -undef -U@var{macro} -Wp,@var{option} -Xpreprocessor @var{option}} @item Assembler Option @xref{Assembler Options,,Passing Options to the Assembler}. @gccoptlist{ ! -Wa,@var{option} -Xassembler @var{option}} @item Linker Options @xref{Link Options,,Options for Linking}. *************** interface is undocumented and subject to *** 4259,4264 **** --- 4260,4274 ---- you should avoid using @option{-Wp} and let the driver handle the options instead. + @item -Xpreprocessor @var{option} + @opindex preprocessor + Pass @var{option} as an option to the preprocessor. You can use this to + supply system-specific preprocessor options which GCC does not know how to + recognize. + + If you want to pass an option that takes an argument, you must use + @option{-Xpreprocessor} twice, once for the option and once for the argument. + @include cppopts.texi @node Assembler Options *************** You can pass options to the assembler. *** 4272,4277 **** --- 4282,4297 ---- @opindex Wa Pass @var{option} as an option to the assembler. If @var{option} contains commas, it is split into multiple options at the commas. + + @item -Xassembler @var{option} + @opindex Xassembler + Pass @var{option} as an option to the assembler. You can use this to + supply system-specific assembler options which GCC does not know how to + recognize. + + If you want to pass an option that takes an argument, you must use + @option{-Xassembler} twice, once for the option and once for the argument. + @end table @node Link Options