QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1115|回复: 2

用gcc-3.4.1编译skyeye0.8.0出错

[复制链接]
发表于 2004-9-20 12:15:37 | 显示全部楼层 |阅读模式
俺重装了俺了的gentoo系统,以前用的gcc-3.3也升级成了3.4,在重新编译skyeye0.8的时候出错了,出错信息如下:
gcc -c -DHAVE_CONFIG_H               -DDEFAULT_INLINE=0           -DMODET `gtk-config --cflags`   -I. -I. -I../common -I./../common -I../../include -I./../../include -I../../bfd -I./../../bfd -I../../opcodes -I./../../opcodes -I../../intl -I./../../intl -I../../include/gdb -g -O2 skyeye_mach_s3c44b0.c
skyeye_mach_s3c44b0.c:260: error: conflicting types for 's3c44b0_io_read_word'
skyeye_mach_s3c44b0.c:249: error: previous implicit declaration of 's3c44b0_io_read_word' was here
skyeye_mach_s3c44b0.c:432: error: conflicting types for 's3c44b0_io_write_word'
skyeye_mach_s3c44b0.c:419: error: previous implicit declaration of 's3c44b0_io_write_word' was here
make[2]: *** [skyeye_mach_s3c44b0.o] 错误 1
make[2]: Leaving directory `/mnt/data/software/embed/skyeye/skyeye/sim/arm'
make[1]: *** [all] 错误 2
make[1]: Leaving directory `/mnt/data/software/embed/skyeye/skyeye/sim'
make: *** [all-sim] 错误 2
发表于 2004-9-23 23:06:24 | 显示全部楼层
你修改一下代码,把260行的函数放在249行前面,把432行的函数放到419行的前面。
然后再看看。
回复

使用道具 举报

 楼主| 发表于 2004-9-24 10:18:56 | 显示全部楼层
谢谢老大,现在编译通过了,此外,编译过程中除了上面那个文件错误,还出错以下三个错误:
1、sim/arm/skyeye_mach_cs89712.c 中第143行 ARMword cs89712_io_read_word(ARMul_State *state, ARMword addr) 函数修改如下:
[code:1]ARMword cs89712_io_read_word(ARMul_State *state, ARMword addr)
{
        ARMword data = 0;

        switch (addr - 0x80000000) {
        case SYSCON:
                data = io.syscon;
                break;
        case SYSFLG:
                data = io.sysflg;
                break;
/*        case MEMCFG1:
*        case MEMCFG2:
*        case DRFPR */
        case INTSR:
                data = io.intsr;
                break;
        case INTMR:
                data = io.intmr;
                break;
        case LCDCON:
                data = io.lcdcon;
                break;
        case TC1D:
                data = io.tcd[0];
                break;
        case TC2D:
                data = io.tcd[1];
                break;
/*        case RTCDR:
*        case RTCMR:
*        case PMPCON :
*        case CODR:*/
        case UARTDR:
                data = io.uartdr;
                io.sysflg |= URXFE;
                io.intsr &= ~URXINT;
                cs89712_update_int(state);
                break;
/*        case UBRLCR:                */
        case SYNCIO:
                /* if we return zero here, the battery voltage calculation
*            results in a divide-by-zero that messes up the kernel */
                data = 1;
                break;
/*        case PALLSW:
*        case PALMSW:*/

        /* write-only: */
        case STFCLR:
        case BLEOI:
        case MCEOI:
        case TEOI:
        case TC1EOI:
        case TC2EOI:
        case RTCEOI:
        case UMSEOI:
        case COEOI:
        case HALT:
        case STDBY:
                break;
        default:
//chy 2003-07-11: sometime has fault, but linux can continue running  !!!!????
                //SKYEYE_DBG("io_read_word(0x%08x) = 0x%08x\n", addr, data);
                break;  //添加这一行
        }
        return data;
}[/code:1]

2、gdb/arm-tdepc.c 中第2725行 static struct gdbarch * arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)函数,问题同1
3、sim/arm/skyeye_march_lpc.c 问题同skyeye_arch_s3c44b0.c

以上几个问题应该都是编译器引起的。。 :-(
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-5-9 16:35 , Processed in 0.092216 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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