AW: Cross compiling Newlib for ARM in Cygwin

Schwarz, Konrad konrad.schwarz@siemens.com
Tue Mar 22 20:55:00 GMT 2016


> -----Ursprüngliche Nachricht-----
> Von: newlib-owner@sourceware.org [mailto:newlib-owner@sourceware.org]

> I have downloaded newlib-cygwin in directory ./newlib-cygwin .  I
> create a directory ./newlib-cygwin-arm, and
> 
> $ export CC=arm-none-eabi-gcc
> $ cd newlib-cygwin-arm
> $ ../newlib-cygwin/configure

Further experimentation shows that

$ CC=gcc
$ ../newlib-cygwin/configure --target=arm-none-eabi-gcc

seems to be the right thing to do.

I have to say that I find newlib/README confusing:
Section "The Build, Host, and Target Concepts in newlib"
states that "the target concept does not apply to [newlib] ...
gcc's target platform is newlib's host platform,
and, as mentioned before, newlib has no concept of target",
but the top-level configure script requires the --target=
argument.  I was misled by this to set host to arm-none-eabi.

I think the presentation could be improved by adding a sentence
to the effect of "To compile newlib for a host x, add
--target=x when invoking the top level configure script."

Regards

Konrad Schwarz



More information about the Newlib mailing list