【发布时间】:2013-12-17 10:12:57
【问题描述】:
我正在尝试为 i.mx51 平台交叉编译一些代码。 我使用的是freescale为平台提供的gcc,见下图:
user@:/media/sf_repos/1109$ /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc --version
arm-none-linux-gnueabi-gcc (GCC) 4.1.2
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
我正在使用的 makefile 使用了 GCC 中可用的 @ 标志。
@FILE Read options from FILE
但是使用提供的 gcc 并使用 @FILE 指向我的命令文件,我得到:
arm-none-linux-gnueabi-gcc: @hello.o_command: No such file or directory
arm-none-linux-gnueabi-gcc: no input files
(我知道这个问题可能太具体了) 有人对这个问题有任何想法吗?在 -v --help 中,我可以看到提到了@FILE,因此应该支持它!
【问题讨论】:
-
您能发布一个导致此错误的 Makefile 的可行片段吗?或者你可以创建一个测试,通过这种方法手动输入一个 gcc 命令行来编译一个简单的测试文件,并且当你使用主机 gcc 而不是交叉 gcc 时它可以工作?
-
我觉得这个问题类似于stackoverflow.com/questions/7139685/…
-
@Yousf - 肯定相关,但也许不排除,因为该问题似乎没有解决这样做的细节/困难,或支持的普遍性。
-
我做了一个本地测试,看起来
@hello.o_command确实有效,但里面指定的内容无法访问。
标签: gcc embedded cross-compiling embedded-linux