编译

gcc 4.6.2时出现问题:

checking for avr-gcc... /data/data6/soft/src_build/gcc-4.6.2/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/data/data6/soft/src_build/gcc-4.6.2/host-x86_64-unknown-linux-gnu/gcc/ -B/data/data6/soft/programming/gcc-avr/avr/bin/ -B/data/data6/soft/programming/gcc-avr/avr/lib/ -isystem /data/data6/soft/programming/gcc-avr/avr/include -isystem /data/data6/soft/programming/gcc-avr/avr/sys-include

checking for suffix of object files... configure: error: in `/data/data6/soft/src_build/gcc-4.6.2/avr/libgcc':

configure: error: cannot compute suffix of object files: cannot compile

See `config.log' for more details.

在我的gcc-4.6.2 / avr / libgcc / config.log中我发现:

configure:3268: /data/data6/soft/src_build/gcc-4.6.2/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/data/data6/soft/src_build/gcc-4.6.2/host-x86_64-unknown-linux-gnu/gcc/ -B/data/data6/soft/programming/gcc-avr/avr/bin/ -B/data/data6/soft/programming/gcc-avr/avr/lib/ -isystem /data/data6/soft/programming/gcc-avr/avr/include -isystem /data/data6/soft/programming/gcc-avr/avr/sys-include -c -g -O2 conftest.c >&5

exec: 89: -o: not found

configure:3272: $? = 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 ""

| /* end confdefs.h. */

|

| int

| main ()

| {

|

| ;

| return 0;

| }

configure:3286: error: in `/data/data6/soft/src_build/gcc-4.6.2/avr/libgcc':

configure:3289: error: cannot compute suffix of object files: cannot compile

See `config.log' for more details.

如果这个命令直接运行(在创建conftest.c之后)输出将是一样的.

什么是exec:89:-o:找不到?哪个程序写? 89线在哪里?

像导出LD_CONFIG_PATH或者在/etc/ld.so.conf中添加行的方案,其中包含GMP,MPFR,MPC的路径对我而言无效.

哪里找到解决这个问题的办法?

更新.看来是配置问题. Gcc有非常好的选择-v :-)而且我看到这是gcc的汇编程序调用,它失败了.使用选项-save-temps我保存汇编源,并运行汇编程序,但它没关系.

而不是调用实际的汇编器,它调用shell脚本包装器,在我的case / data / data6 / soft / src_build / avr-gcc / gcc / as中,它从

ORIGINAL_AS_FOR_TARGET=""

ORIGINAL_LD_FOR_TARGET=""

ORIGINAL_PLUGIN_LD_FOR_TARGET=""

ORIGINAL_NM_FOR_TARGET=""

当它形成命令行调用时,我们有:

exec -o conftest.o conftest.s

其如上所述失败.

哪里有必要解决这个问题?要得到这样的电话:

exec as -o conftest.o conftest.s

哪里好的地方可以设置变量ORIGINAL_AS_FOR_TARGET?

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐