1 # $NetBSD: HACKS,v 1.30 2005/05/15 22:23:09 jschauma 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 audio/libvorbis/Makefile : 1.12 : 20 : 28
124 floor1.c causes Internal compiler error with egcs-2.91.66 19990314
132 file net/djbdns/Makefile : 1.14 :
134 various files go into infinite loop if optimisation enabled in
135 egcs-2.91.66 19990314 (shipped with 1.5.2)
142 file net/ucspi-tcp/Makefile : 1.7 :
144 various files go into infinite loop if optimisation enabled in
145 egcs-2.91.66 19990314 (shipped with 1.5.2)
152 file graphics/tiff/patches/patch-aa : 1.3 : 52 : 58
154 on tif_dirread.c -O[12] causes the compiler to abort
162 file benchmarks/lmbench/patches/patch-aa : 1.2 :
163 file benchmarks/lmbench/Makefile : 1.9 :
165 on certain c files, using -O[1-3] will cause the arm32 cc1 to run
167 reported to GCC people as PR optimization/2391.
173 file x11/xscreensaver/distinfo : 1.2 :
174 file x11/xscreensaver/patches/patch-ab : 1.7 :
176 on distort.c -O[12] causes the compiler to abort
182 file audio/festival/patches/patch-ai : 1.2 :
183 file audio/festival/patches/patch-aj : 1.1 :
184 file audio/festival/patches/patch-ak : 1.1 :
185 file audio/festival/patches/patch-al : 1.1 :
186 file cad/verilog/patches/patch-ad : 1.3 :
187 file cad/verilog-current/patches/patch-ad : 1.3 :
188 file cad/vipec/patches/patch-ac : 1.4 :
189 file emulators/stella/patches/patch-ac : 1.3 : 36 : 43
190 file graphics/kdegraphics/patches/patch-af : 1.5
191 file graphics/xpdf/Makefile : 1.18: 27
192 file graphics/xpdf/patches/patch-aa : 1.3
193 file math/yacas/patches/patch-ac : 1.1.1.1 :
194 file x11/glclock/Makefile : 1.3 : 18 : 20
195 file x11/windowmaker/Makefile : 1.51 : 39 : 42
198 on certain c++ files, using -O[1-3] will cause cc1plus to run
199 forever. On other files, c++ -O[1-3] will cause the assembler to run
200 forever. This problem is noted on pmax and sparc (NetBSD-1.4.*) with
201 gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
203 evidently this problem also exists on arm32.
210 file textproc/jade/patches/patch-aa: 1.1 : 1 : 999
212 jade on mac68k seems to dump core under certain conditions, the
213 patch was sent in by "Kogule, Ryo" <kogule@mars.dti.ne.jp> via
214 tech-pkg. The subject of the thread is "Jade doesn't work"
215 It is suspected that the patch really works around a bug in the
223 Checking in perl5-base/patches/patch-ag: 1.2 : 1 : 999
225 The Xerces-Perl module is implemented as a shared object. It needs
226 some symbols from libgcc.a, such as __eh_alloc. It's not possible
227 to link the xerces-P shared object with libgcc.a, because libgcc.a
228 is not compiled with -fPIC. Hence we need to have the missing
229 symbols in the Perl executable.
230 This hack includes the whole libgcc.a in the Perl executable, and
231 links with c++ so that some mandatory symbols such as __pure_virtual
232 are also included. It should go away with GCC-3.0, or if we make a
236 hack gcc-2.95.3 -O* bug
240 file devel/pth/Makefile : 1.37 : 20 : 22
242 OpenOffice segfaults after some time in the pthread library with a
243 completely thrashed stack. Removing optimization when building
244 pth (-O0) avoids this problem.
247 hack binutils-2.11.2 ld versioned symbols bug
250 file misc/openoffice/patches/patch-dj
251 file misc/openoffice/patches/patch-dk
252 descr Using versioned symbols the special symbol _etext can end up
253 in the shared library with a junk value for the version string
254 instead of "0" for no version. Sometimes it is sufficient to
255 reorder the -l flags on the link line but the general hack is to
256 disable versioned symbols.
262 file security/kth-krb4/Makefile
263 descr This package hangs when compiling one of the files with the
264 compiler that comes with 1.5ZC. The compiler needs to be killed
265 manually - the package is marked as interactive on sparc64 for
273 file net/ucspi-tcp/Makefile : 1.11 :
275 some compilations go into infinite loop if optimisation enabled in
276 gcc-2.95.3 20010315 (release) (NetBSD nb2) as shipped with
277 a releng snapshot (May 31st) of NetBSD-1.6_BETA1. See also abs's
278 entry above. First hang at:
279 ( ( ./compile tryulong32.c && ./load tryulong32 && ./tryulong32 ) \
280 >/dev/null 2>&1 && cat uint32.h2 || cat uint32.h1 ) > uint32.h
287 file net/djbdns/Makefile : 1.19 :
289 various files go into infinite loop if optimisation enabled in
290 gcc-2.95.3 20010315 (release) (NetBSD nb2) as shipped with
291 a releng snapshot (May 31st) of NetBSD-1.6_BETA1. See also abs's
292 entry above. First hang as ucspi-tcp.
299 file emulators/stella/Makefile : 1.5 :
301 Usual arm optimisation problem. The first problem is at:
302 c++ -c -O2 -fno-rtti -I. -I../emucore -I../emucore/m6502/src \
303 -I../emucore/m6502/src/bspf/src -I../ui/x11 -I../ui/sound \
304 -I/usr/X11R6/include -DBSPF_UNIX ../emucore/m6502/src/M6502.cxx
311 file databases/cdb/Makefile : 1.3 :
313 Usual arm optimisation problem. The first problem occurs around
314 ( cat warn-auto.sh; echo exec "`head -1 conf-cc`" '-c ${1+"$@"}' \
319 hack gcc 2.95.3 -O2 bug
323 file x11/openmotif/patches/patch-ap : 1.2 : 209
326 With -O2 optimization, a "if {} else if {} else {}" C statement
327 isn't converted into the correct code.
334 file emulators/simh/Makefile : 1.3 :
336 Usual arm optimisation problem. The first problem occurs around
337 compilation of altairz80
340 hack gcc-sparc64-memorysize
344 file security/skey/patch-aa : 1.2
345 file security/skey/patch-ab : 1.1
347 The SHA1Transform() function causes the sparc64 compiler to use
348 excessive amounts of memory attempting to optimise this function.
349 Using no optimisation allows the function to build.
352 hack ImageMagick arm32+mipsel -O2 bug
354 who hubertf (the mipsel one, dunno who did the arm32 one)
355 port cobald (probably other mipsel's), arm32
356 file graphics/ImageMagick/Makefile : 1.90
358 When compiling with -O2, gcc spins at one file. Going back to
359 -O fixes this. (The usual story...)
366 file archivers/zip/Makefile : 1.33
368 When compiling with -O or -O2, gcc dies with an internal
369 compiler error on crypt.c. Turning off optimization fixes this.
372 hack gcc 2.95.3/arm -O2 bug
376 file devel/ftnchek/Makefile : 1.13
377 descr Internal compiler error for fortran.c when -O2. Use -O1 instead.
380 hack gcc 2.95.3/arm -O* bug
384 file mail/safecat/patches/patch-aa : 1.1
385 descr Compilation of the tryulong32.c configuration test takes ~forever.
388 hack gcc 2.95.3/arm internal error
392 file games/sjeng/Makefile : 1.7
393 descr Internal compiler error when compiling search.c.
396 hack gcc 2.95.3/arm -O* bug
400 file databases/cdb/patches/patch-aa : 1.1
401 descr Compilation of the tryulong32.c configuration test takes ~forever.
404 hack perl 5.8/openssl/sparc64 bug
405 cdate Wed Feb 16 13:24:06 2000
408 file security/openssl/patches/patch-ak
410 Perl's int() function gives bad result on sparc64.
411 Hence openssl's bn_prime.pl perl script fails.
412 Use POSIX::floor() as a workaround.
413 See perl ticket #25249.
416 hack alpha c++ -O2 bug
417 cdate Wed Feb 16 13:24:06 2000
420 file graphics/freetype2/Makefile
423 The default compiler flags on the alpha port "-O2 -mieee"
424 cause the c++ compiler to generate buggy code.
427 hack sparc64 gcc 3.3.x -O2 bug
431 file graphics/netpbm/patches/patch-ab
433 sparc64 gcc 3.3.x toolchain bug means we must compile exif.o
437 hack i386 g++ 3.3.x -O2 bug
438 cdate Tue Aug 17 00:59:31 NZST 2004
441 file emulators/palmosemulator/patches/patch-an
443 EmPoint.cpp malfunctions with optimisation on, trashing point
444 coordinates. Apparently an aliasing issue with automatic variables on
445 the stack and some fairly dodgy type casting. The patch file contains
449 hack libtool nawk line length problem
450 cdate Tue Sep 7 01:23:10 UTC 2004
453 file x11/gtk2/Makefile
455 If we're on IRIX and we're using gcc, then, apparently, we need gawk,
456 as otherwise the awk invocation in libtool breaks complaining about
457 the ``Input record [...] too long'' near the end of the build process.
458 Oddly this does not occur using the mipspro compiler. Possible
459 reason: using gcc we have longer CFLAGS. Fix: add USE_GNU_TOOLS+=awk
460 iff IRIX and gcc. Problem: this might affect other packages as well.
461 One might consider depending libtool on gawk for IRIX.
464 hack devel/bison -O* bug with sunpro
465 cdate Tue Nov 2 17:30:48 GMT 2004
468 file devel/bison/Makefile : 1.49
470 bison's quotearg_buffer_restyled() has issues with certain compilers
471 using optimisation flags. The resulting bison with optimsation
472 breaks on at least net/libIDL. BUILDLINK_TRANSFORM -O* away until
473 the root cause can be fixed.
476 hack security/libgpg-error awk on IRIX
477 cdate Sun May 15 18:08:48 EDT 2005
480 file security/libgpg-error/Makefile
482 Apparently, for as of yet undetermined reasons, gawk as built on IRIX
483 under pkgsrc croaks on regular expressions including a combination of
484 alpha- and numerical matches, such as the rather trivial
486 Let's use the system's AWK (ie nawk) for this package to avoid
487 breaking hundreds of dependents.
488 Speculation: somehow the regular expression library used to build gawk
489 conflicts with the systems regular expression library or some such.
490 Note: gawk from SGIs freeware collection depends on expat -- why is
491 that? Does that have anything to do with anything?