This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: mips-sgi-irix5.2


Jean-Marc Nuzillard wrote:
> I have tried to build gcc for mips-sgi-irix5.2 (as config.guess tells me).

I suppose you're trying to build gcc-2.95.2.

> Everything when ok until the comparision of stage2 and stage3 compilers.
> A lot of files were different and make terminated in error.
> I tried to run 'make install' and some stuff was installed.

I don't know about IRIX 5.2, but in IRIX 5.3 I had to do some hacking
to get gcc compiled at all. I hope you also installed the GNU binutils?

Here is my build recipe for binutils-2.9.1 and gcc-2.95.2 on IRIX 5.3,
it might work on IRIX 5.2 as well. I installed gcc-2.95.2 for IRIX 5.3,
SunOS 4.1.4, IRIX 6.[2345] in the same directory, hence the --prefix and
--exec-prefix flags. The GNU make utility lives in /it/bin/gmake. I use
the SGI MipsPRO C compiler to bootstrap gcc.

set path = (  /usr/sbin /sbin /usr/bsd /usr/bin /bin /usr/bin/X11 )
setenv MAKE /it/bin/gmake
setenv CC /usr/bin/cc

untar binutils
cd binutils
configure --prefix=/usr/it/packages/gcc/gcc-2.95.2/install \
  --exec-prefix=/usr/it/packages/gcc/gcc-2.95.2/install/irix53 \
  --program-prefix=g
/it/bin/gmake
/it/bin/gmake/install

set path = ( /usr/it/packages/gcc/gcc-2.95.2/install/irix53/bin $path )
rehash
setenv LDFLAGS -L/usr/it/packages/gcc/gcc-2.95.2/install/irix53/lib
setenv AS /usr/it/packages/gcc/gcc-2.95.2/install/irix53/bin/gas
setenv LD /usr/it/packages/gcc/gcc-2.95.2/install/irix53/bin/gld

untar gcc
configure --prefix=/usr/it/packages/gcc/gcc-2.95.2/install \
  --exec-prefix=/usr/it/packages/gcc/gcc-2.95.2/install/irix53 \
  --enable-threads --enable-languages='c,c++,objc,f77'

Edit config.status, set all fork stuff to 'no'
Re-run configure:
configure --prefix=/usr/it/packages/gcc/gcc-2.95.2/install \
  --exec-prefix=/usr/it/packages/gcc/gcc-2.95.2/install/irix53 \
  --enable-threads --enable-languages='c,c++,objc,f77'

/it/bin/gmake CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2' bootstrap-leanMake stops, edir ../../gcc-2.95.2/libiberty/pexecute.c, comment out
  #include <vfork.h>
/it/bin/gmake CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2' bootstrap-lean(again)
/it/bin/gmake install

It works for me, YMMV.

> I tried to compile the hello.c program with gcc.
> gcc still works (I had a previous build working).
> I tried to compile the hello.C program with g++
> g++ cannot locate iostream.h. Where should it be installed ?
> I went back to the C language IO style using stdio.h.
> Compilation itself was ok but ld complained about the -lstdc++ option.
> Where should libstdc++.a be located ?
> Does the failure of the comparison step have a consequence
> on the installation of header and library files ?

Certainly. Installing a broken compiler doesn't work.

> Must I move to irix6.[2345] ?

Depends. IRIX 5.2 is no longer maintained by SGI, so it has quite some
vulnerabilities. If you want to have those vulnerabilities fixed, you
should upgrade to IRIX 6.5. However, if you have a lot of software that
depends heavily on IRIX 5.2 (like dmedia stuff), you should stay with
IRIX 5.2. Gcc 2.95.2 compiles out-of-the box on IRIX 6.5...


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/

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