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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

4,590件の閲覧回数
1042484520
Contributor II

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

ラベル(1)
0 件の賞賛
返信
5 返答(返信)

4,320件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信

4,320件の閲覧回数
1042484520
Contributor II

Hi Joan:

 

   unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE

   上述unset操作是否会对内核的编译速度、优化程度造成一定的影响?

Thanks!

0 件の賞賛
返信

4,320件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

to be honest, I'm not sure for this, I think unsetting these flags maybe affect the performance

0 件の賞賛
返信

4,320件の閲覧回数
1042484520
Contributor II

Hi Joan:

      那关于aarch64-fslc-linux-ld: unrecognized option '-Wl,-O1'问题有什么官方的解决方案吗?

Thanks!

0 件の賞賛
返信

4,320件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

for using toolchain, suggest that you can use this as below:

Task #7 - Create the toolchain 

https://community.nxp.com/docs/DOC-95225 

0 件の賞賛
返信