First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 73611
Alias:
Product:
Component:
Status: CLOSED
Resolution: WORKSFORME
Assigned To: PPC Porters <ppc@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Keri Harris <keri@gentoo.org>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 73611 depends on: Show dependency tree
Bug 73611 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.




View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-12-06 18:34 0000
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"

------- Comment #1 From Michael Hanselmann (hansmi) (RETIRED) 2004-12-08 12:31:00 0000 -------
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?

------- Comment #2 From Keri Harris 2004-12-08 16:47:59 0000 -------
Stripping -Ox works nicely. Closing.

First Last Prev Next    No search results available      Search page      Enter new bug