[U-Boot] random compile error "unrecognized command line option '-mshort-load-bytes'" with arm-eabi-gcc 4.6.x

Yingchun Li sword.l.dragon at gmail.com
Mon Jul 15 14:44:03 CEST 2013


Here is the reply from google developer, who think this is a race condition:
"The Android build system isn't designed to use recursive calls to make,
and the result in that case is subject to race conditions and therefore
very undefined.

You can try to build without -j, you can try to add the pseudo-target
"showcommands" to your command line, but the real debugging is likely to be
in the makefiles you're invoking recursively, not in the Android build
system."

But I have encontered this problem sometimes.

On Mon, Jul 15, 2013 at 1:22 PM, Yingchun Li <sword.l.dragon at gmail.com>wrote:

> I have ported u-boot to my android4.2 source and use the android
> toolchain,
> which has a gcc version 4.6.x-google 20120106.
> my envisionment for build: ubuntu 10.04, with a host gcc version 4.4.3.
> my platform is arm-v7, cotex-a5.
> the problem is that some times u-boot will encounter the following compile
> error(I use a 'make -j32' for 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 for unfinished jobs....
>
>
> but if I build it again, the compile error disappeared。
>
> I know the gcc after 3.5 don't support option -mshort-load-bytes, but my
> gcc-version
> is 4.6, and I checked include/generated/cc_options.mk, if build fail, the
> 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 is no "CC_OPTIONS += -mshort-load-bytes".
> so, anyone can tell me how to debug this problems?
> thank you!
>


More information about the U-Boot mailing list