编译Ubuntu-8.04时生成中间.i文件(预处理文件)
我正在使用 gcc 3.4 构建 ubuntu-8.04,我需要生成 .i 文件,它们是 gcc 预处理器的输出。我尝试添加 --save-temps 标志,但这只会生成顶级目录(即源)的 .i 文件,并且似乎不会递归地传递到子目录。我还尝试了 -E 标志,它应该输出预处理文件并停止编译,但这也没有生成文件。
我特别希望为 net/core 中的源代码生成 .i 文件。
任何帮助表示赞赏。谢谢!!
I'm building ubuntu-8.04 with gcc 3.4 and I need to generate the .i files, which are the output of the gcc preprocessor. I have tried adding the --save-temps flag but this only generates the .i files for the top level directory, i.e. source, and does not seem to get passed recursively to the child directories. I also tried the -E flag, which is supposed to output preprocessed files and stop compilation, but this did not generate the files either.
I'm specifically looking to generate the .i files for the source in net/core.
Any help is appreciated. Thanks!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不支持批量预处理。
对于单个文件,请使用“make net/core/foo.i”
对于批量文件,解决方法是“make C=2 CHECK="cc -E"”。
There is no support for bulk preprocessing.
For single file use "make net/core/foo.i"
For bulk, workaround is "make C=2 CHECK="cc -E"".
我知道这是一篇旧帖子,但也许有用;对我来说这有效:
gcc -E 文件名.c -o 输出文件.i
I know that is an old post, but maybe can be useful; for me this works:
gcc -E filename.c -o outputfile.i