[nhc-bugs] gcc 3.3 build failure

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Fri Sep 19 11:31:52 EDT 2003


Ian Lynagh <igloo at earth.li> writes:

> My builds with gcc 3.3 on Linux are segfaulting.

We already saw a similar behaviour in the move from gcc-2.95 to
gcc-3.x, so although we have fixed it once, perhaps the cause is
similar.  I suspect a change in the alignment constraints inserted
into the assembler code.  nhc98 assumes and requires a
    .align 4
between constant arrays of unsigned long.  In gcc-3.0, these sometimes
inexplicably lengthened to
    .align 32
and there is an "evil mangler" in the nhc98 driver script which
converts them back to 4.

I suggest you run
   gcc -x c -S -Iinclude
on an arbitrary .hc file somewhere in the distribution package,
and examine the output .s file with "grep .align".  If any of the
numbers are neither 4 nor 32, then we have the culprit.

> which I think should be the two non-win32 patches from your website, the
> asmlong.h patch you committed to CVS, changing abort(-1) to abort() in
> src/runtime/Integer/alloca.c and protecting a trailing \ in
> src/prelude/List/Difference.hs with a comment.

Your extra bugfixes are noted, thanks.

> Also, your build system isn't very clear to me - what is the recommended
> way to use /usr/bin/gcc-2.95 as the C compiler?

The best way would be to set it up at configure time:

    CC=gcc-2.95 ./configure ...
    make basic

Regards,
    Malcolm


More information about the Nhc-bugs mailing list