summaryrefslogtreecommitdiff
path: root/doc/HACKS
blob: 2ef3463aa454a01192c0244b494bdf88a57176d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
# $NetBSD: HACKS,v 1.5 2003/01/25 02:35:54 hubertf 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	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" <kogule@mars.dti.ne.jp> 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
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