public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How can I build a cross compiler for Digital Unix?
@ 2002-09-24  2:59 Ioannis E. Venetis
  0 siblings, 0 replies; 3+ messages in thread
From: Ioannis E. Venetis @ 2002-09-24  2:59 UTC (permalink / raw)
  To: gcc-help


Hello,

I am trying to use the SMTSIM simulator, which simulates the Alpha
processor and adds some extensions to it for multi-threading. According to
the README of the simulator, it runs on Digital Unix and it also accepts
Alpha object code generated on such systems. My problem is that I have no
access to a system with Digital Unix. Therefore, I am porting the
simulator to another system (Origin 2000, R10000 processors, IRIX 6.5) and
I am almost done with it. By porting I mean that it will run on an Origin
2000 system, but the object code it will accept is still Alpha object
code. As you can imagine, I need also a compiler that will generate object
code for Digital Unix systems and to do this I need your help, as all my
attempts to build one have failed and a few relevant postings in this list
are rather old and were not useful to me.

First let me describe what I have done. I downloaded binutils-2.13,
uncompressed it and tried to configure it on my system (dual Pentium III,
866MHz, RedHat Beta "null"):

~/Temp # tar -xzvf binutils-2.13.tar.gz
~/Temp # mkdir binutils-2.13-build
~/Temp # cd binutils-2.13-build
~/Temp # ../binutils-2.13/configure --prefix=/usr/local/apps/alpha-dec-osf
--target=alpha-dec-osf


The few first lines of the output I get are:


Configuring for a i686-pc-linux-gnu host.
*** This configuration is not supported in the following subdirectories:
     gas ld
    (Any other directories should still work fine.)
Created "Makefile" in /root/Temp/RPMS/CrossGCC/binutils-2.13-build using
"mt-frag"
Configuring intl...
creating cache ../config.cache

And finally I installed everything:

~/Temp # make install

The first question I have is if the selected target is the correct one.
It seems that my system is correctly recognized but what worries me is
that the assembler and the loader are not build. The configuration and the
compilation of all other programs contained in the binutils package
continues without any problems, but I have no assembler and loader. I
tried to use binutils 2.12, 2.11.2 and 2.11 but all seem to have the same
problem.

Although I had no assembler and linker I tried to build gcc-3.2 just to
see up to which point I can get:

~/Temp # tar -xzvf gcc-3.2.tar.gz
~/Temp # mkdir gcc-3.2-build
~/Temp # cd gcc-3.2-build
~/Temp # ../gcc-3.2/configure --prefix=/usr/local/apps/alpha-dec-osf
--target=alpha-dec-osf

~/Temp # make bootstrap

(After compiling several files)

gcc -c -DIN_GCC -DCROSS_COMPILE   -g  -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic
-Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../gcc-3.2/gcc
-I../../gcc-3.2/gcc/. -I../../gcc-3.2/gcc/config
-I../../gcc-3.2/gcc/../include ../../gcc-3.2/gcc/mips-tfile.c -o mips-tfile.o
../../gcc-3.2/gcc/mips-tfile.c:670:24: mips/a.out.h: No such file or
directory
../../gcc-3.2/gcc/mips-tfile.c:691: `scNil' undeclared here (not in a
function)
../../gcc-3.2/gcc/mips-tfile.c:691: enumerator value for `sc_Nil' not
integer constant
../../gcc-3.2/gcc/mips-tfile.c:692: `scText' undeclared here (not in a
function)
../../gcc-3.2/gcc/mips-tfile.c:692: enumerator value for `sc_Text' not
integer constant
(A list with many more undeclared values and other errors)

It seems to me that this error is not related to the fact that I have no
assembler and linker for Digital Unix. Why is make trying to compile a
file for MIPS?

I searched a little bit more and found that gcc-3.2 does not support
anything less than osf4. I repeated the whole procedure, setting
everywhere as target alpha-dec-osf4, but I got exactly the same errors.

As you surely have figured out, I don't know what to do next. Is there
any combination of binutils, gcc and/or target (for example
alphaev68-dec-osf4) that I can use to build gcc as a cross-compiler for
a version of Digital Unix? Moreover, do I have to use any more switches to
the configure scripts for binutils and gcc? Does the host play any role
(32-bit Pentium host -> 64-bit Alpha target)? Is there something else
that I am doing wrong? Any idea/help on this is greatly appreciated.


Thank you in advance for any response,

Ioannis E. Venetis


P.S: If you need any more information for the errors that occur, please
send me a mail and I will provide it to you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How can I build a cross compiler for Digital Unix?
  2002-09-26  2:35 Ioannis E. Venetis
@ 2002-09-26  3:00 ` Rupert Wood
  0 siblings, 0 replies; 3+ messages in thread
From: Rupert Wood @ 2002-09-26  3:00 UTC (permalink / raw)
  To: Ioannis E. Venetis; +Cc: gcc-help

Ioannis Venetis wrote:

> 2 days ago I sent a message with the same subject
> (http://gcc.gnu.org/ml/gcc-help/2002-09/msg00172.html),
> but unfortunately I haven't got any answers yet.

I can't offer much help right now (I know nothing about alpha-osf and
I'm away from my usual build machine) but:

The missing assembler and linker are going to be a problem. You should try
investigating the binutils gas/bfd and ld directories to find out what
alpha-* configurations they support. (Look at the config.* files.) I'd be
surprised if they didn't support any crosses to alpha. If you're still
stuck, might be better to ask on a binutils mailing list. You need both of
these built before you can get much further.

You'll need system include headers and libraries to build against. Easist
to take these from a live alpha system (from /usr/include - including
subdirectories - and selections from /lib and /usr/lib - likely don't need
subdirectories). See '--with-headers' and '--with-libs' in the GCC
configure documentation. You should also add '--without-newlib' unless
you specify both of these.

If you don't have access to an alpha machine to get these, you could
instead target alpha-elf (or whichever binary format OSF uses) and build
newlib as your C library and system headers
(http://sources.redhat.com/newlib/). I've no idea if this will work with
your emulator or not.

Bill Gatliff's FAQ at http://crossgcc.billgatliff.com/ might provide
some general pointers help.

I've no idea why the GCC build failed as it did. You might find a working
configuration for GCC by investigating gas/ld but otherwise you might want
to raise this on the gcc-bugs list. You could also try GCC 3.2.1 or
GCC 3.3 from CVS.

Good luck,
Rup.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* How can I build a cross compiler for Digital Unix?
@ 2002-09-26  2:35 Ioannis E. Venetis
  2002-09-26  3:00 ` Rupert Wood
  0 siblings, 1 reply; 3+ messages in thread
From: Ioannis E. Venetis @ 2002-09-26  2:35 UTC (permalink / raw)
  To: gcc-help


Hello again,

2 days ago I sent a message with the same subject
(http://gcc.gnu.org/ml/gcc-help/2002-09/msg00172.html),
but unfortunately I haven't got any answers yet. I searched more and tried
again to build the cross compiler but I still haven't succeeded. Some
ideas or suggestions on this would be really very helpful to me. If anyone
can help, now is the time :-) It is the first time I am trying to build
gcc as a cross compiler and I really can't figure out what I am doing
wrong and whether the warnings in binutils are related to the errors in
gcc. Hope to get some help this time!

Thank you,

Ioannis E. Venetis

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-09-26 10:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-24  2:59 How can I build a cross compiler for Digital Unix? Ioannis E. Venetis
2002-09-26  2:35 Ioannis E. Venetis
2002-09-26  3:00 ` Rupert Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).