How can I tell whether my GCC is compiling 64bit by default?

这一生的挚爱 提交于 2019-12-09 14:38:30

问题


is there any way to know whether GCC is compiling 32 or 64bit code by default?

my GCC version is 4.1.2. my os kernel version is x86_64.

thanks.


回答1:


Type gcc -v. Amongst other things, it will tell you the target platform. For instance, I get:

Target: x86_64-redhat-linux



回答2:


As @Oli said, the configuration should tell you, but it's possible to screw with that after the fact.

For belt and braces, simply compile something, and then use file to examine the output file.



来源:https://stackoverflow.com/questions/8659694/how-can-i-tell-whether-my-gcc-is-compiling-64bit-by-default

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!