|
按照冲天飞豹的大作《手把手教你源代码制作龙芯64位系统 2.0预览版 》http://blog.chinaunix.net/u/13265/showart_1193259.html在制作工具链的第二步Binutils交叉工具,在configure时,config.log中出现如下的错误:
configure:3630: gcc -c -g -O2 conftest.c >&5
conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'me'
configure:3636: $? = 1
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif在livecd,rhel5,centos上试过了,都是这样,问了别人,说是gcc中用来编译c中内嵌的汇编代码时,汇编代码中的最后一个分号引起的,不知道这个会不会影响后续的工作,补充一个,几乎每个tarball在进行configure时都会报这样的错误,另外还有一个错误也是雷打不动的会出现
configure:4082: g++ -c -g -O2 conftest.cc >&5
conftest.cc: In function 'int main()':
conftest.cc:13: error: 'exit' was not declared in this scope
configure:4088: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
| int
| main ()
| {
| exit (42);
| ;
| return 0;
| }
在第三步--目标系统glibc头文件中make install-headers
也会报如下的错误:
In file included from ./posix/sys/types.h:31,
from include/sys/types.h:1,
from misc/sys/uio.h:24,
from <stdin>:3:
./bits/types.h:129:3: error: #error
迷茫,请各位指点一下 |
|