I'm ussing the board s5p4418.
My fpc was built by cmd
sudo make crossinstall CPU_TARGET=arm OS_TARGET=linux INSTALL_PREFIX=/usr
The vender provides me a toolchain its binaries named with
"arm-cortex_a9-linux-gnueabi-" profix
I got errors while linking when I built a new Application project using gtk2 LCL widgetset.
The linking warnings and errors are:
Compile package FCL 1.0.1: Success
Compile package LazUtils 1.0: Success
Compile package LCLBase 1.6.0.4: Success
Compile package LCL 1.6.0.4: Success
Compile Project, CPU: arm, Target: /root/tmp/project1: Exit code 256, Errors: 2, Warnings: 4
project1.lpr(22,0) Warning: "crti.o" not found, this will probably cause a linking failure
project1.lpr(22,0) Warning: "crtbegin.o" not found, this will probably cause a linking failure
project1.lpr(22,0) Warning: "crtend.o" not found, this will probably cause a linking failure
project1.lpr(22,0) Warning: "crtn.o" not found, this will probably cause a linking failure
project1.lpr(22,0) Error: Can't call the linker, switching to external linking
project1.lpr(22,0) Error: Error while linking
The ld is wierd of this toolchain, it is not a elf but a script
#!/bin/sh
call_to=bfd
case "${CTNG_LD_IS}" in
bfd) call_to=bfd;;
gold) call_to=gold;;
esac
exec "${0}.${call_to}" "$@"
exit $?
I don't know what the script meaning, but when I directly used arm-cortex_a9-linux-gnueabi-ld.bfd, these errors were fixed.Then other errors came out
The errors are:
Compile Project, CPU: arm, Target: /root/tmp/project1: Exit code 256, Errors: 1, Warnings: 4
project1.lpr(22,0) Warning: "crti.o" not found, this will probably cause a linking failure
project1.lpr(22,0) Warning: "crtbegin.o" not found, this will probably cause a linking failure
project1.lpr(22,0) Warning: "crtend.o" not found, this will probably cause a linking failure
project1.lpr(22,0) Warning: "crtn.o" not found, this will probably cause a linking failure
/usr/local/bin/arm-linux-ld: warning: /root/tmp/link.res contains output sections; did you forget -T?
/root/libcross/usr/lib//libgdk_pixbuf-2.0.so: undefined reference to `g_type_class_adjust_private_offset'
/root/libcross/usr/lib//libatk-1.0.so: undefined reference to `g_type_check_instance_is_fundamentally_a'
project1.lpr(22,0) Error: Error while linking
I totally got no solution to handle this.
So I used the toolchain downloaded by buildroot-2016.05. The binaries of the toolchain is with prefix
"arm-none-linux-gnueabi-". I used this toochain to build the new Application project and got
no error. I have not tested the built "project1" binary yet, I don't know if it works ok. I'm worry about not using the toolchain the vender provided, I think this will make a bigger problem.
Why it gets different buiding outputs when use arm-cortex_a9-linux-gnueabi or arm-none-linux-gnueabi?
If I'm not using the toolchain the vender provides what will happen?