1 # $NetBSD: HACKS,v 1.32 2009/10/11 16:14:39 asau Exp $
3 # This file is intended to document workarounds for currently unsolved
4 # (mostly) compiler bugs.
10 # who responsible developer
12 # affected ports, space separated, if not "all"
13 # file affected file : revision : line from : line to
14 # affected files and revision and line numbers describing hack
15 # multiple lines if necessary.
17 # problem reports this hack works around, if known. Space
19 # regress src/regress/directory/where/test/found
20 # regression test directories, if available.
22 # insert short informal description (multi-line). (Longer ones
23 # should be in the PR database. More formal descriptions might
24 # be in the regress tree. See above).
31 hack gcc 2.95.3/alpha -O2 bug
32 cdate Wed Feb 5 16:36:58 EST 2003
35 file audio/xsidplay/patches/patch-aa : 1.8
36 cad/qcad/patches/patch-aa : 1.4
37 devel/guile-gtk//Makefile : 1.10
38 devel/guile-gtk/patches/patch-aa : 1.6
39 x11/qt2-libs/patches/patch-ae : 1.8
40 x11/qt2-libs/patches/patch-ae : 1.18
41 x11/kdelibs3/patches/patch-cd : 1.1
42 x11/kdelibs3/patches/patch-ce : 1.1
43 lang/gcc3/Makefile : 1.5
44 net/bing/Makefile : 1.12
45 net/isic/Makefile : 1.5
46 net/ettercap/patches/patch-aa : 1.4
47 net/ettercap/Makefile : 1.11
52 hack gcc 2.95.3/alpha -O2 bug
53 cdate Thu Jan 23 15:42:57 UTC 2003
56 file mail/imap-uwwm/Makefile : 1.52
61 hack gcc 2.95.3/alpha c++ -O2 bug
62 cdate Fri Aug 16 06:38:16 EDT 2002
65 file print/cjk-lyx/patches/patch-ab : 1.2
66 file print/cjk-lyx/patches/patch-ad : 1.1
67 file print/cjk-lyx/patches/patch-ae : 1.1
68 file print/cjk-lyx/patches/patch-af : 1.1
70 Assembler runs forever and never returns with -O2 on some files.
73 hack gcc 2.95.3/alpha -O2 bug
74 cdate Sun Aug 11 12:39:46 EDT 2002
77 file wm/flubox/patches/patch-ab : 1.3
79 Assembler runs forever and never returns with -O2 on some files.
82 hack gcc 2.95.3/m68k -O2 bug
83 cdate Fri Jul 19 04:33:29 UTC 2002
86 file graphics/gdk-pixbuf/patches/patch-aa : 1.3
88 pixops.c gives 'Internal compiler error' with -O2 (but not -O),
89 on m68k only. The exact error message is reproduced in the patch.
92 hack gas 2.11.2 commutative constraint bug
93 cdate Fri May 10 04:51:29 UTC 2002
96 file devel/gmp/patches/patch-aa : 1.7
98 The __asm__() in longlong.h fails to assemble on m68k with an
99 "unrecognized instruction" error, unless the commutative
100 constraint ('%') is removed (which makes it *more* constrained).
103 hack gcc 2.95.3 -O2 bug
104 cdate Thu Apr 18 15:42:57 UTC 2002
107 file print/lyx/patches/patch-ab : 1.2
108 file print/lyx/patches/patch-ac : 1.1
109 file print/lyx/patches/patch-ae : 1.1
111 lyxfunc.C causes 'Internal compiler error' with -O2 (but not -O).
112 The exact error message is reproduced in the patch.
113 Various other files cause the assembler to run forever (well,
114 I gave up after several hours) on netbsd-1.5.3/alpha using
122 file graphics/tiff/patches/patch-aa : 1.3 : 52 : 58
124 on tif_dirread.c -O[12] causes the compiler to abort
132 file benchmarks/lmbench/patches/patch-aa : 1.2 :
133 file benchmarks/lmbench/Makefile : 1.9 :
135 on certain c files, using -O[1-3] will cause the arm32 cc1 to run
137 reported to GCC people as PR optimization/2391.
143 file x11/xscreensaver/distinfo : 1.2 :
144 file x11/xscreensaver/patches/patch-ab : 1.7 :
146 on distort.c -O[12] causes the compiler to abort
153 file textproc/jade/patches/patch-aa: 1.1 : 1 : 999
155 jade on mac68k seems to dump core under certain conditions, the
156 patch was sent in by "Kogule, Ryo" <kogule@mars.dti.ne.jp> via
157 tech-pkg. The subject of the thread is "Jade doesn't work"
158 It is suspected that the patch really works around a bug in the
162 hack gcc-2.95.3 -O* bug
166 file devel/pth/Makefile : 1.37 : 20 : 22
168 OpenOffice segfaults after some time in the pthread library with a
169 completely thrashed stack. Removing optimization when building
170 pth (-O0) avoids this problem.
173 hack binutils-2.11.2 ld versioned symbols bug
176 file misc/openoffice/patches/patch-dj
177 file misc/openoffice/patches/patch-dk
178 descr Using versioned symbols the special symbol _etext can end up
179 in the shared library with a junk value for the version string
180 instead of "0" for no version. Sometimes it is sufficient to
181 reorder the -l flags on the link line but the general hack is to
182 disable versioned symbols.
188 file security/kth-krb4/Makefile
189 descr This package hangs when compiling one of the files with the
190 compiler that comes with 1.5ZC. The compiler needs to be killed
191 manually - the package is marked as interactive on sparc64 for
199 file net/ucspi-tcp/Makefile : 1.11 :
201 some compilations go into infinite loop if optimisation enabled in
202 gcc-2.95.3 20010315 (release) (NetBSD nb2) as shipped with
203 a releng snapshot (May 31st) of NetBSD-1.6_BETA1. See also abs's
204 entry above. First hang at:
205 ( ( ./compile tryulong32.c && ./load tryulong32 && ./tryulong32 ) \
206 >/dev/null 2>&1 && cat uint32.h2 || cat uint32.h1 ) > uint32.h
213 file net/djbdns/Makefile : 1.19 :
215 various files go into infinite loop if optimisation enabled in
216 gcc-2.95.3 20010315 (release) (NetBSD nb2) as shipped with
217 a releng snapshot (May 31st) of NetBSD-1.6_BETA1. See also abs's
218 entry above. First hang as ucspi-tcp.
225 file emulators/stella/Makefile : 1.5 :
227 Usual arm optimisation problem. The first problem is at:
228 c++ -c -O2 -fno-rtti -I. -I../emucore -I../emucore/m6502/src \
229 -I../emucore/m6502/src/bspf/src -I../ui/x11 -I../ui/sound \
230 -I/usr/X11R6/include -DBSPF_UNIX ../emucore/m6502/src/M6502.cxx
237 file databases/cdb/Makefile : 1.3 :
239 Usual arm optimisation problem. The first problem occurs around
240 ( cat warn-auto.sh; echo exec "`head -1 conf-cc`" '-c ${1+"$@"}' \
245 hack gcc 2.95.3 -O2 bug
249 file x11/openmotif/patches/patch-ap : 1.2 : 209
252 With -O2 optimization, a "if {} else if {} else {}" C statement
253 isn't converted into the correct code.
260 file emulators/simh/Makefile : 1.3 :
262 Usual arm optimisation problem. The first problem occurs around
263 compilation of altairz80
266 hack gcc-sparc64-memorysize
270 file security/skey/patch-aa : 1.2
271 file security/skey/patch-ab : 1.1
273 The SHA1Transform() function causes the sparc64 compiler to use
274 excessive amounts of memory attempting to optimise this function.
275 Using no optimisation allows the function to build.
278 hack ImageMagick arm32+mipsel -O2 bug
280 who hubertf (the mipsel one, dunno who did the arm32 one)
281 port cobald (probably other mipsel's), arm32
282 file graphics/ImageMagick/Makefile : 1.90
284 When compiling with -O2, gcc spins at one file. Going back to
285 -O fixes this. (The usual story...)
292 file archivers/zip/Makefile : 1.33
294 When compiling with -O or -O2, gcc dies with an internal
295 compiler error on crypt.c. Turning off optimization fixes this.
298 hack gcc 2.95.3/arm -O2 bug
302 file devel/ftnchek/Makefile : 1.13
303 descr Internal compiler error for fortran.c when -O2. Use -O1 instead.
306 hack gcc 2.95.3/arm -O* bug
310 file mail/safecat/patches/patch-aa : 1.1
311 descr Compilation of the tryulong32.c configuration test takes ~forever.
314 hack gcc 2.95.3/arm internal error
318 file games/sjeng/Makefile : 1.7
319 descr Internal compiler error when compiling search.c.
322 hack gcc 2.95.3/arm -O* bug
326 file databases/cdb/patches/patch-aa : 1.1
327 descr Compilation of the tryulong32.c configuration test takes ~forever.
330 hack perl 5.8/openssl/sparc64 bug
331 cdate Wed Feb 16 13:24:06 2000
334 file security/openssl/patches/patch-ak
336 Perl's int() function gives bad result on sparc64.
337 Hence openssl's bn_prime.pl perl script fails.
338 Use POSIX::floor() as a workaround.
339 See perl ticket #25249.
342 hack alpha c++ -O2 bug
343 cdate Wed Feb 16 13:24:06 2000
346 file graphics/freetype2/Makefile
349 The default compiler flags on the alpha port "-O2 -mieee"
350 cause the c++ compiler to generate buggy code.
353 hack sparc64 gcc 3.3.x -O2 bug
357 file graphics/netpbm/patches/patch-ab
359 sparc64 gcc 3.3.x toolchain bug means we must compile exif.o
363 hack i386 g++ 3.3.x -O2 bug
364 cdate Tue Aug 17 00:59:31 NZST 2004
367 file emulators/palmosemulator/patches/patch-an
369 EmPoint.cpp malfunctions with optimisation on, trashing point
370 coordinates. Apparently an aliasing issue with automatic variables on
371 the stack and some fairly dodgy type casting. The patch file contains
375 hack libtool nawk line length problem
376 cdate Tue Sep 7 01:23:10 UTC 2004
379 file x11/gtk2/Makefile
381 If we're on IRIX and we're using gcc, then, apparently, we need gawk,
382 as otherwise the awk invocation in libtool breaks complaining about
383 the ``Input record [...] too long'' near the end of the build process.
384 Oddly this does not occur using the mipspro compiler. Possible
385 reason: using gcc we have longer CFLAGS. Fix: add USE_GNU_TOOLS+=awk
386 iff IRIX and gcc. Problem: this might affect other packages as well.
387 One might consider depending libtool on gawk for IRIX.
390 hack devel/bison -O* bug with sunpro
391 cdate Tue Nov 2 17:30:48 GMT 2004
394 file devel/bison/Makefile : 1.49
396 bison's quotearg_buffer_restyled() has issues with certain compilers
397 using optimisation flags. The resulting bison with optimsation
398 breaks on at least net/libIDL. BUILDLINK_TRANSFORM -O* away until
399 the root cause can be fixed.
402 hack security/libgpg-error awk on IRIX
403 cdate Sun May 15 18:08:48 EDT 2005
406 file security/libgpg-error/Makefile
408 Apparently, for as of yet undetermined reasons, gawk as built on IRIX
409 under pkgsrc croaks on regular expressions including a combination of
410 alpha- and numerical matches, such as the rather trivial
412 Let's use the system's AWK (ie nawk) for this package to avoid
413 breaking hundreds of dependents.
414 Speculation: somehow the regular expression library used to build gawk
415 conflicts with the systems regular expression library or some such.
416 Note: gawk from SGIs freeware collection depends on expat -- why is
417 that? Does that have anything to do with anything?