LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 729|回复: 11

milkline 兄,你在AUR上问的newlib的问题解决没有,我也出现同样的问题?

[复制链接]
发表于 2011-10-12 21:10:21 | 显示全部楼层 |阅读模式
如题。
昨天我用arm-none-eabi-gcc + arm-none-eabi-newlib没有问题,
今天换回arm-elf-gcc + arm-elf-newlib就出问题:
makefile:
CFLAGS = -Wall -Wstrict-prototypes -g -fomit-frame-pointer -ffreestanding \
-static -nostartfiles -I/usr/arm-elf/include -L/usr/arm-elf/lib \
-L/usr/lib/gcc/arm-elf/4.6.0/ -lgcc -lc -lm -lg

CC = arm-elf-gcc
LD = arm-elf-ld
OBJCOPY = arm-elf-objcopy
OBJDUMP = arm-elf-objdump
SIZE = arm-elf-size

all: head.S init.c interrupt.c  main.c
        $(CC) $(CFLAGS) -c -o head.o head.S
        $(CC) $(CFLAGS) -c -o init.o init.c
        $(CC) $(CFLAGS) -c -o interrupt.o interrupt.c
        $(CC) $(CFLAGS) -c -o main.o main.c
        $(CC) $(CFLAGS) -Tdefault.lds -o key_int.elf  head.o init.o interrupt.o main.o
        $(OBJCOPY) -O binary -S key_int.elf key_int.bin
        $(OBJDUMP) -D -m arm  key_int.elf > key_int.dis
        $(SIZE)  key_int.elf
       
clean:
        rm -f   key_int.dis key_int.bin key_int.elf *.o

错误:
**** Build of configuration Default for project key-int ****

make all
arm-elf-gcc -Wall -Wstrict-prototypes -g -fomit-frame-pointer -ffreestanding -static -nostartfiles -I/usr/arm-elf/include -L/usr/arm-elf/lib -L/usr/lib/gcc/arm-elf/4.6.0/ -lgcc -lc -lm -lg -c -o head.o head.S
arm-elf-gcc -Wall -Wstrict-prototypes -g -fomit-frame-pointer -ffreestanding -static -nostartfiles -I/usr/arm-elf/include -L/usr/arm-elf/lib -L/usr/lib/gcc/arm-elf/4.6.0/ -lgcc -lc -lm -lg -c -o init.o init.c
arm-elf-gcc -Wall -Wstrict-prototypes -g -fomit-frame-pointer -ffreestanding -static -nostartfiles -I/usr/arm-elf/include -L/usr/arm-elf/lib -L/usr/lib/gcc/arm-elf/4.6.0/ -lgcc -lc -lm -lg -c -o interrupt.o interrupt.c
arm-elf-gcc -Wall -Wstrict-prototypes -g -fomit-frame-pointer -ffreestanding -static -nostartfiles -I/usr/arm-elf/include -L/usr/arm-elf/lib -L/usr/lib/gcc/arm-elf/4.6.0/ -lgcc -lc -lm -lg -c -o main.o main.c
/usr/arm-elf/lib/libg.a(lib_a-svfprintf.o): In function `_svfprintf_r':
arm-elf-gcc -Wall -Wstrict-prototypes -g -fomit-frame-pointer -ffreestanding -static -nostartfiles -I/usr/arm-elf/include -L/usr/arm-elf/lib -L/usr/lib/gcc/arm-elf/4.6.0/ -lgcc -lc -lm -lg -Tdefault.lds -o key_int.elf  head.o init.o interrupt.o main.o
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdio/../../../../../newlib-1.19.0/newlib/libc/stdio/vfprintf.c:1084: undefined reference to `__ltdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdio/../../../../../newlib-1.19.0/newlib/libc/stdio/vfprintf.c:1544: undefined reference to `__eqdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdio/../../../../../newlib-1.19.0/newlib/libc/stdio/vfprintf.c:1591: undefined reference to `__nedf2'
/usr/arm-elf/lib/libg.a(lib_a-svfprintf.o): In function `cvt':
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdio/../../../../../newlib-1.19.0/newlib/libc/stdio/vfprintf.c:1724: undefined reference to `__eqdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdio/../../../../../newlib-1.19.0/newlib/libc/stdio/vfprintf.c:1720: undefined reference to `__nedf2'
/usr/arm-elf/lib/libg.a(lib_a-dtoa.o): In function `quorem':
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:60: undefined reference to `__udivsi3'
/usr/arm-elf/lib/libg.a(lib_a-dtoa.o): In function `_dtoa_r':
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:282: undefined reference to `__nedf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:347: undefined reference to `__floatunsidf'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:356: undefined reference to `__subdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:356: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:356: undefined reference to `__adddf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:356: undefined reference to `__floatsidf'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:356: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:356: undefined reference to `__adddf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:358: undefined reference to `__fixdfsi'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:359: undefined reference to `__ltdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:359: undefined reference to `__floatsidf'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:359: undefined reference to `__nedf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:364: undefined reference to `__gtdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:562: undefined reference to `__divdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:562: undefined reference to `__fixdfsi'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:563: undefined reference to `__floatsidf'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:563: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:563: undefined reference to `__subdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:590: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:590: undefined reference to `__nedf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:590: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:590: undefined reference to `__nedf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:562: undefined reference to `__divdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:562: undefined reference to `__fixdfsi'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:563: undefined reference to `__floatsidf'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:563: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:563: undefined reference to `__subdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:575: undefined reference to `__adddf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:576: undefined reference to `__ltdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:576: undefined reference to `__eqdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:556: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:556: undefined reference to `__gedf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:450: undefined reference to `__divdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:457: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:459: undefined reference to `__divdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:471: undefined reference to `__ltdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:477: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:480: undefined reference to `__floatsidf'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:480: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:480: undefined reference to `__adddf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:498: undefined reference to `__divdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:498: undefined reference to `__subdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:501: undefined reference to `__fixdfsi'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:502: undefined reference to `__floatsidf'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:502: undefined reference to `__subdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:504: undefined reference to `__gtdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:506: undefined reference to `__subdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:506: undefined reference to `__gtdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:506: undefined reference to `__subdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:506: undefined reference to `__ltdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:510: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:511: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:501: undefined reference to `__fixdfsi'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:502: undefined reference to `__floatsidf'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:502: undefined reference to `__subdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:504: undefined reference to `__ltdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:480: undefined reference to `__floatsidf'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:480: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:480: undefined reference to `__adddf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:485: undefined reference to `__subdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:486: undefined reference to `__gtdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:488: undefined reference to `__ltdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:463: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:468: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:518: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:521: undefined reference to `__fixdfsi'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:522: undefined reference to `__floatsidf'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:522: undefined reference to `__subdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:519: undefined reference to `__muldf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:521: undefined reference to `__fixdfsi'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:522: undefined reference to `__floatsidf'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:522: undefined reference to `__subdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:526: undefined reference to `__adddf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:526: undefined reference to `__gtdf2'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:528: undefined reference to `__subdf3'
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/dtoa.c:528: undefined reference to `__ltdf2'
/usr/arm-elf/lib/libg.a(lib_a-mprec.o): In function `__ratio':
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/mprec.c:950: undefined reference to `__divdf3'
/usr/arm-elf/lib/libg.a(lib_a-mprec.o): In function `_mprec_log10':
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/mprec.c:987: undefined reference to `__muldf3'
/usr/arm-elf/lib/libg.a(lib_a-syscalls.o): In function `_sbrk':
/tmp/yaourt-tmp-chenss/aur-cross-arm-elf-newlib/src/build/arm-elf/newlib/libc/sys/arm/../../../../../../newlib-1.19.0/newlib/libc/sys/arm/syscalls.c:506: undefined reference to `end'
collect2: ld returned 1 exit status
make: *** [all] 错误 1

**** Build Finished ****
发表于 2011-10-12 21:33:00 | 显示全部楼层
想做嵌入式开发建议自己编译toolchain,可以用现成的环境或者脚本,例如openwrt、scratchbox或crosstool、crosstool-ng。推荐crosstool-ng,支持最新的gcc、binutils和uclibc、eglibc版本。
arch自带的包局限性比较大(编译器、库支持单一,版本相对陈旧),且用户基础小出问题往往不能及时发现、修改。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-10-12 22:30:34 | 显示全部楼层
crosstool-ng 用过,但不成功。
makepkg也是一种构建工具嘛,这是Arch的优点。
个人觉得PKGBUILD要比crosstool-ng等的要先进。
PKGBUILD熟悉点,改起来也方便点。
回复 支持 反对

使用道具 举报

发表于 2011-10-13 06:52:08 | 显示全部楼层
Post by 月魄孤魂;2153413
crosstool-ng 用过,但不成功。
makepkg也是一种构建工具嘛,这是Arch的优点。
个人觉得PKGBUILD要比crosstool-ng等的要先进。
PKGBUILD熟悉点,改起来也方便点。


crosstool-ng等构建脚本的优势是傻瓜化,比如选择一个gcc/clib版本组合,它会自动帮你下载并应用相关补丁。
比如你的链接错误(软浮点相关),crosstool-ng/openwrt分别提供了相应的补丁,印象中是修改gcc/config/arm/目录的某个配置脚本,现在我在外地没办法确认。
从理论上说PKGBUILD也可以实现crosstool的功能,前提是要对build的每个细节和每个bug都了如指掌,知道什么时候用哪些技巧、补丁才能通过编译并得到可用的toolchain。
回复 支持 反对

使用道具 举报

发表于 2011-10-13 11:01:15 | 显示全部楼层
楼上说的对,每个过程都了如指掌才搞得定,还有就是一些补丁都是crosstool-ng做好的,直接用,或者openembedded生成toolchain,只不过编译很占空间
之前用crosstoool-ng 生成了amd64下ARM的编译器,还挺好用的
然后把编译好的包通过PKGBUILD打包就可以给其他ARCH机器用了,很方便
回复 支持 反对

使用道具 举报

发表于 2011-10-13 11:24:43 | 显示全部楼层
我最后选择的也是crosstool-ng,这个确实比较傻瓜,PKGBUILD里面我全都没搞定,也查不出问题出在哪,在AUR里面问,也没有答案。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-10-13 12:37:19 | 显示全部楼层
嗯,我又换回arm-none-eabi-gcc 的了,这个就没有问题。
等以后有需要再用crosstool-ng了。

不知能不能在PKGBUILD中使用crosstool-ng,这样就既用到crosstool-ng的专业,又能用到makepkg的便利了。
晚上再来研究下……
回复 支持 反对

使用道具 举报

发表于 2011-10-13 23:45:32 | 显示全部楼层
Post by 月魄孤魂;2153445
嗯,我又换回arm-none-eabi-gcc 的了,这个就没有问题。
等以后有需要再用crosstool-ng了。

不知能不能在PKGBUILD中使用crosstool-ng,这样就既用到crosstool-ng的专业,又能用到makepkg的便利了。
晚上再来研究下……

应该是不能,CT-ng里面有很多东西是要手动选的,除非你可以在PKGBUILD里面生成ct-ng的config文件,但也是要根据不同情况来做的。其实如果手动配置过kernel的话,给ct-ng配置起来也不困难的。
回复 支持 反对

使用道具 举报

发表于 2011-10-14 06:58:04 | 显示全部楼层
Post by 月魄孤魂;2153445
嗯,我又换回arm-none-eabi-gcc 的了,这个就没有问题。
等以后有需要再用crosstool-ng了。

不知能不能在PKGBUILD中使用crosstool-ng,这样就既用到crosstool-ng的专业,又能用到makepkg的便利了。
晚上再来研究下……


crosstool-ng也用类似kernel的menuconfig配置框架,配置文件写入工作目录.config。想从PKGBUILD改.config配置,可以用perl/sed等工具写脚本替换其中配置变量,然后调用crosstool-ng编译命令,再用makepkg的机制来打包目标目录(也是配置变量)。
不过crosstool-ng编译较慢(每次编译相当于make clean all,生成大量临时文件),且生成toolchain又在一个固定位置,不会向文件系统多个位置写入,用makepkg来管理似乎没什么优势。
如果对crosstool-ng熟悉,可从配置菜单打开记录编译中间状态选项(先激活EXPERIMENTAL),然后修改状态目录下的环境变量压缩包(是否压缩也是可选项),或直接改build目录下的某个源码(如gcc)后直接编译对应目录(我们调试go语言编译器就用这种方法,避免每次源码改动重新编译全整个crosstool-ng,c/c++外的语言支持也是配置选项,不过crosstool-ng对fortran以外语言支持不完善,要手动改脚本打补丁)。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-10-14 21:56:17 | 显示全部楼层
多谢诸位,受教。
暂时将精力转到newlib的syscall上。

大伙能说下syscall就好了,目前还有几团云。
回复 支持 反对

使用道具 举报

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

本版积分规则

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