Hello,
I built a simple hello_world.c test program on the command line:
arm-poky-linux-gnueabi-gcc test1.c -v -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9
--sysroot=/opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/
-I /opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/ -o hello
Works fine.
I setup Eclipse IDE for a c project and set all the env variables, and so forth as one would expect.
I tried all sorts of tricks but I get:
Invoking: Cross GCC Linker
arm-poky-linux-gnueabi-gcc -L/opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/lib
-L/opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib -o "hello" ./src/hello.o
/opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find crt1.o: No such file or directory
makefile:30: recipe for target 'test1' failed
/opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find crti.o: No such file or directory
/opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find crtbegin.o: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [test1] Error 1
The -L/opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib is where these files are.
The command line works fine when I export the env vars before hand.
This is a Yocto toolchain SDK built for the QWKS-SCMIMX6DQ installed in /opt which built a working image.
Any clues?
this may help you.
12.04 - cannot find crti.o: No such file or directory - Ask Ubuntu