SGI-Port // Mnagler-Gcc Interface...

Rafael Martínez Torres martinez.torres@fdi.ucm.es
Wed, 27 Feb 2002 12:44:56 +0000


--Boundary_(ID_ut1Ky55/IuhfMxzQvT0AyA)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 8BIT

>
> The other way to do the port is to bootstrap from HC files; i.e.,
> forget that any ghc build exists on your architecture, and start from
> scratch.  The method is discussed briefly at
>
>
http://www.haskell.org/ghc/docs/latest/building/sec-booting-from-c.html
>
> but basically involves using pre-built, non-gcc-specific C files that
> don't need mangling to build the first stage GHC compiler.

Well, I may be wrong, but I think booting .hc files doesn't avoid
mangling step ...

.hs ->| hsc |-> .hc  -> |cc| -> .s -> |mangling| -> .s' -> |assembler|
-> .o -> | linker | -> a.out

am I right ?


I tried booting from .hc files in linux, sun, and now irix...

Look at the table:

 platform            sparc-sunos   sparc-sunos i386-linux  i386-linuxmips-sgi-irix mips-sgi-irix
 gcc-version        2.7.2.3        2.95.1      2.7.2.3     2.95.1    2.95.1        2.7.2.3
 ghc-3.02-booting-hcOK             NOK         OK          NOK       OK            ¿OK?

We should distinguish conceptually  the next "model":
- compiler properly said (hsc) :  .hs -> .hc  ( writen in Haskell (.hs)
!! , so I need to mangle !)
- the run-time suport (-l<something>.a , It's almost written in C,
something in Haskell .)
- the mangler (ghc-asm.prl)  .s -> .s' (mangles prelude functions,
destroying C -stack model )
- the linker ( -lruntimea, .o -> a.out)
- the driver (ghc.prl) . The master overall guide process...


The key point I must concentrate is the gcc-mangler interface...That
would explain the previous table.
Booting .hc doesn't avoid mangling...as I understand the process.( I may
be wrong )

The older mangler (ghc-3.02) seems to be dessigned closely to the gcc
2.7.2.3 output... ( The ghc-4.08 runs on gcc-2.95.1 )
That's why I'm trying to find which one was used to build and run
ghc-2.10-mips-sgi-irix6.tar.gz .

Any other e-mail or reference to consult MIPS-port would be
acknowledged...

Sorry if my previous mail was large and a bit dark...

> From
> there, you have a Haskell compiler that can be used to compile the
> real GHC natively, and you can work on the mangler etc as necessary.
> No doubt one of the GHC Team will give more details.
>
> In general, the GHC Team is very happy to help with this kind of
> thing, because they want GHC to be available on as many platforms as
> possible.
>


--Boundary_(ID_ut1Ky55/IuhfMxzQvT0AyA)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: 7BIT

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
>
<br>> The other way to do the port is to bootstrap from HC files; i.e.,
<br>> forget that any ghc build exists on your architecture, and start
from
<br>> scratch.&nbsp; The method is discussed briefly at
<br>>
<br>> <A HREF="http://www.haskell.org/ghc/docs/latest/building/sec-booting-from-c.html">http://www.haskell.org/ghc/docs/latest/building/sec-booting-from-c.html</A>
<br>>
<br>> but basically involves using pre-built, non-gcc-specific C files
that
<br>> don't need mangling to build the first stage GHC compiler.
<p>Well, I may be wrong, but I think booting .hc files doesn't avoid mangling
step ...
<p>.hs ->| hsc |-> .hc&nbsp; -> |cc| -> .s -> |mangling| -> .s' -> |assembler|
-> .o -> | linker | -> a.out
<p>am I right ?
<br>&nbsp;
<p>I tried booting from .hc files in linux, sun, and now irix...
<p>Look at the table:
<br>&nbsp;
<table BORDER COLS=7 WIDTH="100%" NOSAVE >
<tr>
<td>platform</td>

<td>&nbsp;sparc-sunos&nbsp;&nbsp;</td>

<td>sparc-sunos</td>

<td>i386-linux&nbsp;</td>

<td>i386-linux</td>

<td>mips-sgi-irix</td>

<td>mips-sgi-irix</td>
</tr>

<tr>
<td>gcc-version</td>

<td>2.7.2.3</td>

<td>2.95.1</td>

<td>2.7.2.3</td>

<td>2.95.1</td>

<td>2.95.1</td>

<td>2.7.2.3</td>
</tr>

<tr>
<td>ghc-3.02-booting-hc</td>

<td>OK</td>

<td>NOK</td>

<td>OK</td>

<td>NOK</td>

<td>OK</td>

<td>&iquest;OK?</td>
</tr>
</table>

<p>We should distinguish conceptually&nbsp; the next "model":
<br>- compiler properly said (hsc) :&nbsp; .hs -> .hc&nbsp; ( writen in
Haskell (.hs) !!&nbsp;, so I need to mangle !)
<br>- the run-time suport (-l&lt;something>.a , It's almost written in
C, something in Haskell .)
<br>- the mangler (ghc-asm.prl)&nbsp; .s -> .s' (mangles prelude functions,
destroying C -stack model )
<br>- the linker ( -lruntimea, .o -> a.out)
<br>- the driver (ghc.prl) . The master overall guide process...
<br>&nbsp;
<p>The key point I must concentrate is the gcc-mangler interface...That
would explain the previous table.
<br>Booting .hc doesn't avoid mangling...as I understand the process.(&nbsp;I&nbsp;may
be wrong )
<p>The older mangler (ghc-3.02) seems to be dessigned closely to the gcc
2.7.2.3 output... (&nbsp;The ghc-4.08 runs on gcc-2.95.1 )
<br>That's why I'm trying to find which one was used to build and run ghc-2.10-mips-sgi-irix6.tar.gz
.
<p>Any other e-mail or reference to consult MIPS-port would be acknowledged...
<p>Sorry if my previous mail was large and a bit dark...
<p>> From
<br>> there, you have a Haskell compiler that can be used to compile the
<br>> real GHC natively, and you can work on the mangler etc as necessary.
<br>> No doubt one of the GHC Team will give more details.
<br>>
<br>> In general, the GHC Team is very happy to help with this kind of
<br>> thing, because they want GHC to be available on as many platforms
as
<br>> possible.
<br>>
<br>&nbsp;</html>

--Boundary_(ID_ut1Ky55/IuhfMxzQvT0AyA)--