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

See the CrossGCC FAQ for lots more information.


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

arm-elf cross compiler problem with newlib



I am trying to make a cross compiler for arm-elf on a i686-pc-cygwin host.

Package                       Status
binutils -2.10.1             configured and built
gcc-2.95.2                     configured and built

At this point any code (Kernel) can be compiled but any user space code requiring C library functions cannot be linked (crt0.o not found for arm-elf )

So I need to build newlib

I build gcc in two passes:

First create the links
cd /src/gcc/gcc-2.95.3
ln -s ../../newlib/newlib-1.9.0/newlib newlib
ln -s ../../newlib-1.9.0/libgloss libgloss

Point towards directory containing binutils
PATH=/tools/H-i686-pc-cygwin/bin:$PATH

Configure and make gcc (PASS 1)

cd /tmp/build
mkdir gcc-2.95.2-arm
cd gcc-2.95.2-arm


/tmp/build/arm-elf  --target=arm-elf  --prefix=/tools--exec-prefix=/tools/H-i686-pc-cygwin  --enable-languages=c --disable-threads --without-headers \
--with-gnu-as --with-gnu-ld  --with-newlib -v 2>&1 | tee configure.out

Configure works.

Then I build ( with Dinhibit_libc hack)

( cd gcc
  mv Make-target Make-target.orig
  sed -e '/^TARGET_LIBGCC2_CFLAGS/s/$/ -Dinhibit_libc -D__gthr_posix_h/' \
     -e 's/ _dvmd_lnx$/ _dvmd_tls/' \
      <Make-target.orig >Make-target
  mv Makefile Makefile.orig
  sed -e '/^TARGET_LIBGCC2_CFLAGS/s/$/ -Dinhibit_libc -D__gthr_posix_h/' \
     -e 's/ _dvmd_lnx$/ _dvmd_tls/' \
      <Makefile.orig >Makefile
)
make -w all-gcc install-gcc | tee make.out

Make works

Now
CC=arm-elf-gcc
I try to configure and make newlib-1.9.0

/src/newlib/newlib-1.9.0/configure --host=arm-elf --build=i686-pc-cygwin --prefix=/tools/H-i686=pc-cygwin/arm-elf  --enable-add-ons -v 2>&1 | tee configure.out

but configure fails ( ??? )..........
at testing of the arm-elf-gcc comiler on conftest.c as it cannot open crt0.o on linking.......................
See file configure.out

Therafter on invoking make :
make -w all install 2>&1 | tee make.out

All hell brakes loose at memchr.S.
See make.out

It's the first time I am making a cross compiler so if any one can help explain at what point I am doing something wrong it would be of great help. Thanks in advance.

(See attached file: configure.out)(See attached file: make.out)

configure.out

make.out

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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