Hugs98-2003.11 compiles correctly on ppc if optimizations are ignored when compiling the typechecking and compilation parts of hugs. -Ox in CFLAGS when compiling these parts of hugs will cause an INTERNAL ERROR: importEntity due to gcc's garbage collection. (Modules associated with the bytecode interpreter part of hugs are unaffected.) Fortunately the upstream devs are aware of this as src/unix/Makefile.in explains: .c@OBJ@ : $(CC) -c $(CFLAGS) $(OPTFLAGS) $< # Modules to be compiled without optimization. # (old comment: to avoid optimisation bugs in certain compilers. # This may be overly conservative on some compilers.) # (The following explanation is based on a posting by Alastair Reid.) # These modules allocate cells on the Hugs heap and assume a conservative # garbage collector. On some (especially RISC) architectures, the # optimizer may identify a pointer to a Cell as a common subexpression, # and hold that instead of the Cell. This would then be missed by the # conservative garbage collector's simplistic scan of the C stack. # Modules associated with evaluation are safe because they don't assume # conservative GC (see IMPORTANT NOTICE in builtin.c). compiler@OBJ@ : compiler.c $(CC) -c $(CFLAGS) compiler.c module@OBJ@ : module.c $(CC) -c $(CFLAGS) module.c subst@OBJ@ : subst.c $(CC) -c $(CFLAGS) subst.c static@OBJ@ : static.c $(CC) -c $(CFLAGS) static.c type@OBJ@ : type.c $(CC) -c $(CFLAGS) type.c Stripping -Ox from CFLAGS and using OPTFLAGS (which is set to -O2 in configure) allows successful compilation on ppc. Gentoo Base System version 1.4.16 Portage 2.0.51-r3 (default-ppc-2004.2, gcc-3.4.1, glibc-2.3.3.20040420-r2, 2.6.9-gentoo-r1 ppc) ================================================================= System uname: 2.6.9-gentoo-r1 ppc 7447A, altivec supported ccache version 2.2 [enabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.3-r3 Headers: sys-kernel/linux26-headers-2.6.8.1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="ppc" AUTOCLEAN="yes" CFLAGS="-mcpu=G4 -O2 -pipe -fomit-frame-pointer -maltivec -mabi=altivec" CHOST="powerpc-unknown-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mcpu=G4 -O2 -pipe -fomit-frame-pointer -maltivec -mabi=altivec" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks" GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa altivec arts berkdb cdparanoia cdr crypt cups doc dvd encode f77 foomaticdb fortran gdbm gif gimpprint gtk gtk2 imlib java jpeg kde libwww mpeg ncurses noantlr nobcel nobeanutils nobsh nocommonslogging nocommonsnet nojdepend nojoystick nojsch nojython nolog4j nooro noregexp norhino noxalan noxerces nptl oggvorbis opengl oss pam perl png ppc ppds python qt quicktime readline sdk sdl slang spell ssl tcpd tetex tiff truetype xml2 xmms xv zlib"
I've compiled hugs98 with your CFLAGS/CXXFLAGS using gcc 3.4.3 and I don't see, where your problem is. Could you please try with gcc 3.4.3 or tell us, what the exact problem is?
Stripping -Ox works nicely. Closing.