Duplicate steps:
step 1) source environment
#!/bin/bash
export CROSS_COMPILE=/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
export ARCH=arm
step 2) cd u-boot-imx/
step 3) make distclean
step 4) make mx6qpsabresd_config
step 5) make
error log message:
...
...
CC examples/standalone/stubs.o
LD examples/standalone/libstubs.o
CC examples/standalone/hello_world.o
LD examples/standalone/hello_world
/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ld.bfd: cannot find -lgcc
make[2]: *** [examples/standalone/hello_world] Error 1
make[1]: *** [examples/standalone] Error 2
make: *** [examples] Error 2
Can you help me to solve this issue?
Thanks.
Best Regards,
Alex
Hi Alex,
Here is the command you can refer to:
export ARCH=arm
export CROSS_COMPILE=/opt/poky/1.8/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
export CC="/opt/poky/1.8/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/opt/poky/1.8/sysroots/imx6qpsabresd"
make mx6qpsabresd_defconfig
make CC="$CC"
I have the same problem with you before, and this setting solved my problem.
Hope it will be helpful to you too!
Best regards,
Danwei Luo
---------------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
---------------------------------------------------------------------------------------------------------------------------
Hi Alex,
Try following way, please!
gcc - U-boot build fails - cannot find lgcc / libgcc.a - Ask Ubuntu
Regards,
Weidong