This is the mail archive of the
mailing list for the newlib project.
Re: problems configuring newlib on Ubuntu
- From: Ralf Corsepius <ralf dot corsepius at rtems dot org>
- To: Ben Hertzberg <bhertzberg at apple dot com>, newlib at sourceware dot org
- Date: Thu, 13 Feb 2014 10:23:15 +0100
- Subject: Re: problems configuring newlib on Ubuntu
- Authentication-results: sourceware.org; auth=none
- References: <6C9AEA78-A03B-4A50-B97D-898970603C1A at apple dot com>
On 02/12/2014 11:25 PM, Ben Hertzberg wrote:
I am trying to build newlib on an x86-64 Ubuntu 13.10 system for aarch64 simulation. I have already installed the aarch64-linux-gnu binutils, as well as some of the other packages that the configure script seemed to be checking for. I just want to create a libc and libgloss that I can statically link against when compiling AArch64 linux ELF binaries.
I am running into serious trouble getting newlib to configure and build. Iâm spinning my wheels and I would greatly appreciate any assistance you can provide.
Here are the steps that I take after downloading the newlib archive:
tar zxvf newlib-2.1.0.tar.gz
This make does not actually build anything.
Well, you seem to be at the very beginning of a learing curve and as
such is very difficult to answer.
Normally you need both binutils and GCC for your target. As newlib-based
GCC toolchains recursively depend on newlib you usually will not have this.
The escape is to bile, newlib is built together with your target's GCC
(aka. one-tree style building).
In brief, this means
1. build and install target-binutils
2. add the path to target-binutils to $PATH
3. Untar GCC
4. Untar newlib
5. Add a symlink gcc-<version>/newlib pointing to the newlib-subdir
inside of the untarred newlib-<version> sourcetree.
6. Create a builddir (e.g. mkdir BUILD) and enter it.
7. <path-to-untarred-GCC>/configure \
--with-newlib --target=<your-target> --prefix=<prefix> \
... <more options> ...