1.
Options Controlling the Preprocessor
These options control the C preprocessor, which is run on each C source file before actual compilation. If you use the -E option, nothing is done except preprocessing. Some of these options make sense only together with -E because they cause the preprocessor output to be unsuitable for actual compilation. You can use -Wp,option to bypass the compiler driver and pass option directly through to the preprocessor. If option contains commas, it is split into multiple options at the commas. However, many options are modified, translated or interpreted by the compiler driver before being passed to the preprocessor, and -Wp forcibly bypasses this phase. (为什么要绕过compiler driver呢?哪些选择会被compiler修改,翻译和解释呢?) The preprocessor's direct interface is undocumented and subject to change, so whenever possible you should avoid using -Wp and let the driver handle the options instead. -MD -MD is equivalent to -M -MF file, except that -E is not implied.(这是默认没有-E选项的意思吧) The driver determines file based on whether an -o option is given. If it is, the driver uses its argument but with a suffix of .d, otherwise it take the basename of the input file and applies a .d suffix. If -MD is used in conjunction with -E, any -o switch is understood to specify the dependency output file, but if used without -E, each -o is understood to specify a target object file. Since -E is not implied, -MD can be used to generate a dependency output file as a side-effect of the compilation process.
解释和回答:
这个是说 最好不要用Wp选项吧, 让编译器处理传递给他的参数,编译器可能会对这个参数做出一些改动。 除非你确定你能做的更好,不需要编译器替你这么做。强制掠过该过程;MD 是用来生成依赖文件的? 应该是给Makefile用的吧 -M 和-MD -MF一样,D生成的文件会有 .d 后缀 F是吧输出到指定文件。
2.
赞同
====
http://zhidao.baidu.com/question/142520559