# $NetBSD: HACKS,v 1.16 2003/07/23 16:06:30 salo Exp $ # # This file is intended to document workarounds for currently unsolved # (mostly) compiler bugs. # # Format: # hack title # cdate creation date # mdate mod date # who responsible developer # port ... # affected ports, space separated, if not "all" # file affected file : revision : line from : line to # affected files and revision and line numbers describing hack # multiple lines if necessary. # pr NNNN ... # problem reports this hack works around, if known. Space # separated. # regress src/regress/directory/where/test/found # regression test directories, if available. # descr # insert short informal description (multi-line). (Longer ones # should be in the PR database. More formal descriptions might # be in the regress tree. See above). # kcah # closing bracket. # # this is a comment. hack gcc 2.95.3/alpha -O2 bug cdate Wed Feb 5 16:36:58 EST 2003 who dmcmahill port alpha file audio/xsidplay/patches/patch-aa : 1.8 cad/qcad/patches/patch-aa : 1.4 devel/guile-gtk//Makefile : 1.10 devel/guile-gtk/patches/patch-aa : 1.6 x11/qt2-libs/patches/patch-ae : 1.8 x11/qt2-libs/patches/patch-ae : 1.18 x11/kdelibs3/patches/patch-cd : 1.1 x11/kdelibs3/patches/patch-ce : 1.1 lang/gcc3/Makefile : 1.5 net/bing/Makefile : 1.12 net/isic/Makefile : 1.5 net/ettercap/patches/patch-aa : 1.4 net/ettercap/Makefile : 1.11 descr Compiler crashes kcah hack gcc 2.95.3/alpha -O2 bug cdate Thu Jan 23 15:42:57 UTC 2003 who dmcmahill port alpha file mail/imap-uwwm/Makefile : 1.52 descr Compiler crashes kcah hack gcc 2.95.3/alpha c++ -O2 bug cdate Fri Aug 16 06:38:16 EDT 2002 who dmcmahill port alpha file print/cjk-lyx/patches/patch-ab : 1.2 file print/cjk-lyx/patches/patch-ad : 1.1 file print/cjk-lyx/patches/patch-ae : 1.1 file print/cjk-lyx/patches/patch-af : 1.1 descr Assembler runs forever and never returns with -O2 on some files. kcah hack gcc 2.95.3/alpha -O2 bug cdate Sun Aug 11 12:39:46 EDT 2002 who dmcmahill port alpha file wm/flubox/patches/patch-ab : 1.3 descr Assembler runs forever and never returns with -O2 on some files. kcah hack gcc 2.95.3/m68k -O2 bug cdate Fri Jul 19 04:33:29 UTC 2002 who fredb port mac68k, amiga file graphics/gdk-pixbuf/patches/patch-aa : 1.3 descr pixops.c gives 'Internal compiler error' with -O2 (but not -O), on m68k only. The exact error message is reproduced in the patch. kcah hack gas 2.11.2 commutative constraint bug cdate Fri May 10 04:51:29 UTC 2002 who fredb port mac68k file devel/gmp/patches/patch-aa : 1.7 descr The __asm__() in longlong.h fails to assemble on m68k with an "unrecognized instruction" error, unless the commutative constraint ('%') is removed (which makes it *more* constrained). kcah hack gcc 2.95.3 -O2 bug cdate Thu Apr 18 15:42:57 UTC 2002 who fredb, dmcmahill port alpha, mac68k file print/lyx/patches/patch-ab : 1.2 file print/lyx/patches/patch-ac : 1.1 file print/lyx/patches/patch-ae : 1.1 descr lyxfunc.C causes 'Internal compiler error' with -O2 (but not -O). The exact error message is reproduced in the patch. Various other files cause the assembler to run forever (well, I gave up after several hours) on netbsd-1.5.3/alpha using gcc-2.95.3 and -O2. kcah hack cc -O* bug mdate 29 Dec 2001 who abs port arm32 file audio/libvorbis/Makefile : 1.12 : 20 : 28 descr floor1.c causes Internal compiler error with egcs-2.91.66 19990314 (shipped with 1.5.2) kcah hack cc -O* bug mdate 10 Oct 2001 who abs port arm32 file net/djbdns/Makefile : 1.14 : descr various files go into infinite loop if optimisation enabled in egcs-2.91.66 19990314 (shipped with 1.5.2) kcah hack cc -O* bug mdate 03 Oct 2001 who abs port arm32 file net/ucspi-tcp/Makefile : 1.7 : descr various files go into infinite loop if optimisation enabled in egcs-2.91.66 19990314 (shipped with 1.5.2) kcah hack cc -O* bug mdate 23 Aug 2001 who abs port sparc64 file graphics/tiff/patches/patch-aa : 1.3 : 52 : 58 descr on tif_dirread.c -O[12] causes the compiler to abort kcah hack cc -O* bug cdate 08 Nov 2000 mdate 10 Jan 2002 who abs port arm32 arm file benchmarks/lmbench/patches/patch-aa : 1.2 : file benchmarks/lmbench/Makefile : 1.9 : descr on certain c files, using -O[1-3] will cause the arm32 cc1 to run forever. reported to GCC people as PR optimization/2391. kcah hack cc -O* bug mdate 18 May 2001 who abs file x11/xscreensaver/distinfo : 1.2 : file x11/xscreensaver/patches/patch-ab : 1.7 : descr on distort.c -O[12] causes the compiler to abort kcah hack c++ -O* bug mdate 02 Jun 2000 who dmcmahill file audio/festival/patches/patch-ai : 1.2 : file audio/festival/patches/patch-aj : 1.1 : file audio/festival/patches/patch-ak : 1.1 : file audio/festival/patches/patch-al : 1.1 : file cad/verilog/patches/patch-ad : 1.3 : file cad/verilog-current/patches/patch-ad : 1.3 : file cad/vipec/patches/patch-ac : 1.4 : file emulators/stella/patches/patch-ac : 1.3 : 36 : 43 file graphics/kdegraphics/patches/patch-af : 1.5 file graphics/xpdf/Makefile : 1.18: 27 file graphics/xpdf/patches/patch-aa : 1.3 file math/yacas/patches/patch-ac : 1.1.1.1 : file x11/glclock/Makefile : 1.3 : 18 : 20 file x11/windowmaker/Makefile : 1.51 : 39 : 42 pr 9453 descr on certain c++ files, using -O[1-3] will cause cc1plus to run forever. On other files, c++ -O[1-3] will cause the assembler to run forever. This problem is noted on pmax and sparc (NetBSD-1.4.*) with gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release) evidently this problem also exists on arm32. kcah hack mac68k-jade mdate 29 Mar 2001 who hubertf port mac68k file textproc/jade/patches/patch-aa: 1.1 : 1 : 999 descr jade on mac68k seems to dump core under certain conditions, the patch was sent in by "Kogule, Ryo" via tech-pkg. The subject of the thread is "Jade doesn't work" It is suspected that the patch really works around a bug in the toolchain. kcah hack perl5-base mdate 12 Apr 2001 who manu port all Checking in perl5-base/patches/patch-ag: 1.2 : 1 : 999 descr The Xerces-Perl module is implemented as a shared object. It needs some symbols from libgcc.a, such as __eh_alloc. It's not possible to link the xerces-P shared object with libgcc.a, because libgcc.a is not compiled with -fPIC. Hence we need to have the missing symbols in the Perl executable. This hack includes the whole libgcc.a in the Perl executable, and links with c++ so that some mandatory symbols such as __pure_virtual are also included. It should go away with GCC-3.0, or if we make a libgcc.so on day. kcah hack gcc-2.95.3 -O* bug mdate 12 Feb 2002 who mrauch port i386 file devel/pth/Makefile : 1.37 : 20 : 22 descr OpenOffice segfaults after some time in the pthread library with a completely thrashed stack. Removing optimization when building pth (-O0) avoids this problem. kcah hack binutils-2.11.2 ld versioned symbols bug cdate 26 Feb 2002 who mrauch file misc/openoffice/patches/patch-dj file misc/openoffice/patches/patch-dk descr Using versioned symbols the special symbol _etext can end up in the shared library with a junk value for the version string instead of "0" for no version. Sometimes it is sufficient to reorder the -l flags on the link line but the general hack is to disable versioned symbols. kcah hack sparc64-kth-krb cdate 29 Mar 2002 who hubertf file security/kth-krb4/Makefile descr This package hangs when compiling one of the files with the compiler that comes with 1.5ZC. The compiler needs to be killed manually - the package is marked as interactive on sparc64 for that reason. kcah hack cc -O* bug mdate 04 Jun 2002 who cjep port arm file net/ucspi-tcp/Makefile : 1.11 : descr some compilations go into infinite loop if optimisation enabled in gcc-2.95.3 20010315 (release) (NetBSD nb2) as shipped with a releng snapshot (May 31st) of NetBSD-1.6_BETA1. See also abs's entry above. First hang at: ( ( ./compile tryulong32.c && ./load tryulong32 && ./tryulong32 ) \ >/dev/null 2>&1 && cat uint32.h2 || cat uint32.h1 ) > uint32.h kcah hack cc -O* bug mdate 04 Jun 2002 who cjep port arm file net/djbdns/Makefile : 1.19 : descr various files go into infinite loop if optimisation enabled in gcc-2.95.3 20010315 (release) (NetBSD nb2) as shipped with a releng snapshot (May 31st) of NetBSD-1.6_BETA1. See also abs's entry above. First hang as ucspi-tcp. kcah hack cc -O* bug mdate 06 Jun 2002 who cjep port arm file emulators/stella/Makefile : 1.5 : descr Usual arm optimisation problem. The first problem is at: c++ -c -O2 -fno-rtti -I. -I../emucore -I../emucore/m6502/src \ -I../emucore/m6502/src/bspf/src -I../ui/x11 -I../ui/sound \ -I/usr/X11R6/include -DBSPF_UNIX ../emucore/m6502/src/M6502.cxx kcah hack cc -O* bug mdate 07 Jun 2002 who cjep port arm file databases/cdb/Makefile : 1.3 : descr Usual arm optimisation problem. The first problem occurs around ( cat warn-auto.sh; echo exec "`head -1 conf-cc`" '-c ${1+"$@"}' \ ) > compile chmod 755 compile kcah hack gcc 2.95.3 -O2 bug mdate 22 Jun 2002 who jlam port sparc64 file x11/openmotif/patches/patch-ap : 1.2 : 209 pr 15477 descr With -O2 optimization, a "if {} else if {} else {}" C statement isn't converted into the correct code. kcah hack cc -O* bug mdate 28 Nov 2002 who agc port arm file emulators/simh/Makefile : 1.3 : descr Usual arm optimisation problem. The first problem occurs around compilation of altairz80 kcah hack gcc-sparc64-memorysize mdate 8 Jan 2003 who salo port sparc64 file chat/silc-client/patch-ab : 1.8 file chat/silc-server/patch-ac : 1.7 file security/skey/patch-aa : 1.2 file security/skey/patch-ab : 1.1 descr The SHA1Transform() function causes the sparc64 compiler to use excessive amounts of memory attempting to optimise this function. Using no optimisation allows the function to build. kcah hack ImageMagick arm32+mipsel -O2 bug mdate 25 Jan 2003 who hubertf (the mipsel one, dunno who did the arm32 one) port cobald (probably other mipsel's), arm32 file graphics/ImageMagick/Makefile : 1.90 descr When compiling with -O2, gcc spins at one file. Going back to -O fixes this. (The usual story...) kcah hack zip -O bug mdate 1 Jun 2003 who grant port powerpc file archivers/zip/Makefile : 1.33 descr When compiling with -O or -O2, gcc dies with an internal compiler error on crypt.c. Turning off optimization fixes this. kcah