Subject: macppc crossbuild probs (was: new toolchain: cannot compile float with optimization)
To: None <port-vax@netbsd.org, tech-toolchain@netbsd.org>
From: Christian Groessler <cpg@aladdin.de>
List: tech-toolchain
Date: 04/16/2002 13:37:57
Hi,

I've checked more, and the problem described below appears, when I
cross build a vax distribution on macppc.
If I cross build the same sources on i386, the problem disappears.

regards,
chris



-------------- the problem:

Hi,

I've installed a ELF snapshot, I compiled from yesterday's CVS.

The installed compiler cannot compile float with optimization.


vaxentoy:~/tmp$ cc -O2 float.c -o float
cc: Internal compiler error: program cc1 got fatal signal 11

vaxentoy:~/tmp$ cc -O float.c -o float
cc: Internal compiler error: program cc1 got fatal signal 11

vaxentoy:~/tmp$ cc float.c -o float

vaxentoy:~/tmp$ ./float 
result: 46.400000

vaxentoy:~/tmp$ cat float.c
#include <stdio.h>

int main()
{
        double s;

        s = 1.0 * 46.4;

        printf("result: %f\n", s);
}

vaxentoy:~/tmp$ cc -v
Using builtin specs.
gcc version 2.95.3 20010315 (release) (NetBSD nb1)

vaxentoy:~/tmp$ /sbin/sysctl hw.model
hw.model = VAXstation 3100/m{30,40}


regards,
chris