首页 > 其他 > 详细

64位SUSE编译32位程序出错

时间:2017-04-02 09:21:34      阅读:313      评论:0      收藏:0      [点我收藏+]

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

 

64位SUSE编译32位程序出错

原文:http://www.cnblogs.com/yangxuming/p/6658195.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!