Ticket #3260: mach-o-relocation-limit.patch

File mach-o-relocation-limit.patch, 38.5 KB (added by PHO, 4 years ago)
Line 
11 patch for repository http://darcs.haskell.org/ghc:
2
3Sat May  8 23:24:11 JST 2010  pho@cielonegro.org
4  * Work around for Mach-O relocation limit
5 
6  Mach-O has a limitation on the length of relocation addresses. No
7  segments can be larger than 2^24 - 1 bytes (approx 16 MiB; See
8  /usr/include/mach-o/reloc.h). Static GHCi libraries are merged large
9  objects so they tend to exceed this limit.
10-----BEGIN PGP SIGNED MESSAGE-----
11Hash: SHA1
12
13
14New patches:
15
16[Work around for Mach-O relocation limit
17pho@cielonegro.org**20100508142411
18 Ignore-this: caf94d8f7185c71cc4e1994ebe36015
19 
20 Mach-O has a limitation on the length of relocation addresses. No
21 segments can be larger than 2^24 - 1 bytes (approx 16 MiB; See
22 /usr/include/mach-o/reloc.h). Static GHCi libraries are merged large
23 objects so they tend to exceed this limit.
24] {
25hunk ./rules/build-package-way.mk 108
26 ifneq "$4" "0"
27 BINDIST_LIBS += $$($1_$2_GHCI_LIB)
28 endif
29+
30+ifeq "$$(darwin_HOST_OS)" "1"
31+# Mach-O has a limitation on the length of relocation addresses. No
32+# segments can be larger than 2^24 - 1 bytes (approx 16 MiB; See
33+# /usr/include/mach-o/reloc.h). Static GHCi libraries are merged large
34+# objects so they tend to exceed this limit.
35+$$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS)
36+       "$$(LD)" -r -o $$@ $$(EXTRA_LD_OPTS) $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` $$($1_$2_EXTRA_OBJS) \
37+               || ( echo "Warning: creating dummy $$@" && \
38+                        touch empty.c && \
39+                    "$(CC)" $(SRC_CC_OPTS) $(CONF_CC_OPTS) -c empty.c -o $$@ )
40+else
41 $$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS)
42        "$$(LD)" -r -o $$@ $$(EXTRA_LD_OPTS) $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` $$($1_$2_EXTRA_OBJS)
43hunk ./rules/build-package-way.mk 122
44+endif
45 
46 $(call all-target,$1_$2,$$($1_$2_GHCI_LIB))
47 endif
48}
49
50Context:
51
52[Fix crash in nested callbacks (#4038)
53Simon Marlow <marlowsd@gmail.com>**20100507093222
54 Ignore-this: cade85e361534ce711865a4820276388
55 Broken by "Split part of the Task struct into a separate struct
56 InCall".
57]
58[Add $(GhcDynamic) knob, set to YES to get stage2 linked with -dynamic
59Simon Marlow <marlowsd@gmail.com>**20100428205241
60 Ignore-this: 1db8bccf92099785ecac39aebd27c92d
61 Default currently NO.
62 
63 Validate passed with GhcDynamic=YES on x86/Linux here.
64 
65 The compiler is currently slower on x86 when linked -dynamic,
66 because the GC inner loop has been adversely affected by -fPIC, I'm
67 looking into how to fix it.
68]
69[omit "dyn" from the way appended to the __stginit label
70Simon Marlow <marlowsd@gmail.com>**20100428204914
71 Ignore-this: 14183f3defa9f2bde68fda6729b740bc
72 When GHCi is linked dynamically, we still want to be able to load
73 non-dynamic object files.
74]
75[improvements to findPtr(), a neat hack for browsing the heap in gdb
76Simon Marlow <marlowsd@gmail.com>**20100506115427
77 Ignore-this: ac57785bb3e13b97a5945f753f068738
78]
79[Fix +RTS -G1
80Simon Marlow <marlowsd@gmail.com>**20100506110739
81 Ignore-this: 86a5de39a94d3331a4ee1213f82be497
82]
83[Enable the "redundant specialise pragmas" warning; fixes trac #3855
84Ian Lynagh <igloo@earth.li>**20100506175351]
85[Find the correct external ids when there's a wrapper
86simonpj@microsoft.com**20100506164135
87 Ignore-this: 636266407b174b05b2b8646cc73062c0
88 
89 We were failing to externalise the wrapper id for a function
90 that had one.
91]
92[Add a comment about pattern coercions
93simonpj@microsoft.com**20100506164027
94 Ignore-this: 17428089f3df439f65d892e23e8ed61a
95]
96[Comments only
97simonpj@microsoft.com**20100506163829
98 Ignore-this: 169167b6463873ab173cc5750c5be469
99]
100[Make a missing name in mkUsageInfo into a panic
101simonpj@microsoft.com**20100506163813
102 Ignore-this: b82ff1b8bf89f74f146db7cb5cc4c4d7
103 
104 We really want to know about this!
105]
106[Refactoring of hsXxxBinders
107simonpj@microsoft.com**20100506163737
108 Ignore-this: 97c6667625262b160f9746f7bea1c980
109 
110 This patch moves various functions that extract the binders
111 from a HsTyClDecl, HsForeignDecl etc into HsUtils, and gives
112 them consistent names.
113]
114[Fix Trac #3966: warn about useless UNPACK pragmas
115simonpj@microsoft.com**20100506163337
116 Ignore-this: 5beb24b686eda6113b614dfac8490df1
117 
118 Warning about useless UNPACK pragmas wasn't as easy as I thought.
119 I did quite a bit of refactoring, which improved the code by refining
120 the types somewhat.  In particular notice that in DataCon, we have
121 
122     dcStrictMarks   :: [HsBang]
123     dcRepStrictness :: [StrictnessMarks]
124 
125 The former relates to the *source-code* annotation, the latter to
126 GHC's representation choice.
127]
128[Make tcg_dus behave more sanely; fixes a mkUsageInfo panic
129simonpj@microsoft.com**20100506162719
130 Ignore-this: d000bca15b0e127e297378ded1bfb81b
131 
132 The tcg_dus field used to contain *uses* of type and class decls,
133 but not *defs*.  That was inconsistent, and it really went wrong
134 for Template Haskell bracket.  What happened was that
135  foo = [d| data A = A
136                   f :: A -> A
137                   f x = x |]
138 would find a "use" of A when processing the top level of the module,
139 which in turn led to a mkUsageInfo panic in MkIface.  The cause was
140 the fact that the tcg_dus for the nested quote didn't have defs for
141 A.
142]
143[Add a HsExplicitFlag to SpliceDecl, to improve Trac #4042
144simonpj@microsoft.com**20100506161523
145 Ignore-this: e4e563bac2fd831cc9e94612f5b4fa9d
146 
147 The issue here is that
148 
149     g :: A -> A
150     f
151     data A = A
152 
153 is treated as if you'd written $(f); that is the call of
154 f is a top-level Template Haskell splice.  This patch
155 makes sure that we *first* check the -XTemplateHaskellFlag
156 and bleat about a parse error if it's off.  Othewise we
157 get strange seeing "A is out of scope" errors.
158]
159[Change an assert to a warn
160simonpj@microsoft.com**20100506161111
161 Ignore-this: 739a4fb4c7940376b0f2c8ad52a1966c
162 
163 This is in the constraint simplifier which I'm about
164 to rewrite, so I'm hoping the assert isn't fatal!
165]
166[Tidy up debug print a little
167simonpj@microsoft.com**20100506161027
168 Ignore-this: bd5492878e06bee1cddcbb3fc4df66d8
169]
170[Remove useless UNPACK pragmas
171simonpj@microsoft.com**20100506161012
172 Ignore-this: 3e5ab1a7cf58107034412a798bc214e5
173]
174[Add WARNM2 macro, plus some refactoring
175simonpj@microsoft.com**20100506160808
176 Ignore-this: 2ab4f1f0b5d94be683036e77aec09255
177]
178[Use -Wwarn for the binary package, becuase it has redundant UNPACK pragmas
179simonpj@microsoft.com**20100506160750
180 Ignore-this: cf0d3a11473e28bfce9602e716e69a5f
181]
182[Fix Trac #3966: warn about unused UNPACK pragmas
183simonpj@microsoft.com**20100409201812
184 Ignore-this: c96412596b39c918b5fb9b3c39ce2119
185]
186[Fix Trac #3953: fail earlier when using a bogus quasiquoter
187simonpj@microsoft.com**20100409201748
188 Ignore-this: ef48e39aa932caed538643985234f043
189]
190[Fix Trac #3965: tighten conditions when deriving Data
191simonpj@microsoft.com**20100409184420
192 Ignore-this: 96f7d7d2da11565d26b465d7d0497ac9
193 
194 It's tricky to set up the context for a Data instance.  I got it wrong
195 once, and fixed it -- hence the "extra_constraints" in
196 TcDeriv.inferConstraints. 
197 
198 But it still wasn't right!  The tricky bit is that dataCast1 is only
199 generated when T :: *->*, and dataCast2 when T :: *->*->*. (See
200 the code in TcGenDeriv for dataCastX.
201]
202[Fix Trac #3964: view patterns in DsArrows
203simonpj@microsoft.com**20100409165557
204 Ignore-this: d823c182831d5e2e592e995b16180e2f
205 
206 Just a missing case; I've eliminated the catch-all so
207 that we get a warning next time we extend HsPat
208]
209[Fix Trac #3955: renamer and type variables
210simonpj@microsoft.com**20100409163710
211 Ignore-this: bd5ec64d76c0f583bf5f224792bf294c
212 
213 The renamer wasn't computing the free variables of a type declaration
214 properly.  This patch refactors a bit, and makes it more robust,
215 fixing #3955 and several other closely-related bugs.  (We were
216 omitting some free variables and that could just possibly lead to a
217 usage-version tracking error.
218]
219[Layout only
220simonpj@microsoft.com**20100409163506
221 Ignore-this: 1f14990b5aa0b9821b84452fb34e9f41
222]
223[Give a better deprecated message for INCLUDE pragmas; fixes #3933
224Ian Lynagh <igloo@earth.li>**20100506130910
225 We now have a DeprecatedFullText constructor, so we can override the
226 "-#include is deprecated: " part of the warning.
227]
228[De-haddock a comment that confuses haddock
229Ian Lynagh <igloo@earth.li>**20100506123607]
230[Fix comment to not confuse haddock
231Ian Lynagh <igloo@earth.li>**20100506113642]
232[Detect EOF when trying to parse a string in hp2ps
233Ian Lynagh <igloo@earth.li>**20100506000830]
234[Make the demand analyser sdd demands for strict constructors
235simonpj@microsoft.com**20100505200936
236 Ignore-this: eb32632adbc354eb7a5cf884c263e0d3
237 
238 This opportunity was spotted by Roman, and is documented in
239 Note [Add demands for strict constructors] in DmdAnal.
240]
241[Fix interaction of exprIsCheap and the lone-variable inlining check
242simonpj@microsoft.com**20100505200723
243 Ignore-this: f3cb65085c5673a99153d5d7b6559ab1
244 
245 See Note [Interaction of exprIsCheap and lone variables] in CoreUnfold
246 
247 This buglet meant that a nullary definition with an INLINE pragma
248 counter-intuitively didn't get inlined at all.  Roman identified
249 the bug.
250]
251[Matching cases in SpecConstr and Rules
252simonpj@microsoft.com**20100505200543
253 Ignore-this: f5c28c780fbf8badce84c6fdc9aa1779
254 
255 This patch has zero effect.  It includes comments,
256 a bit of refactoring, and a tiny bit of commment-out
257 code go implement the "matching cases" idea below.
258 
259 In the end I've left it disabled because while I think
260 it does no harm I don't think it'll do any good either.
261 But I didn't want to lose the idea totally. There's
262 a thread called "Storable and constant memory" on
263 the libraries@haskell.org list (Apr 2010) about it.
264 
265 Note [Matching cases]
266 ~~~~~~~~~~~~~~~~~~~~~
267 {- NOTE: This idea is currently disabled.  It really only works if
268          the primops involved are OkForSpeculation, and, since
269         they have side effects readIntOfAddr and touch are not.
270         Maybe we'll get back to this later .  -}
271   
272 Consider
273    f (case readIntOffAddr# p# i# realWorld# of { (# s#, n# #) ->
274       case touch# fp s# of { _ ->
275       I# n# } } )
276 This happened in a tight loop generated by stream fusion that
277 Roman encountered.  We'd like to treat this just like the let
278 case, because the primops concerned are ok-for-speculation.
279 That is, we'd like to behave as if it had been
280    case readIntOffAddr# p# i# realWorld# of { (# s#, n# #) ->
281    case touch# fp s# of { _ ->
282    f (I# n# } } )
283]
284[Comments only
285simonpj@microsoft.com**20100504163629
286 Ignore-this: 3be12df04714aa820bce706b5dc8a9cb
287]
288[Comments only
289simonpj@microsoft.com**20100504163529
290 Ignore-this: 791e2fd39c7d880ce1dc80ebdf3a5398
291]
292[Comments only
293simonpj@microsoft.com**20100504163457
294 Ignore-this: f19e9ffeb3d65770b1595bca5f97a59d
295]
296[Comments only (about type families)
297simonpj@microsoft.com**20100417145032
298 Ignore-this: dd39425ef2155d52dbf55a4d5fd97cb8
299]
300[Fix hp2ps when the .hp file has large string literals
301Ian Lynagh <igloo@earth.li>**20100505191921]
302[In build system, call package-config after including package data
303Ian Lynagh <igloo@earth.li>**20100504225035
304 Otherwise the $1_$2_HC_OPTS variable gets clobbered.
305]
306[runghc: flush stdout/stderr on an exception (#3890)
307Simon Marlow <marlowsd@gmail.com>**20100505133848
308 Ignore-this: 224c1898cec64cb1c94e0d7033e7590e
309]
310[Remove the Unicode alternative for ".." (#3894)
311Simon Marlow <marlowsd@gmail.com>**20100505121202
312 Ignore-this: 2452cd67281667106f9169747b6d784f
313]
314[tidyup; no functional changes
315Simon Marlow <marlowsd@gmail.com>**20100505115015
316 Ignore-this: d0787e5cdeef1dee628682fa0a46019
317]
318[Make the running_finalizers flag task-local
319Simon Marlow <marlowsd@gmail.com>**20100505114947
320 Ignore-this: 345925d00f1dca203941b3c5d84c90e1
321 Fixes a bug reported by Lennart Augustsson, whereby we could get an
322 incorrect error from the RTS about re-entry from a finalizer,
323]
324[add a MAYBE_GC() in killThread#, fixes throwto003(threaded2) looping
325Simon Marlow <marlowsd@gmail.com>**20100505114746
326 Ignore-this: efea04991d6feed04683a42232fc85da
327]
328[Allow filepath-1.2.*
329Simon Marlow <marlowsd@gmail.com>**20100505101139
330 Ignore-this: 1b5580cd9cd041ec48f40cd37603326a
331]
332[BlockedOnMsgThrowTo is possible in resurrectThreads (#4030)
333Simon Marlow <marlowsd@gmail.com>**20100505094534
334 Ignore-this: ac24a22f95ffeaf480187a1620fdddb2
335]
336[Don't raise a throwTo when the target is masking and BlockedOnBlackHole
337Simon Marlow <marlowsd@gmail.com>**20100505094506
338 Ignore-this: 302616931f61667030d77ddfbb02374e
339]
340[Fix build with GHC 6.10
341Ian Lynagh <igloo@earth.li>**20100504180302
342 In GHC 6.10, intersectionWith is (a -> b -> a) instead of (a -> b -> c),
343 so we need to jump through some hoops to get the more general type.
344]
345[The libffi patches are no longer needed
346Ian Lynagh <igloo@earth.li>**20100504171603]
347[Use the in-tree windres; fixes trac #4032
348Ian Lynagh <igloo@earth.li>**20100504170941]
349[Print unfoldings on lambda-bound variables
350Simon PJ <simonpj@microsoft.com>**20100503181822
351 Ignore-this: 2fd5a7502cc6273d96258e0914f0f8cd
352 
353 ...in the unusual case where they have one;
354 see Note [Case binders and join points] in Simplify.lhs
355]
356[Replace FiniteMap and UniqFM with counterparts from containers.
357Milan Straka <fox@ucw.cz>**20100503171315
358 Ignore-this: a021972239163dbf728284b19928cebb
359 
360 The original interfaces are kept. There is small performance improvement:
361 - when compiling for five nofib, we get following speedups:
362     Average                -----           -2.5%
363     Average                -----           -0.6%
364     Average                -----           -0.5%
365     Average                -----           -5.5%
366     Average                -----          -10.3%
367 - when compiling HPC ten times, we get:
368     switches                          oldmaps   newmaps
369     -O -fasm                          117.402s  116.081s (98.87%)
370     -O -fasm -fregs-graph             119.993s  118.735s (98.95%)
371     -O -fasm -fregs-iterative         120.191s  118.607s (98.68%)
372]
373[Make the demand analyser take account of lambda-bound unfoldings
374Simon PJ <simonpj@microsoft.com>**20100503151630
375 Ignore-this: 2ee8e27d4df2debfc79e6b8a17c32bc1
376 
377 This is a long-standing lurking bug. See Note [Lamba-bound unfoldings]
378 in DmdAnal.
379 
380 I'm still not really happy with this lambda-bound-unfolding stuff.
381]
382[Fix dynamic libs on OS X, and enable them by default
383Ian Lynagh <igloo@earth.li>**20100503150302]
384[Switch back to using bytestring from the darcs repo; partially fixes #3855
385Ian Lynagh <igloo@earth.li>**20100502113458]
386[Fix some cpp warnings when building on FreeBSD; patch from Gabor PALI
387Ian Lynagh <igloo@earth.li>**20100428150700]
388[Fix "make 2"
389Ian Lynagh <igloo@earth.li>**20100427162212
390 The new Makefile logic was enabling the stage 1 rules when stage=2,
391 so "make 2" was rebuilding stage 1.
392]
393[Inplace programs depend on their shell wrappers
394Ian Lynagh <igloo@earth.li>**20100427160038]
395[--make is now the default (#3515), and -fno-code works with --make (#3783)
396Simon Marlow <marlowsd@gmail.com>**20100427122851
397 Ignore-this: 33330474fa4703f32bf9997462b4bf3c
398 If the command line contains any Haskell source files, then we behave
399 as if --make had been given.
400 
401 The meaning of the -c flag has changed (back): -c now selects one-shot
402 compilation, but stops before linking.  However, to retain backwards
403 compatibility, -c is still allowed with --make, and means the same as
404 --make -no-link.  The -no-link flag has been un-deprecated.
405 
406 -fno-code is now allowed with --make (#3783); the fact that it was
407 disabled before was largely accidental, it seems.  We also had some
408 regressions in this area: it seems that -fno-code was causing a .hc
409 file to be emitted in certain cases.  I've tidied up the code, there
410 was no need for -fno-code to be a "mode" flag, as far as I can tell.
411 
412 -fno-code does not emit interface files, nor does it do recompilation
413 checking, as suggested in #3783.  This would make Haddock emit
414 interface files, for example, and I'm fairly sure we don't want to do
415 that.  Compiling with -fno-code is pretty quick anyway, perhaps we can
416 get away without recompilation checking.
417]
418[remove duplicate docs for -e in --help output (#4010)
419Simon Marlow <marlowsd@gmail.com>**20100426140642
420 Ignore-this: 187ff893ba8ffa0ec127867a7590e38d
421]
422[workaround for #4003, fixes HEAD build with 6.12.2
423Simon Marlow <marlowsd@gmail.com>**20100426103428
424 Ignore-this: c4bc445dc8052d4e6efef3f1daf63562
425]
426[Make sure all the clean rules are always included
427Ian Lynagh <igloo@earth.li>**20100424181823
428 In particular, this fixes a problem where stage3 bits weren't being cleaned
429]
430[Correct the name of the amd64/FreeBSD platform in PlatformSupportsSharedLibs
431Ian Lynagh <igloo@earth.li>**20100424132830
432 We weren't getting sharedlibs on amd64/FreeBSD because of this
433]
434[Include DPH docs in bindists
435Ian Lynagh <igloo@earth.li>**20100424123101]
436[reinstate eta-expansion during SimplGently, to fix inlining of sequence_
437Simon Marlow <marlowsd@gmail.com>**20100423124853
438 Ignore-this: 4fa0fd5bafe0d6b58fc81076f50d5f8d
439]
440[fix 64-bit value for W_SHIFT, which thankfully appears to be not used
441Simon Marlow <marlowsd@gmail.com>**20100422213605
442 Ignore-this: 525c062d2456c224ec8d0e083edd3b55
443]
444[Add missing constant folding and optimisation for unsigned division
445Simon Marlow <marlowsd@gmail.com>**20100422213443
446 Ignore-this: fb10d1cda0852fab0cbcb47247498fb3
447 Noticed by Denys Rtveliashvili <rtvd@mac.com>, see #4004
448]
449[Fix the GHC API link in the main doc index.html
450Ian Lynagh <igloo@earth.li>**20100422213226]
451[Give the right exit code in darcs-all
452Ian Lynagh <igloo@earth.li>**20100421171339
453 Our END block was calling system, which alters $?. So now we save and
454 restore it.
455]
456[Use StgWord64 instead of ullong
457Ian Lynagh <igloo@earth.li>**20100421162336
458 This patch also fixes ullong_format_string (renamed to showStgWord64)
459 so that it works with values outside the 32bit range (trac #3979), and
460 simplifies the without-commas case.
461]
462[Implement try10Times in Makefile
463Ian Lynagh <igloo@earth.li>**20100420165909
464 Avoid using seq, as FreeBSD has jot instead.
465]
466[Fix crash in non-threaded RTS on Windows
467Simon Marlow <marlowsd@gmail.com>**20100420122125
468 Ignore-this: 28b0255a914a8955dce02d89a7dfaca
469 The tso->block_info field is now overwritten by pushOnRunQueue(), but
470 stg_block_async_info was assuming that it still held a pointer to the
471 StgAsyncIOResult.  We must therefore save this value somewhere safe
472 before putting the TSO on the run queue.
473]
474[Expand the scope of the event_buf_mutex to cover io_manager_event
475Simon Marlow <marlowsd@gmail.com>**20100420122026
476 Ignore-this: 185a6d84f7d4a35997f10803f6dacef1
477 I once saw a failure that I think was due to a race on
478 io_manager_event, this should fix it.
479]
480[Flags -auto and -auto-all operate only on functions not marked INLINE.
481Milan Straka <fox@ucw.cz>**20100331191050
482 Ignore-this: 3b63580cfcb3c33d62ad697c36d94d05
483]
484[Spelling correction for LANGUAGE pragmas
485Max Bolingbroke <batterseapower@hotmail.com>**20100413192825
486 Ignore-this: 311b51ba8d43f6c7fd32f48db9a88dee
487]
488[Update the user guide so it talks about the newer "do rec" notation everywhere
489Ian Lynagh <igloo@earth.li>**20100416205416
490 Some of the problems highlighted in trac #3968.
491]
492[Fix typo
493Ian Lynagh <igloo@earth.li>**20100416205412]
494[Fix Trac #3950: unifying types of different kinds
495simonpj@microsoft.com**20100412151845
496 Ignore-this: d145b9de5ced136ef2c39f3ea4a04f4a
497 
498 I was assuming that the unifer only unified types of the
499 same kind, but now we can "defer" unsolved constraints that
500 invariant no longer holds.  Or at least is's more complicated
501 to ensure. 
502 
503 This patch takes the path of not assuming the invariant, which
504 is simpler and more robust.  See
505 Note [Mismatched type lists and application decomposition]
506]
507[Fix Trac #3943: incorrect unused-variable warning
508simonpj@microsoft.com**20100412151630
509 Ignore-this: 52459f2b8b02c3cb120abe674dc9a060
510 
511 In fixing this I did the usual little bit of refactoring
512]
513[Convert boot and boot-pkgs to perl
514Ian Lynagh <igloo@earth.li>**20100415143919
515 This stops us having to worry about sh/sed/... portability.
516]
517[Use $(MAKE), not make, when recursively calling make
518Ian Lynagh <igloo@earth.li>**20100415121453]
519[Remove the ghc_ge_609 makefile variables
520Ian Lynagh <igloo@earth.li>**20100412235658
521 They are now guaranteed to be YES
522]
523[Increase the minimum version number required to 6.10 in configure.ac
524Ian Lynagh <igloo@earth.li>**20100412235313]
525[The bootstrapping compiler is now required to be > 609
526Ian Lynagh <igloo@earth.li>**20100409161046]
527[Handle IND_STATIC in isRetainer
528Ian Lynagh <igloo@earth.li>**20100409104207
529 IND_STATIC used to be an error, but at the moment it can happen
530 as isAlive doesn't look through IND_STATIC as it ignores static
531 closures. See trac #3956 for a program that hit this error.
532]
533[Add Data and Typeable instances to HsSyn
534David Waern <david.waern@gmail.com>**20100330011020
535 Ignore-this: c3f2717207b15539fea267c36b686e6a
536 
537 The instances (and deriving declarations) have been taken from the ghc-syb
538 package.
539]
540[Fix for derefing ThreadRelocated TSOs in MVar operations
541Simon Marlow <marlowsd@gmail.com>**20100407092824
542 Ignore-this: 94dd7c68a6094eda667e2375921a8b78
543]
544[sanity check fix
545Simon Marlow <marlowsd@gmail.com>**20100407092746
546 Ignore-this: 9c18cd5f5393e5049015ca52e62a1269
547]
548[get the reg liveness right in the putMVar# heap check
549Simon Marlow <marlowsd@gmail.com>**20100407092724
550 Ignore-this: b1ba07a59ecfae00e9a1f8391741abc
551]
552[initialise the headers of MSG_BLACKHOLE objects properly
553Simon Marlow <marlowsd@gmail.com>**20100407081712
554 Ignore-this: 183dcd0ca6a395d08db2be12b02bdd79
555]
556[initialise the headers of MVAR_TSO_QUEUE objects properly
557Simon Marlow <marlowsd@gmail.com>**20100407081514
558 Ignore-this: 4b4a2f30cf2fb69ca4128c41744687bb
559]
560[undo debugging code
561Simon Marlow <marlowsd@gmail.com>**20100406142740
562 Ignore-this: 323c2248f817b6717c19180482fc4b00
563]
564[putMVar#: fix reg liveness in the heap check
565Simon Marlow <marlowsd@gmail.com>**20100406135832
566 Ignore-this: cddd2c7807ac7612c9b2c4c0d384d284
567]
568[account for the new BLACKHOLEs in the GHCi debugger
569Simon Marlow <marlowsd@gmail.com>**20100406133406
570 Ignore-this: 4d4aeb4bbada3f50dc1fb0123f565e8f
571]
572[don't forget to deRefTSO() in tryWakeupThread()
573Simon Marlow <marlowsd@gmail.com>**20100406130411
574 Ignore-this: 171d57c4f8653835dec0b69f9be9881c
575]
576[Fix bug in popRunQueue
577Simon Marlow <marlowsd@gmail.com>**20100406091453
578 Ignore-this: 9d3cec8f18f5c5cbd51751797386eb6f
579]
580[fix bug in migrateThread()
581Simon Marlow <marlowsd@gmail.com>**20100401105840
582 Ignore-this: 299bcf0d1ea0f8865f3e845eb93d2ad3
583]
584[Remove the IND_OLDGEN and IND_OLDGEN_PERM closure types
585Simon Marlow <marlowsd@gmail.com>**20100401093519
586 Ignore-this: 95f2480c8a45139835eaf5610217780b
587 These are no longer used: once upon a time they used to have different
588 layout from IND and IND_PERM respectively, but that is no longer the
589 case since we changed the remembered set to be an array of addresses
590 instead of a linked list of closures.
591]
592[Change the representation of the MVar blocked queue
593Simon Marlow <marlowsd@gmail.com>**20100401091605
594 Ignore-this: 20a35bfabacef2674df362905d7834fa
595 
596 The list of threads blocked on an MVar is now represented as a list of
597 separately allocated objects rather than being linked through the TSOs
598 themselves.  This lets us remove a TSO from the list in O(1) time
599 rather than O(n) time, by marking the list object.  Removing this
600 linear component fixes some pathalogical performance cases where many
601 threads were blocked on an MVar and became unreachable simultaneously
602 (nofib/smp/threads007), or when sending an asynchronous exception to a
603 TSO in a long list of thread blocked on an MVar.
604 
605 MVar performance has actually improved by a few percent as a result of
606 this change, slightly to my surprise.
607 
608 This is the final cleanup in the sequence, which let me remove the old
609 way of waking up threads (unblockOne(), MSG_WAKEUP) in favour of the
610 new way (tryWakeupThread and MSG_TRY_WAKEUP, which is idempotent).  It
611 is now the case that only the Capability that owns a TSO may modify
612 its state (well, almost), and this simplifies various things.  More of
613 the RTS is based on message-passing between Capabilities now.
614]
615[eliminate some duplication with a bit of CPP
616Simon Marlow <marlowsd@gmail.com>**20100330154355
617 Ignore-this: 838f7d341f096ca14c86ab9c81193e36
618]
619[Make ioManagerDie() idempotent
620Simon Marlow <marlowsd@gmail.com>**20100401100705
621 Ignore-this: a5996b43cdb2e2d72e6e971d7ea925fb
622 Avoids screeds of "event buffer overflowed; event dropped" in
623 conc059(threaded1).
624]
625[Move a thread to the front of the run queue when another thread blocks on it
626Simon Marlow <marlowsd@gmail.com>**20100329144521
627 Ignore-this: c518ff0d41154680edc811d891826a29
628 This fixes #3838, and was made possible by the new BLACKHOLE
629 infrastructure.  To allow reording of the run queue I had to make it
630 doubly-linked, which entails some extra trickiness with regard to
631 GC write barriers and suchlike.
632]
633[remove non-existent MUT_CONS symbols
634Simon Marlow <marlowsd@gmail.com>**20100330152600
635 Ignore-this: 885628257a9d03f2ece2a754d993014a
636]
637[change throwTo to use tryWakeupThread rather than unblockOne
638Simon Marlow <marlowsd@gmail.com>**20100329144613
639 Ignore-this: 10ad4965e6c940db71253f1c72218bbb
640]
641[tiny GC optimisation
642Simon Marlow <marlowsd@gmail.com>**20100329144551
643 Ignore-this: 9e095b9b73fff0aae726f9937846ba92
644]
645[New implementation of BLACKHOLEs
646Simon Marlow <marlowsd@gmail.com>**20100329144456
647 Ignore-this: 96cd26793b4e6ab9ddd0d59aae5c2f1d
648 
649 This replaces the global blackhole_queue with a clever scheme that
650 enables us to queue up blocked threads on the closure that they are
651 blocked on, while still avoiding atomic instructions in the common
652 case.
653 
654 Advantages:
655 
656  - gets rid of a locked global data structure and some tricky GC code
657    (replacing it with some per-thread data structures and different
658    tricky GC code :)
659 
660  - wakeups are more prompt: parallel/concurrent performance should
661    benefit.  I haven't seen anything dramatic in the parallel
662    benchmarks so far, but a couple of threading benchmarks do improve
663    a bit.
664 
665  - waking up a thread blocked on a blackhole is now O(1) (e.g. if
666    it is the target of throwTo).
667 
668  - less sharing and better separation of Capabilities: communication
669    is done with messages, the data structures are strictly owned by a
670    Capability and cannot be modified except by sending messages.
671 
672  - this change will utlimately enable us to do more intelligent
673    scheduling when threads block on each other.  This is what started
674    off the whole thing, but it isn't done yet (#3838).
675 
676 I'll be documenting all this on the wiki in due course.
677 
678]
679[Fix warnings (allow pushOnRunQueue() to not be inlined)
680Simon Marlow <marlowsd@gmail.com>**20100401114559
681 Ignore-this: f40bfbfad70a5165a946d11371605b7d
682]
683[remove out of date comment
684Simon Marlow <marlowsd@gmail.com>**20100401105853
685 Ignore-this: 26af88dd418ee0bcda7223b3b7e4e8d2
686]
687[tidy up spacing in stderr traces
688Simon Marlow <marlowsd@gmail.com>**20100326163122
689 Ignore-this: 16558b0433a274be217d4bf39aa4946
690]
691[Fix an assertion that was not safe when running in parallel
692Simon Marlow <marlowsd@gmail.com>**20100325143656
693 Ignore-this: cad08fb8900eb3a475547af0189fcc47
694]
695[Never jump directly to a thunk's entry code, even if it is single-entry
696Simon Marlow <marlowsd@gmail.com>**20100325114847
697 Ignore-this: 938da172c06a97762ef605c8fccfedf1
698 I don't think this fixes any bugs as we don't have single-entry thunks
699 at the moment, but it could cause problems for parallel execution if
700 we ever did re-introduce update avoidance.
701]
702[Rename forgotten -dverbose-simpl to -dverbose-core2core in the docs.
703Milan Straka <fox@ucw.cz>**20100331153626
704 Ignore-this: 2da58477fb96e1cfb80f37dddd7c422c
705]
706[Add -pa and -V to the documentation of time profiling options.
707Milan Straka <fox@ucw.cz>**20100329191121
708 Ignore-this: be74d216481ec5a19e5f40f85e6e3d65
709]
710[Keep gcc 4.5 happy
711Simon Marlow <marlowsd@gmail.com>**20100330120425
712 Ignore-this: 7811878cc2bd1ce9cfbb5bf102fe3454
713]
714[Fix warning compiling Linker.c for PPC Mac
715naur@post11.tele.dk**20100403182355
716 Ignore-this: e2d2448770c9714ce17dd6cf3e297063
717 The warning message eliminated is:
718 > rts/Linker.c:4756:0:
719 >      warning: nested extern declaration of 'symbolsWithoutUnderscore'
720]
721[Fix error compiling AsmCodeGen.lhs for PPC Mac (mkRtsCodeLabel)
722naur@post11.tele.dk**20100403181656
723 Ignore-this: deb7524ea7852a15a2ac0849c8c82f74
724 The error messages eliminated are:
725 > compiler/nativeGen/AsmCodeGen.lhs:875:31:
726 >     Not in scope: `mkRtsCodeLabel'
727 > compiler/nativeGen/AsmCodeGen.lhs:879:31:
728 >     Not in scope: `mkRtsCodeLabel'
729 > compiler/nativeGen/AsmCodeGen.lhs:883:31:
730 >     Not in scope: `mkRtsCodeLabel'
731]
732[Fix error compiling AsmCodeGen.lhs for PPC Mac (DestBlockId)
733naur@post11.tele.dk**20100403180643
734 Ignore-this: 71e833e94ed8371b2ffabc2cf80bf585
735 The error message eliminated is:
736 > compiler/nativeGen/AsmCodeGen.lhs:637:16:
737 >     Not in scope: data constructor `DestBlockId'
738]
739[Fix boot-pkgs's sed usage to work with Solaris's sed
740Ian Lynagh <igloo@earth.li>**20100401153441]
741[Pass "-i org.haskell.GHC" to packagemaker when building the OS X installer
742Ian Lynagh <igloo@earth.li>**20100331144707
743 This seems to fix this failure:
744 [...]
745 ** BUILD SUCCEEDED **
746 rm -f -f GHC-system.pmdoc/*-contents.xml
747 /Developer/usr/bin/packagemaker -v --doc GHC-system.pmdoc\
748              -o /Users/ian/to_release/ghc-6.12.1.20100330/GHC-6.12.1.20100330-i386.pkg
749 2010-03-31 15:08:15.695 packagemaker[13909:807] Setting to : 0 (null)
750 2010-03-31 15:08:15.709 packagemaker[13909:807] Setting to : 0 org.haskell.glasgowHaskellCompiler.ghc.pkg
751 2010-03-31 15:08:15.739 packagemaker[13909:807] relocate: (null) 0
752 2010-03-31 15:08:15.740 packagemaker[13909:807] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSXMLDocument initWithXMLString:options:error:]: nil argument'
753 2010-03-31 15:08:15.741 packagemaker[13909:807] Stack: (
754     2511962091,
755     2447007291,
756     2511961547,
757     2511961610,
758     2432803204,
759     453371,
760     447720,
761     436209,
762     435510,
763     9986,
764     9918
765 )
766 make[1]: *** [framework-pkg] Trace/BPT trap
767 make: *** [framework-pkg] Error 2
768]
769[Use machdepCCOpts when compiling the file to toggle -(no-)rtsopts
770Ian Lynagh <igloo@earth.li>**20100331161302
771 Should fix toggling on OS X "Snow Leopard". Diagnosed by Roman Leshchinskiy.
772]
773[Avoid a non-portable use of tar reported by Roman Leshchinskiy
774Ian Lynagh <igloo@earth.li>**20100330145802]
775[Don't install EXTRA_PACKAGES by default
776Simon Marlow <marlowsd@gmail.com>**20100330142714
777 Ignore-this: d4cc8f87a6de8d9d1d6dc9b77130b3
778]
779[fix a non-portable printf format
780Simon Marlow <marlowsd@gmail.com>**20100330134437
781 Ignore-this: d41c23c54ec29654cb2049de1e588570
782]
783[avoid single quote in #error
784Simon Marlow <marlowsd@gmail.com>**20100330120346
785 Ignore-this: 663f39e7a27fead2f648fbf22d345bb4
786]
787[use FMT_Word64 instead of locally-defined version
788Simon Marlow <marlowsd@gmail.com>**20100330114650
789 Ignore-this: 82697b8095dffb3a8e196c687006ece0
790]
791[remove old/unused DotnetSupport and GhcLibsWithUnix
792Simon Marlow <marlowsd@gmail.com>**20100330123732
793 Ignore-this: c68814868b3671abdc369105bbeafe6c
794]
795[fix return type cast in f.i.wrapper when using libffi (#3516)
796Simon Marlow <marlowsd@gmail.com>**20100329154220
797 Ignore-this: f898eb8c9ae2ca2009e539735b92c438
798 
799 Original fix submitted by
800   Sergei Trofimovich <slyfox@community.haskell.org>
801 modified by me:
802  - exclude 64-bit types
803  - compare uniques, not strings
804  - #include "ffi.h" is conditional
805]
806[libffi: install 'ffitarget.h' header as sole 'ffi.h' is unusable
807Simon Marlow <marlowsd@gmail.com>**20100329135734
808 Ignore-this: f9b555ea289d8df1aa22cb6faa219a39
809 Submitted by: Sergei Trofimovich <slyfox@community.haskell.org>
810 Re-recorded against HEAD.
811]
812[avoid a fork deadlock (see comments)
813Simon Marlow <marlowsd@gmail.com>**20100329132329
814 Ignore-this: 3377f88b83bb3b21e42d7fc5f0d866f
815]
816[tidy up the end of the all_tasks list after forking
817Simon Marlow <marlowsd@gmail.com>**20100329132253
818 Ignore-this: 819d679875be5f344e816210274d1c29
819]
820[Add a 'setKeepCAFs' external function (#3900)
821Simon Marlow <marlowsd@gmail.com>**20100329110036
822 Ignore-this: ec532a18cad4259a09847b0b9ae2e1d2
823]
824[Explicitly check whether ar supports the @file syntax
825Ian Lynagh <igloo@earth.li>**20100329123325
826 rather than assuming that all GNU ar's do.
827 Apparently OpenBSD's older version doesn't.
828]
829[Fix the format specifier for Int64/Word64 on Windows
830Ian Lynagh <igloo@earth.li>**20100327182126
831 mingw doesn't understand %llu/%lld - it treats them as 32-bit rather
832 than 64-bit. We use %I64u/%I64d instead.
833]
834[Fix the ghci startmenu item
835Ian Lynagh <igloo@earth.li>**20100326235934
836 I'm not sure what changed, but it now doesn't work for me without
837 the "Start in" field being set.
838]
839[Fix paths to docs in "Start Menu" entries in Windows installer; fixes #3847
840Ian Lynagh <igloo@earth.li>**20100326155917]
841[Add a licence file for the Windows installer to use
842Ian Lynagh <igloo@earth.li>**20100326155130]
843[Add gcc-g++ to the inplace mingw installation; fixes #3893
844Ian Lynagh <igloo@earth.li>**20100326154714]
845[Add the licence file to the Windows installer. Fixes #3934
846Ian Lynagh <igloo@earth.li>**20100326152449]
847[Quote the paths to alex and happy in configure
848Ian Lynagh <igloo@earth.li>**20100325143449
849 Ignore-this: d6d6e1a250f88985bbeea760e63a79db
850]
851[Use </> rather than ++ "/"
852Ian Lynagh <igloo@earth.li>**20100325133237
853 This stops us generating paths like
854     c:\foo\/ghc460_0/ghc460_0.o
855 which windres doesn't understand.
856]
857[Append $(exeext) to utils/ghc-pkg_dist_PROG
858Ian Lynagh <igloo@earth.li>**20100324233447
859 Fixes bindist creation
860]
861[A sanity check
862Simon Marlow <marlowsd@gmail.com>**20100325110500
863 Ignore-this: 3b3b76d898c822456857e506b7531e65
864]
865[do_checks: do not set HpAlloc if the stack check fails
866Simon Marlow <marlowsd@gmail.com>**20100325110328
867 Ignore-this: 899ac8c29ca975d03952dbf4608d758
868 
869 This fixes a very rare heap corruption bug, whereby
870 
871  - a context switch is requested, which sets HpLim to zero
872    (contextSwitchCapability(), called by the timer signal or
873    another Capability).
874 
875  - simultaneously a stack check fails, in a code fragment that has
876    both a stack and a heap check.
877 
878 The RTS then assumes that a heap-check failure has occurred and
879 subtracts HpAlloc from Hp, although in fact it was a stack-check
880 failure and retreating Hp will overwrite valid heap objects.  The bug
881 is that HpAlloc should only be set when Hp has been incremented by the
882 heap check.  See comments in rts/HeapStackCheck.cmm for more details.
883 
884 This bug is probably incredibly rare in practice, but I happened to be
885 working on a test that triggers it reliably:
886 concurrent/should_run/throwto001, compiled with -O -threaded, args 30
887 300 +RTS -N2, run repeatedly in a loop.
888]
889[comments and formatting only
890Simon Marlow <marlowsd@gmail.com>**20100325104617
891 Ignore-this: c0a211e15b5953bb4a84771bcddd1d06
892]
893[Change how perl scripts get installed; partially fixes #3863
894Ian Lynagh <igloo@earth.li>**20100324171422
895 We now regenerate them when installing, which means the path for perl
896 doesn't get baked in
897]
898[Pass the location of gcc in the ghc wrapper script; partially fixes #3863
899Ian Lynagh <igloo@earth.li>**20100324171408
900 This means we don't rely on baking a path to gcc into the executable
901]
902[Quote the ar path in configure
903Ian Lynagh <igloo@earth.li>**20100324162043]
904[Remove unused cUSER_WAY_NAMES cUSER_WAY_OPTS
905Ian Lynagh <igloo@earth.li>**20100324145048]
906[Remove unused cCONTEXT_DIFF
907Ian Lynagh <igloo@earth.li>**20100324145013]
908[Remove unused cEnableWin32DLLs
909Ian Lynagh <igloo@earth.li>**20100324144841]
910[Remove unused cGHC_CP
911Ian Lynagh <igloo@earth.li>**20100324144656]
912[Fix the build for non-GNU-ar
913Ian Lynagh <igloo@earth.li>**20100324132907]
914[Tweak the Makefile code for making .a libs; fixes trac #3642
915Ian Lynagh <igloo@earth.li>**20100323221325
916 The main change is that, rather than using "xargs ar" we now put
917 all the filenames into a file, and do "ar @file". This means that
918 ar adds all the files at once, which works around a problem where
919 files with the same basename in a later invocation were overwriting
920 the existing file in the .a archive.
921]
922[Enable shared libraries on Windows; fixes trac #3879
923Ian Lynagh <igloo@earth.li>**20100320231414
924 Ignore-this: c93b35ec5b7a7fa6ddb286d17a616216
925]
926[Add the external core PDF to the new build system
927Ian Lynagh <igloo@earth.li>**20100321161909]
928[Allow specifying $threads directly when validating
929Ian Lynagh <igloo@earth.li>**20100321112835]
930[Remove LazyUniqFM; fixes trac #3880
931Ian Lynagh <igloo@earth.li>**20100320213837]
932[UNDO: slight improvement to scavenging ...
933Simon Marlow <marlowsd@gmail.com>**20100319153413
934 Ignore-this: f0ab581c07361f7b57eae02dd6ec893c
935 
936 Accidnetally pushed this patch which, while it validates, isn't
937 correct.
938 
939 rolling back:
940 
941 Fri Mar 19 11:21:27 GMT 2010  Simon Marlow <marlowsd@gmail.com>
942   * slight improvement to scavenging of update frames when a collision has occurred
943 
944     M ./rts/sm/Scav.c -19 +15
945]
946[slight improvement to scavenging of update frames when a collision has occurred
947Simon Marlow <marlowsd@gmail.com>**20100319112127
948 Ignore-this: 6de2bb9614978975f17764a0f259d9bf
949]
950[Don't install the utf8-string package
951Ian Lynagh <igloo@earth.li>**20100317212709]
952[Don't use -Bsymbolic when linking the RTS
953Ian Lynagh <igloo@earth.li>**20100316233357
954 This makes the RTS hooks work when doing dynamic linking
955]
956[Fix Trac #3920: Template Haskell kinds
957simonpj@microsoft.com**20100317123519
958 Ignore-this: 426cac7920446e04f3cc30bd1d9f76e2
959 
960 Fix two places where we were doing foldl instead of foldr
961 after decomposing a Kind.  Strange that the same bug appears
962 in two quite different places!
963]
964[copy_tag_nolock(): fix write ordering and add a write_barrier()
965Simon Marlow <marlowsd@gmail.com>**20100316143103
966 Ignore-this: ab7ca42904f59a0381ca24f3eb38d314
967 
968 Fixes a rare crash in the parallel GC.
969 
970 If we copy a closure non-atomically during GC, as we do for all
971 immutable values, then before writing the forwarding pointer we better
972 make sure that the closure itself is visible to other threads that
973 might follow the forwarding pointer.  I imagine this doesn't happen
974 very often, but I just found one case of it: in scavenge_stack, the
975 RET_FUN case, after evacuating ret_fun->fun we then follow it and look
976 up the info pointer.
977]
978[Add sliceP mapping to vectoriser builtins
979benl@ouroborus.net**20100316060517
980 Ignore-this: 54c3cafff584006b6fbfd98124330aa3
981]
982[Comments only
983benl@ouroborus.net**20100311064518
984 Ignore-this: d7dc718cc437d62aa5b1b673059a9b22
985]
986[TAG 2010-03-16
987Ian Lynagh <igloo@earth.li>**20100316005137
988 Ignore-this: 234e3bc29e2f26cc59d7b03d780cc352
989]
990Patch bundle hash:
991ef53b9f693b484780f61805b81be85738edbb7a9
992-----BEGIN PGP SIGNATURE-----
993Version: GnuPG v1.4.10 (Darwin)
994
995iD8DBQFL5XTrFOecpxqG73IRAl5dAJ4tzSmY0qP1aYQDxkqKpsJ6YCNvBgCfXHf2
996SJs87r1CM69bW7K0FwRJh08=
997=TBmO
998-----END PGP SIGNATURE-----