linux使用gcc提示后缀无效,linux – 编译gcc 4.6.2(不能计算对象文件的后缀)

编译

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?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值