android10.0.0.2.3.0 build error '-Wshift-overflow=2'

cancel
Showing results for 
Search instead for 
Did you mean: 

android10.0.0.2.3.0 build error '-Wshift-overflow=2'

136 Views
Contributor II

Lunch Target imx8mm

./imx_make.sh bootloader

I get this error several time before the compile fails eventually. Hope someone has figure out a workaround.

make[1]: *** [Makefile:847: build/imx8mp/release/bl31/imx_rdc.o] Error 1
a8fe5040-2585-11e9-9684-4b547fbede22: error: unrecognized command line option '-Wshift-overflow=2'
a8fe5040-2585-11e9-9684-4b547fbede22: error: unrecognized command line option '-Wshift-overflow=2'
make[1]: *** [Makefile:847: build/imx8mp/release/bl31/gpc_common.o] Error 1
make[1]: *** [Makefile:847: build/imx8mp/release/bl31/hab.o] Error 1
a8fe5040-2585-11e9-9684-4b547fbede22: error: unrecognized command line option '-Wshift-overflow=2'
make[1]: *** [Makefile:847: build/imx8mp/release/bl31/imx8m_csu.o] Error 1
a8fe5040-2585-11e9-9684-4b547fbede22: error: unrecognized command line option '-Wshift-overflow=2'
a8fe5040-2585-11e9-9684-4b547fbede22: error: unrecognized command line option '-Wshift-overflow=2'
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATIO...

0 Kudos
4 Replies

49 Views
Contributor II

Okay I made progress. There is some documentation in the NXP bsp package android user guide. Section 3.2.1. Thanks to Zhiming Liu, his suggestion above pointed me to the right path.

Installed the gcc compilers on my system just for nxp's bootloader and kernel. Which NXP has put this in the README within the tarball which would make it a quick find in the future.

0 Kudos

49 Views
NXP Employee
NXP Employee

Hi suly goonetilleke,

Did you set toolchain correctly? It should command as following:

1、sudo gedit ~/.bashrc

2、add strings '  export AARCH64_GCC_CROSS_COMPILE=/opt/gcc-arm-8.3-2019.03-x86_64-aarch64-elf/bin/aarch64-elf-  '

3、source ~/.bashrc

Best regards,

Zhiming

0 Kudos

49 Views
Contributor II

hi Zhiming, thanks for your reply.

I do not have that env variable when compiling the imx8m code. Are you following a documentation or instructions from nxp for this?

Do you know where you got the 8.3 compiler you are using ? Can you point me to the link ?

0 Kudos

49 Views
Contributor II

Hi Zhiming,

I dont have that variable set in my env. I'll try that out. But when I compile the standard AOSP build from google for Android 10, it all compiles which makes me think that my ubuntu linux 20 system has all the tools installed that is necessary for the AOSP build.

Are you following a document from NXP that states instructions for setting AARCH64_GCC_COMPILE ?

thanks for your reply

0 Kudos