xlwcat 发表于 2004-9-20 12:15:37

用gcc-3.4.1编译skyeye0.8.0出错

俺重装了俺了的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: *** 错误 1
make: Leaving directory `/mnt/data/software/embed/skyeye/skyeye/sim/arm'
make: *** 错误 2
make: Leaving directory `/mnt/data/software/embed/skyeye/skyeye/sim'
make: *** 错误 2

chyyuu 发表于 2004-9-23 23:06:24

你修改一下代码,把260行的函数放在249行前面,把432行的函数放到419行的前面。
然后再看看。

xlwcat 发表于 2004-9-24 10:18:56

谢谢老大,现在编译通过了,此外,编译过程中除了上面那个文件错误,还出错以下三个错误:
1、sim/arm/skyeye_mach_cs89712.c 中第143行 ARMword cs89712_io_read_word(ARMul_State *state, ARMword addr) 函数修改如下:
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;
}

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

以上几个问题应该都是编译器引起的。。 :-(
页: [1]
查看完整版本: 用gcc-3.4.1编译skyeye0.8.0出错