This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Re: binutils and newlib for powerpc-ibm-eabi with gcc-2.95.2


> Mailing-List: contact binutils-help@sourceware.cygnus.com; run by ezmlm
> List-Unsubscribe: <mailto:binutils-unsubscribe-geoffk=cygnus.com@sources.redhat.com>
> List-Subscribe: <mailto:binutils-subscribe@sources.redhat.com>
> List-Archive: <http://sources.redhat.com/ml/binutils/>
> List-Post: <mailto:binutils@sources.redhat.com>
> List-Help: <mailto:binutils-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
> Date: Mon, 12 Feb 2001 12:53:53 +0000
> From: Dan Alderman <d.alderman@180sw.com>
> X-Accept-Language: en
> CC: d.alderman@180sw.com
> 
> Hi,
> 
> I'm having problems compiling the simplist of programs (i.e. the
> infamous helloworld.c) using newlib for this target.  As I'm unsure as
> to where the problem is (although I am suspoecting the linker) and I'm
> using all three packages mentioned I have posted this to all the
> relevant mainling lists.
> 
> I will explain the steps I have taken hoping that someone here may have
> the answer.  It may be something foolish; I am new to compiling gcc with
> newlib for embedded targets, if it is then I appologise in advance.
> 
> I am using binutils-2.10.2.tar.gz, gcc-2.95.2.tar.gz and newlib from the
> cvs tree (I have tried newlib-1.9.0.tar.gz with the same errors).
> 
> Having unpacked the sources into /export/sources I create empty parallel
> dirs in /export/sources for building in, so the directory structure in
> /export/sources looks like the following.
> 
> ls
> CVS              build-binutils  gcc-2.95.2    newlib-cvs
> binutils-2.10.1  build-gcc       newlib-1.9.0
> 
> from /export/sources I do the following.
> 
> cd build-binutils
> ../binutils-2.10.1/configure --prefix=/export/usr
> --target=powerpc-ibm-eabi
> make
> make install
> 
> Things happen and it all seems to work fine with no apparent errors.
> 
> Next in the gcc-2.95.2 directory I do the following
> 
> ln -s ../newlib-cvs/newlib newlib
> 
> to create the symbolic link so newlib is built with the gcc build.

What about libgloss?  You need libgloss to provide the
startup files and system calls.

> Issuing the following to try and compile my helloworld.c program
> produces the following errors.
> 
> powerpc-ibm-eabi-gcc helloworld.c

You didn't say which board the compiler should compile for.  You need
to specify a flag like -msim, or you need to supply appropriate
startup files, system call interfaces, and a linker script.

> Has anyone here been able to use gcc with binutils and newlib to create
> a cross compiler suite of tools for the powerpc-ibm-eabi target (i.e. a
> powerpc as a bare chip with no OS, i.e. Linux on it).  Is there
> something I'm missing in the build process?

Yes, I do this all the time.

The easiest way to do it is to check out current CVS for the entire
'src' archive, and the entire 'gcc' archive, and then combine the two
by copying first the 'src' archive then the 'gcc' archive into a
single directory (the order does matter).  Then you should be able to
just configure and make.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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