mips-sgi-irix bootstrapping

Donald Bruce Stewart dons at cse.unsw.edu.au
Sat Oct 11 18:01:45 EDT 2003

> rmartine:
> > 2.- Now the problem seems to be another one:
> > 
> > bash-2.05$ ghc/compiler/ghc-inplace  hello.hs
> > 
> > crash, and tracing the core it seems a problem having to do with gmp
> > software:
> > 
> > bash-2.05a$ gdb ghc-6.0.1 core
> > 
> > # 0x1153a208 in __decodeFloat ()
> > 
> > if I apply the "-v" flag, then
> > 
> > bash-2.05$ ghc/compiler/ghc-inplace -v hello.hs
> > bash-2.05a$ gdb ghc-6.0.1  core
> > 
> > # 0x11554ae4 in __gmpn_tdiv_qr / ( qp=0x454ed518 ...)
> > 
> > Any idea ?

Well, I had an idea :)

When you build an external gmp, you might just notice wizzing by
some statements about gmp linking to mips64 directories. At
least, I saw that.

So I went and rebuilt libgmp with --build=mips-sgi-irix, 
so that it would explicitly use the mips32 assembly. A patch to GHC to
make the internal gmp do this will appear soon.

GMP ./configure assumes you want 64bit mips, even if you are
building a 32bit mips GHC, using 32 bit tools. Actually building
mips64 GHC is going to have to wait till 32 bit works (unless I get

Anyway, this seems to solve the __gmpn_tdiv_qr problems...

And we continue. For rmartine, I'm now at:

  ../../ghc/compiler/ghc-inplace -optc-O -optc-L/import/pill0/1/dons/lib
  -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes
  -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return
  -optc-Wbad-function-cast -optc-I../includes -optc-I.  -optc-Iparallel
  -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -H16m -O
  -L/import/pill0/1/dons/lib -O2 -static    -c GC.c -o GC.o gmake: ***
  [GC.o] Bus error (core dumped) gmake: Leaving directory

  $ gdb -c core ../compiler/stage1/ghc-6.0.1 
  GNU gdb 5.3

  This GDB was configured as "mips-sgi-irix6.5"...
  Core was generated by `ghc-6.0.1'.
  Program terminated with signal 10, Bus error.
  Reading symbols from /usr/lib32/libm.so...done.
  Loaded symbols for /usr/lib32/libm.so
  Reading symbols from /usr/lib32/libdl.so...done.
  Loaded symbols for /usr/lib32/libdl.so
  Reading symbols from /usr/lib32/libc.so.1...done.
  Loaded symbols for /usr/lib32/libc.so.1
  #0  0x11543374 in __decodeDouble ()

__decodeDouble is back in GHC code, so that at least moves us 1 step


More information about the Glasgow-haskell-users mailing list