Cross compiling GCC with newlib for ARM: how to specify GCC options like -march? Cross compiling GCC with newlib for ARM: how to specify GCC options like -march? android android

Cross compiling GCC with newlib for ARM: how to specify GCC options like -march?


For work I cross-build for the Cortex-M3 platform, and I also use newlib. The following links may be helpful for you:

http://frank.harvard.edu/~coldwell/toolchain/http://www.microbuilder.eu/Tutorials/SoftwareDevelopment/BuildingGCCToolchain.aspx

Although the following link is specific to Cortex-M3, it may provide some insight for you, I used it to script my toolchain build:http://www.johannes-bauer.com/mcus/cortex/?menuid=5

Your newlib may have been miscompiled (maybe with the host compiler? Highly unlikely since it links, but hey it's possible).


I think you could first write a shell script to choose the work env, like you will work under gcc or arm-gcc. in this script, you could make an alternative lib link to different lib you want, like if you login and choose gcc, the lib file will be normal libc and if you choose arm-gcc, the lib will be the different one