arm-poky-linux-gnueabi-ld: unrecognized option '-Wl,-O1'

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

arm-poky-linux-gnueabi-ld: unrecognized option '-Wl,-O1'

6,111 Views
huangzhaocn
Contributor I

I have installed the cross-toolchain by execute this shell 'fsl-imx-fb-glibc-x86_64-fsl-image-gui-cortexa7hf-neon-toolchain-4.1.15-2.0.0.sh'. I want to cross compile a source code, but an ERROR occur as below:

huangzhao@huangzhao-virtual-machine:~/swupdate$ make
LD core/built-in.o
arm-poky-linux-gnueabi-ld: unrecognized option '-Wl,-O1'
arm-poky-linux-gnueabi-ld: use the --help option for usage information
make[1]: *** [core/built-in.o] ERROR 1
make: *** [core] ERROR 2

Can you help me to solve this problem? Thanks.

Labels (1)
0 Kudos
3 Replies

2,642 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi zhao,

please take a look  to Yocto Training - HOME 

Task 7 describes how to use meta-toolchain


Regards,
Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

2,642 Views
huangzhaocn
Contributor I

Hi Carlos,

I build the SDK installer by the command 'bitbake meta-toolchain' and install it. Execute 'source /opt/fsl-imx-fb/4.1.15-2.0.0/environment-setup-cortexa7hf-neon-poky-linux-gnueabi' and make. But have en ERROR again. Maybe that is because the mtd-utils is not install in the toolchain's sysroot. How to add the mtd-utils in the meta-toochain image? Thanks.

huangzhao@huangzhao-virtual-machine:~/swupdate$ make
HOSTCC scripts/kconfig/conf.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
CC core/swupdate.o
In file included from core/swupdate.c:48:0:
include/flash.h:26:24: fatal error: mtd/libmtd.h: No such file or directory
compilation terminated.
make[1]: *** [core/swupdate.o] ERROR 1
make: *** [core] ERROR 2

0 Kudos

2,642 Views
huangzhaocn
Contributor I

Hi Carlos,

Can you tell me the difference between the SDK make by 'bitbake meat-toolchain' and the SDK make by 'bitbake fsl-image-gui -c populate_sdk'? I used the SDK make by 'bitbake fsl-image-gui -c populate_sdk to compile my source code. Thanks.

0 Kudos