linux i486 -> sparc-solaris2.7 build problems

Kai Ruottu karuottu@freenet.hut.fi
Fri Jun 16 02:08:00 GMT 2000


markm@student.unsw.edu.au wrote:

> I was hoping someone could help me with a problem building a cross
> compiler for host=i486-pc-linux, target=sparc-sun-solaris2.7
> 
> 1. When in build-gcc/sparc-sun-solaris2.7/libio:
> 
> In file included from ../../../gcc-2.95.2/libio/iofscanf.c:25:
> ../../../gcc-2.95.2/libio/libioP.h:30: errno.h: No such file or
> directory

 Did you install the target headers and libs into '$prefix/$target/include'
as instructed in the GCC manual?
> 
> So I added -Ipath_to_solaris_headers (configure didn't seem to do this)

 Is the 'path_to_solaris_headers' == '$prefix/$target/include' ?

> But then I get the following error:
> ../../../gcc-2.95.2/libio/iofscanf.c: In function IO_fscanf':
> ../../../gcc-2.95.2/libio/iofscanf.c:44: _builtin_va_alist' undeclared
> (first use in this function)
> (Each undeclared identifier is reported only once for each function it
> appears in.)

 Using the '-I' puts it search there BEFORE the normal order :

-------------- A clip from Solaris2 FAQ --------------------------------
5.9) Why do I get __builtin_va_alist or __builtin_va_arg_incr undefined?

    You're using gcc without properly installing the gcc fixed
    include files.  Or you ran fixincludes after installing gcc
    w/o moving the gcc supplied varargs.h and stdarg.h files
    out of the way and moving them back again later.  This often
    happens when people install gcc from a binary distribution.
    If there's a tmp directory in gcc's include directory, fixincludes
    didn't complete.  You should have run "just-fixinc" instead.

    Another possible cause is that you're using ``gcc -I/usr/include.''
-------------------------------------------------------------------------

 Your problem comes from the "Another possible cause"...  Both the GCC standard
headers and the Solaris2 standard headers have the 'stdarg.h' (and 'stddef.h')
and the GCC-ones should be used while building (and later...). So please rename
the Solaris2 ones into 'stdarg.h.sun' and 'stddef.h.sun' or something...

> 2. Sorry for a dumb question, but the sun identification program
> gives SunOS 5.7, but MACHTYPE gives sparc-sun-solaris2.7 Are they
> the same?

 Yes...

> 3. Although I am compiling this to use on a i486, I am using a k6
> to build the cross gcc. Why then does configure seem to ignore
> i486-pc-linux and use i586 (worried I will be unable to use it)
> 
> I am following the cross gcc faq. For both the ix86 host and the
> target source, I have binutils_2.9.5.0.22 (hopefully the
> 2.9.1/solaris bug is fixed) and gcc_2.95.2. on a mouldy debian potato.

 The normal order should be (to get it and) to read the GCC manual first,
then all the target FAQs, the Solaris2 FAQ here, and then the CrossGCC FAQ
if the earlier ones didn't solve all the problems... The GCC manual sources
(*.texi*) come with your gcc-2.95.2 sources, please make a info, DVI, PS or
HTML doc from them... IMHO the first instructions in the CrossGCC FAQ should
be for "How do I produce the 'Using and Porting the GNU Compiler Collection
(GCC)' -manual"... or give some net addresses (like the University of Padova)
where to find it (and the binutils, GDB, make etc. ones) prebuilt.

 And please read from the archives of this maillist about how to solve the
"not finding the dynamic linker"-problem using '-rpath-link', if it still
exists with your linker in binutils-2.9.5.0.22.

Cheers, Kai



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



More information about the crossgcc mailing list