AnsweredAssumed Answered

IMX8 Cross-compilation "unrecognized option '-Wl,-O1'"

Question asked by qingzong ma on Aug 21, 2019
Latest reply on Aug 29, 2019 by qingzong ma

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....

Outcomes