[OpenBIOS] Correct GCC configuration for cross-compiling Open BIOS

Armistead, Jason Jason.Armistead at otis.com
Sun Jun 11 11:43:02 CEST 2006


After downloading GCC 4.1.1 (latest), I still get the same problem

Configure runs OK, but during make, while in the gcc directory, the
following message appears just as it is getting ready to move into the next
directory (intl). 

checking for .preinit_array/.init_array/.fini_array support... yes
checking if mkdir takes one argument... no
*** Configuration sparc-sun-sunos4.1.4 not supported
make[2]: Entering directory `/otis/software/source/gcc-4.1.1/cross-gcc/intl'

And then when it got a bit further on, it died with the message

make[2]: Leaving directory
make[2]: Entering directory `/otis/software/source/gcc-4.1.1/cross-gcc/gcc'
make[2]: *** No rule to make target `all'.  Stop.
make[2]: Leaving directory `/otis/software/source/gcc-4.1.1/cross-gcc/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/otis/software/source/gcc-4.1.1/cross-gcc'
make: *** [all] Error 2

With GCC 3.4.6, it simply crashed and died once it identified
sparc-sun-sunos4.1.4 as not supported (this is output from the
gcc/config.gcc script) and it didn't continue on into other directories.

I note that you are using the target as "sparc-linux".  I gave that a go,
rebuilding binutils and trying again to build gcc, and now I get a problem
about  missing include files pthread.h and unistd.h.

/software/source/gcc-4.1.1/cross-gcc/./gcc/xgcc -B/software/source/gcc
-4.1.1/cross-gcc/./gcc/ -B/usr/local/sparc-linux/bin/
ib/ -isystem /usr/local/sparc-linux/include -isystem
include -O2  -O2 -g -O2   -DIN_GCC -DCROSS_COMPILE   -W -Wall
-Wwrite-strings -W
strict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
libc -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I./../intl
./gcc/../libcpp/include  -fexceptions  -c ../../gcc/unwind-dw2.c -o
In file included from ./gthr-default.h:1,
                 from ../../gcc/gthr.h:114,
                 from ../../gcc/unwind-dw2.c:42:
../../gcc/gthr-posix.h:43:21: error: pthread.h: No such file or directory
../../gcc/gthr-posix.h:44:20: error: unistd.h: No such file or directory

I'm thinking that I'm possibly missing glibc or similar, or else I need some
Linux header files.  I'd better take a closer look at Dan Kegel's crosstool
-  I only stayed away from it because it seemed that it didn't have very
good success for Sparc targets according to the target system build matrixes
on Dan Kegel's site.

Maybe there's a better "embedded sparc" target for binutils / gcc that
doesn't need so many headers, i.e. a version of GCC not actually targetted
at an operating system but for pure embedded systems use.



-----Original Message-----
From: openbios-bounces at openbios.org
[mailto:openbios-bounces at openbios.org]On Behalf Of Stefan Reinauer
Sent: Saturday, 10 June 2006 11:21 PM
To: The OpenBIOS Mailinglist
Subject: Re: [OpenBIOS] Correct GCC configuration for cross-compiling

* Armistead, Jason <Jason.Armistead at otis.com> [060610 15:17]:
> Can someone please advise the right cross-gcc configure script settings
> are using to build OpenBIOS for sparc32 ?
> I'm on Solaris 10  (Sparc) and need to know what your OpenBIOS environment
> returns for "gcc -v"
> I tried to build GCC 3.4.6 for target "sparc-sun-sunos4.1.4" but am now
> wondering if perhaps I should be building it for "sparc-sun-elf" or
This should actually work fine.

> Please advise by sending me your "gcc -v" settings so I can get myself out
> of this mess.

Since this is on a linux system (using dan kegel's crosstool) I am not
sure whether it will help..

sparc-linux-gcc -v
Using built-in specs.
Target: sparc-linux
Configured with:
--target=sparc-linux --host=x86_64-host_unknown-linux-gnu
--disable-nls --enable-threads=posix --enable-symvers=gnu
--enable-__cxa_atexit --enable-languages=c,c++ --enable-shared
--enable-c99 --enable-long-long
Thread model: posix
gcc version 4.1.0


coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/

OpenBIOS                 http://openbios.org/
Mailinglist:  http://lists.openbios.org/mailman/listinfo
Free your System - May the Forth be with you

More information about the OpenBIOS mailing list