您的位置:首页 > 其它

SUSE 64位编译32位程序出错

2017-04-02 08:56 507 查看
These `-m’ switches are supported in addition to the above on AMD x86-64 processors in 64-bit environments.
-m32
-m64
-mx32
Generate code for a 32-bit or 64-bit environment.

The -m32 option sets int, long and pointer to 32 bits and generates code that runs on any i386 system.

The -m64 option sets int to 32bits and long and pointer to 64 bits and generates code for AMD’s x86-64 architecture.

The -mx32 option sets int, long and pointer to 32 bits and generates code for AMD’s x86-64 architecture.

For darwin only the -m64 option turns off the -fno-pic and -mdynamic-no-pic options.

因此在32位 linux make编译文件的时候 gcc -g -c 无需带-m32

在x86_64位linux make编译文件的时候 cc -m64 -g -c 是-m64必须带的。

可参考
http://blog.csdn.net/yyywill/article/details/54426900
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: