Dear NXP:
为什么用yocto编译的IMX8的Tool chain不支持LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"的参数?
在交叉编译内核的时候会报错:
aarch64-fslc-linux-ld: unrecognized option '-Wl,-O1'
aarch64-fslc-linux-ld: use the --help option for usage information
scripts/Makefile.build:534: recipe for target 'drivers/firmware/efi/libstub/lib-ksyms.o' failed
make[4]: *** [drivers/firmware/efi/libstub/lib-ksyms.o] Error 1
scripts/Makefile.build:587: recipe for target 'drivers/firmware/efi/libstub' failed
make[3]: *** [drivers/firmware/efi/libstub] Error 2
make[3]: *** Waiting for unfinished jobs....
hope this link is helpful for you
Hi Joan:
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
上述unset操作是否会对内核的编译速度、优化程度造成一定的影响?
Thanks!
to be honest, I'm not sure for this, I think unsetting these flags maybe affect the performance
Hi Joan:
那关于aarch64-fslc-linux-ld: unrecognized option '-Wl,-O1'问题有什么官方的解决方案吗?
Thanks!
for using toolchain, suggest that you can use this as below: