Subject: Re: Any luck with self-hosting yet?
To: None <rst@strayer.edu>
From: Marcus Comstedt <marcus@idonex.se>
List: port-dreamcast
Date: 02/16/2001 03:07:00
>>>>> "Robert" == Robert Thompson <rst@strayer.edu> writes:

  Robert> From: "Marcus Comstedt" <marcus@idonex.se>
  >> 
  >> Yes, I have a working native compiler.  It has some quirks, so I'm
  >> going to try to use it to build a proper stage 3 one.
  >> 
  >> 
  Robert> Awesome! What procedure did you follow to get this far?


I cross-compiled gcc on a Solaris machine.

Unfortunately though, the compiler doesn't seem to work all that
well.  I get segfaults on many files.  I've traced it down to
expand_call() in calls.c, in the following code

  p = TREE_OPERAND (exp, 0);
  if (TREE_CODE (p) == ADDR_EXPR)
    {
      fndecl = TREE_OPERAND (p, 0);
      if (TREE_CODE (fndecl) != FUNCTION_DECL)
        ...

TREE_OPERAND(p, 0) will be NULL (or some other inappropriate value),
which will cause the byte-access TREE_CODE(fndecl) to bomb.

Maybe I should have used the sourcecode in toolchain/ instead...
*grumble*


  // Marcus