android - (Android4.2)random compile error "unrecognized command line option '-mshort-load-bytes'" with arm-eabi-gcc 4.6.x -
i have ported u-boot android4.2 source , use android toolchain, has gcc version 4.6.x-google 20120106.
my environment build: ubuntu 10.04, host gcc version 4.4.3.
my platform arm-v7, cotex-a5.
the problem u-boot encounter following compile error (i use multijob building android):
target thumb c++: libgles_trace <= frameworks/native/opengl/libs/gles_trace/src/gltrace_context.cpp cc ispi.c target thumb c++: libgles_trace <= frameworks/native/opengl/libs/gles_trace/src/gltrace_egl.cpp cc spl.c target thumb c++: libgles_trace <= frameworks/native/opengl/libs/gles_trace/src/gltrace_eglapi.cpp make arch/arm/lib/ cc timer.c cc1: error: unrecognized command line option '-mshort-load-bytes' make[2]: *** [/home/jenkins/workspace/droid-4.2.2_r1/out/target/product/aere/obj/u-boot/arch/arm/cpu/armv7/rda/timer.o] error 1 make[1]: *** [/home/jenkins/workspace/droid-4.2.2_r1/out/target/product/aere/obj/u-boot/arch/arm/cpu/armv7/rda/librda.o] error 2 make[1]: leaving directory `/home/jenkins/workspace/rdadroid-4.2.2_r1/u-boot' make: *** [out/target/product/aere/obj/u-boot/u-boot.img] error 2 make: *** waiting unfinished jobs....
but if build again, compile error disappears。
i know gcc after 3.5 doesn't support -mshort-load-bytes
option, gcc-version 4.6, , checked include/generated/cc_options.mk
, if build fails, content is:
cc_options += -marm cc_options += -mno-thumb-interwork cc_options += -mabi=apcs-gnu cc_options += -mabi=aapcs-linux cc_options += -march=armv7-a cc_options += -fno-stack-protector cc_options += -wno-format-nonliteral cc_options += -wno-format-security cc_options += -fstack-usage cc_options += -fno-toplevel-reorder cc_options += -mshort-load-bytes
if success, there no cc_options += -mshort-load-bytes
.
so, can tell me how debug problems? thank you!
-mshort-load-bytes
old option has been replaced in gcc 3 -malignment-traps
. matters old versions of arm architecture, before armv4. tells gcc not load short
(2 byte) values loading words (4 byte) values unaligned location, because cause alignment trap.
references: gcc 3.0.2 , gcc 2.95.3 docs.
Comments
Post a Comment