Hi, I'm trying to build a BSP from libgloss. I'm using newlib-1.18.0-or32-1.0rc1.
I did compile libgloss/or32 with my board definitions (and manually replacing included config file in ctr0.s, _exit.c, uart.c and write.c). I get a libor32uart.a and libor32.a files. I created a folder /opt/crosstool/or32/or32-elf-1.0rc1/or32-elf/lib/boards/de1 where I put libboard.a copied from libor32uart.a created before. When I compile a sample program I get a: /opt/crosstool/or32/or32-elf-1.0rc1/bin/or32-elf-gcc -mboard=de1 -o test test.c /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/crt0.o: In function `_start': (.text+0x0): undefined reference to `_board_mem_base' /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/crt0.o: In function `_start': (.text+0x4): undefined reference to `_board_mem_base' /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/crt0.o: In function `_start': (.text+0xc): undefined reference to `_board_mem_size' /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/crt0.o: In function `_start': (.text+0x10): undefined reference to `_board_mem_size' /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/crt0.o: In function `_start': (.text+0x68): undefined reference to `_board_uart_base' /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/crt0.o: In function `_start': (.text+0x6c): undefined reference to `_board_uart_base' /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/crt0.o: In function `_start': (.text+0x80): undefined reference to `__uart_init' /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/libc.a(lib_a-exit.o): In function `exit': /home/jules/Documents/openrisc/svn/trunk/gnu-src/bd-elf/or32-elf/newlib/libc/stdlib/../../../../../unisrc/newlib/libc/stdlib/exit.c:65: undefined reference to `_exit' /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r': /home/jules/Documents/openrisc/svn/trunk/gnu-src/bd-elf/or32-elf/newlib/libc/reent/../../../../../unisrc/newlib/libc/reent/sbrkr.c:60: undefined reference to `_sbrk' /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/libc.a(lib_a-writer.o): In function `_write_r': /home/jules/Documents/openrisc/svn/trunk/gnu-src/bd-elf/or32-elf/newlib/libc/reent/../../../../../unisrc/newlib/libc/reent/writer.c:58: undefined reference to `_write' /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/libc.a(lib_a-closer.o): In function `_close_r': /home/jules/Documents/openrisc/svn/trunk/gnu-src/bd-elf/or32-elf/newlib/libc/reent/../../../../../unisrc/newlib/libc/reent/closer.c:53: undefined reference to `_close' /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/libc.a(lib_a-fstatr.o): In function `_fstat_r': /home/jules/Documents/openrisc/svn/trunk/gnu-src/bd-elf/or32-elf/newlib/libc/reent/../../../../../unisrc/newlib/libc/reent/fstatr.c:62: undefined reference to `_fstat' /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/libc.a(lib_a-isattyr.o): In function `_isatty_r': /home/jules/Documents/openrisc/svn/trunk/gnu-src/bd-elf/or32-elf/newlib/libc/reent/../../../../../unisrc/newlib/libc/reent/isattyr.c:58: undefined reference to `_isatty' /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/libc.a(lib_a-lseekr.o): In function `_lseek_r': /home/jules/Documents/openrisc/svn/trunk/gnu-src/bd-elf/or32-elf/newlib/libc/reent/../../../../../unisrc/newlib/libc/reent/lseekr.c:58: undefined reference to `_lseek' /opt/crosstool/or32/or32-elf-1.0rc1/bin/../lib/gcc/or32-elf/4.5.1-or32-1.0rc4/../../../../or32-elf/lib/libc.a(lib_a-readr.o): In function `_read_r': /home/jules/Documents/openrisc/svn/trunk/gnu-src/bd-elf/or32-elf/newlib/libc/reent/../../../../../unisrc/newlib/libc/reent/readr.c:58: undefined reference to `_read' collect2: ld a retourné 1 code d'état d'exécution If I do the same with existing ork1sim BSP (/opt/crosstool/or32/or32-elf-1.0rc1/bin/or32-elf-gcc -mboard=ork1sim -o test test.c) I get the same result. If I use the -mnewlib argument it does compile (/opt/crosstool/or32/or32-elf-1.0rc1/bin/or32-elf-gcc -mnewlib -o test test.c). Do you have any clue ? Franck. _______________________________________________ OpenRISC mailing list [email protected] http://lists.openrisc.net/listinfo/openrisc
