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


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

newlibc compilation problems


-----BEGIN PGP SIGNED MESSAGE-----

Greetings,

I am new to the list, so please bear with me if this is a FAQ or an otherwise
tosspot question...

I am trying to build a cross-compiler for SunOS on a Linux box. I have
successfully built binutils and gcc-2.7.2.2 as per the FAQ, but I am having
trouble compiling newlibc.

I have run the configure script with 

root@macbeth /opt/local/src/crossgcc/build-newlib# ../newlib-1.7.1/configure
- --host=$host --target=$target --prefix=$prefix -v

where $host=i586-unknown-linux, $target=sparc-sunos and
$prefix=/opt/local/sparc-sun-sunos4.1. Everything seems fine.

When attempting to run make, however, the compilation bombs out with

/opt/local/sparc-sun-sunos4.1/bin/sparc-sun-sunos4.1-gcc -g  -O2
- -DMALLOC_ALIGNMENT=8 -DMISSING_SYSCALL_NAMES -fno-builtin
- -I/opt/local/src/crossgcc/build-newlib/sparc-sunos/newlib/./targ-include
- -I/opt/local/src/crossgcc/newlib-1.7.1/newlib/./libc/include -c
../../../../../../newlib-1.7.1/newlib/libc/sys/sun4/ieee.c
ar x /lib/libc.a Ovfork.o _exit.o _sigvec.o abort.o access.o cerror.o chmod.o
chown.o close.o creat.o dup.o dup2.o errlst.o execl.o execle.o execv.o execve.o
execvp.o fork.o fstat.o getdtablesize.o getpid.o getrusage.o gettimeofday.o
ieee_globals.o ioctl.o isatty.o kill.o link.o lseek.o open.o pipe.o popen.o
read.o sbrk.o setitimer.o sigblock.o signal.o sigpause.o sigsetjmp.o
sigsetmask.o sigtramp.o sigvec.o sleep.o start_float.o stat.o time.o times.o
umask.o unlink.o utime.o utimes.o wait.o wait3.o wait4.o write.o rem.o
multiply.o umultiply.o 
ar: /lib/libc.a: No such file or directory
make[4]: *** [Ovfork.o] Error 9
make[4]: Leaving directory
`/opt/local/src/crossgcc/build-newlib/sparc-sunos/newlib/libc/sys/sun4'
make[3]: *** [subs] Error 2
make[3]: Leaving directory
`/opt/local/src/crossgcc/build-newlib/sparc-sunos/newlib/libc/sys'
make[2]: *** [sys/lib.a] Error 1

The offending Makefile seems to be
build-newlib/sparc-sunos/newlib/libc/sys/sun4/Makefile, with the lines 

all: lib.a crt0.o
lib.a: $(OFILES) $(COPYOFILES) $(COPYOMFILES) $(COPYRENAMEOFILES)
        rm -f $@
        $(AR) $(AR_FLAGS) $@ $(OFILES) $(COPYOFILES) $(COPYOMFILES)
$(COPYRENAMEOFILES)
$(COPYOFILES):
        ar x /lib/libc.a $(COPYOFILES) 

or something to that effect.

What am I doing wrong? Any pointers would be greatly appreciated!!

Thanks in advance!

Sami

=======================================================
               Sami Lempinen * ssl@sci.fi 
   http://www.sci.fi/~ssl/ * http://www.snowman.sci.fi/
   "I want to die like my grandfather, peacefully in my 
   sleep, not screaming in terror like his passengers."

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQCVAwUBM8eQXCRFo0lpa/91AQG1lQQAhFOAKHUiB0Q5m4IDk1l9a81+cHrZfXgK
7jfePV0nzIfQ5/5MFUPzKxdfndQBWJimVe8TNrU9REve+SFUcv2KXcmschGjrdW3
pTicWfW86gPAvFTlkL9ss+XVMudK16lUYM2vozzM6U+bT0/n7P50c0wI4vIVi24N
h68pcWTGgbE=
=xTzb
-----END PGP SIGNATURE-----