This is the mail archive of the mailing list for the newlib project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problems configuring newlib on Ubuntu

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
mkdir newlib-aarch64-linux-gnu
cd newlib-aarch64-linux-gnu

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> ...
make install


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]