This is the mail archive of the
mailing list for the newlib project.
AW: Cross compiling Newlib for ARM in Cygwin
- From: "Schwarz, Konrad" <konrad dot schwarz at siemens dot com>
- To: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Tue, 22 Mar 2016 20:55:03 +0000
- Subject: AW: Cross compiling Newlib for ARM in Cygwin
- Authentication-results: sourceware.org; auth=none
- References: <A45B1767F1002449A37508C2CC6003D72DD106 at DEFTHW99EJ1MSX dot ww902 dot siemens dot net>
> -----Ursprüngliche Nachricht-----
> Von: email@example.com [mailto:firstname.lastname@example.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
$ ../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."