The Xassembler and Xpreprocessor options don't work. They accidentally pass options to the linker in addition to the assembler and preprocessor. For example, on linux, the assembler ignores the -D option, but the linker does not. If I try using -Xassembler to pass the -D option to the assembler, I get a linker error. aretha$ ./xgcc -B./ -Xassembler -D tmp.c /usr/bin/ld: unrecognized option '-D' /usr/bin/ld: use the --help option for usage information collect2: ld returned 1 exit status Adding the -v option confirms that -D got passed to both the assembler and the linker, which is wrong. The -Xpreprocessor option has the same implementation as -Xassembler, and hence the same problem.
Confirmed. -Xassebler did not exist in 3.3.3 but -Xpreprocessor did and works as expected.
Subject: Bug 21112 CVSROOT: /cvs/gcc Module name: gcc Changes by: wilson@gcc.gnu.org 2005-05-04 17:20:44 Modified files: gcc : ChangeLog gcc.c Log message: Fix the Xassembler and Xpreprocessor options, which have never worked right. PR driver/21112 * gcc.c (process_command): In the second argv scan loop, ignore Xassembler and Xpreprocessor, along with their argument. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8599&r2=2.8600 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gcc.c.diff?cvsroot=gcc&r1=1.456&r2=1.457
Mine. Andrew Pinski claims Xpreprocessor was in gcc-3.3.3 and works, but I can find no evidence to support that. It does not show up in a grep of FSF gcc-3.3.x sources. Also, the original patch that added Xassembler also added Xpreprocessor, so I do not see how one could have existed before the other.
Fixed on mainline. I do not believe that there is any regression here, and hence I do not believe that the patch needs to be applied to the gcc-3.4 or gcc-4.0 branches. I'll leave this open for now in case anyone wants to disagree with me.
(In reply to comment #3) > Mine. Woops I was wrong, I was looking at it wrongly. I must have missed the warning: gcc: unrecognized option `-Xpreprocessor'
Since everyone agrees there is no regression, I am closing.