OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 6447|回复: 2

求助:cygwin 下配置交叉编译环境,编译 libgcc 时,xgcc 始终提示找不到 /tmp/xxxxxx.c 和 /tmp/xxxxxx.s

[复制链接]

5

主题

21

帖子

0

精华

初级会员

Rank: 2

积分
94
金钱
94
注册时间
2014-10-17
在线时间
13 小时
发表于 2015-2-11 22:33:28 | 显示全部楼层 |阅读模式
5金钱
configure:3362: /shared/cross-gcc/build/build-arm-none-cygwin/./gcc/xgcc -B/shared/cross-gcc/build/build-arm-none-cygwin/./gcc/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/bin/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/lib/ -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/include -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/sys-include    -V >&5
xgcc: error: unrecognized command line option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:3373: $? = 1
configure:3362: /shared/cross-gcc/build/build-arm-none-cygwin/./gcc/xgcc -B/shared/cross-gcc/build/build-arm-none-cygwin/./gcc/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/bin/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/lib/ -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/include -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/sys-include    -qversion >&5
xgcc: error: unrecognized command line option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:3373: $? = 1
configure:3389: /shared/cross-gcc/build/build-arm-none-cygwin/./gcc/xgcc -B/shared/cross-gcc/build/build-arm-none-cygwin/./gcc/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/bin/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/lib/ -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/include -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/sys-include    -o conftest -g -O2   conftest.c  >&5
Assembler messages:
Fatal error: can't create /tmp/ccgZ7d6T.o: No such file or directory
configure:3392: $? = 1
configure:3580: checking for suffix of object files
configure:3602: /shared/cross-gcc/build/build-arm-none-cygwin/./gcc/xgcc -B/shared/cross-gcc/build/build-arm-none-cygwin/./gcc/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/bin/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/lib/ -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/include -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/sys-include    -c -g -O2  conftest.c >&5
Assembler messages:
Error: can't open /tmp/ccnR0jZR.s for reading: No such file or directory
configure:3606: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h.  */

| int
| main ()
| {

|   ;
|   return 0;
| }
configure:3620: error: in `/shared/cross-gcc/build/build-arm-none-cygwin/arm-none-eabi/libgcc':
configure:3623: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

出错的地方应该就是 xgcc 编译 conftest.c 没有生成临时文件,直接copy 上面的 C代码为 conftest.c 然后使用log中的命令也出现同样的错误。
/shared/cross-gcc/build/build-arm-none-cygwin/./gcc/xgcc -B/shared/cross-gcc/build/build-arm-none-cygwin/./gcc/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/bin/ -B/usr/local/arm-none-eabi-cygwin/arm-none-eabi/lib/ -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/include -isystem /usr/local/arm-none-eabi-cygwin/arm-none-eabi/sys-include    -c -g -O2  conftest.c




正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

5

主题

21

帖子

0

精华

初级会员

Rank: 2

积分
94
金钱
94
注册时间
2014-10-17
在线时间
13 小时
 楼主| 发表于 2015-2-11 22:36:47 | 显示全部楼层
有没有哪位大神遇到过相同问题的?如何解决?在BAIDU上找到一篇文章说 gcc.c 的配置模板 struct compiler default_compilers 定义了各种扩展名文件类型的编译方法,其中包含使用的编译器文件名,该文件么和 cygwin 不兼容(需要带后缀.exe),按照该方法修改,重新 configure 并重新编译,问题依旧。
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165352
金钱
165352
注册时间
2010-12-1
在线时间
2108 小时
发表于 2015-2-13 21:59:25 | 显示全部楼层
帮顶  .....
我是开源电子网www.openedv.com站长,有关站务问题请与我联系。
正点原子STM32开发板购买店铺http://openedv.taobao.com
正点原子官方微信公众平台,点击这里关注“正点原子”
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2024-11-24 12:36

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表