ghc-hetmet.git
13 years agoMake another parse error more informative
Ian Lynagh [Sun, 8 Aug 2010 19:33:40 +0000 (19:33 +0000)]
Make another parse error more informative

13 years agoMake a parse error say what it is failing to parse; part of #3811
Ian Lynagh [Sun, 8 Aug 2010 15:57:32 +0000 (15:57 +0000)]
Make a parse error say what it is failing to parse; part of #3811

13 years agoSend ghc progress output to stdout; fixes #3636
Ian Lynagh [Sun, 8 Aug 2010 14:25:42 +0000 (14:25 +0000)]
Send ghc progress output to stdout; fixes #3636

13 years agoFix the HsColour test in the build system
Ian Lynagh [Thu, 5 Aug 2010 15:53:19 +0000 (15:53 +0000)]
Fix the HsColour test in the build system

13 years agoFix the -lm configure test; fixes #4155
Ian Lynagh [Thu, 5 Aug 2010 14:25:08 +0000 (14:25 +0000)]
Fix the -lm configure test; fixes #4155

13 years agoDon't restrict filenames in line pragmas to printable characters; fixes #4207
Ian Lynagh [Thu, 5 Aug 2010 13:50:11 +0000 (13:50 +0000)]
Don't restrict filenames in line pragmas to printable characters; fixes #4207
"printable" is ASCII-only, whereas in other locales we can get things like
# 1 "<lĂ­nea-de-orden>"

13 years agoEnsure extension flags are flattened in the Cmm phase
Ian Lynagh [Thu, 5 Aug 2010 13:36:14 +0000 (13:36 +0000)]
Ensure extension flags are flattened in the Cmm phase
If we start with a .cmmcpp file then they don't get flattened in
the CmmCpp phase, as we don't run that phase.

13 years agoAdd "cmmcpp" as a Haskellish source suffix
Ian Lynagh [Thu, 5 Aug 2010 13:25:55 +0000 (13:25 +0000)]
Add "cmmcpp" as a Haskellish source suffix

13 years agoOn amd64/OSX we don't need to be given memory in the first 31bits
Ian Lynagh [Thu, 5 Aug 2010 12:06:00 +0000 (12:06 +0000)]
On amd64/OSX we don't need to be given memory in the first 31bits
as PIC is always on

13 years agoNCG: Don't worry about trying to re-freeze missing coalescences
benl@ouroborus.net [Fri, 2 Jul 2010 05:33:19 +0000 (05:33 +0000)]
NCG: Don't worry about trying to re-freeze missing coalescences

13 years agoMake -rtsopts more flexible
Ian Lynagh [Thu, 5 Aug 2010 01:11:37 +0000 (01:11 +0000)]
Make -rtsopts more flexible
The default is a new "some" state, which allows only known-safe flags
that we want on by default. Currently this is only "--info".

13 years agoTest for (fd < 0) before trying to FD_SET it
Ian Lynagh [Wed, 4 Aug 2010 17:36:36 +0000 (17:36 +0000)]
Test for (fd < 0) before trying to FD_SET it

13 years agoRemove "On by default" comments in DynFlags
Ian Lynagh [Mon, 2 Aug 2010 11:08:03 +0000 (11:08 +0000)]
Remove "On by default" comments in DynFlags
These make less sense now we support multiple languges. The
"languageExtensions" function gives the defaults.

13 years agoFix build: Add newline to end of ghc-pkg/Main.hs
Ian Lynagh [Sun, 1 Aug 2010 18:32:06 +0000 (18:32 +0000)]
Fix build: Add newline to end of ghc-pkg/Main.hs

13 years agoAdd a versions haddock binary for Windows
Ian Lynagh [Sun, 1 Aug 2010 18:09:17 +0000 (18:09 +0000)]
Add a versions haddock binary for Windows

13 years agoghc-pkg: don't fail, if a file is already removed
ich@christoph-bauer.net [Sun, 25 Jul 2010 16:26:06 +0000 (16:26 +0000)]
ghc-pkg: don't fail, if a file is already removed

13 years agoRemove push-all from file list in boot script (push-all no longer exists)
Ian Lynagh [Sun, 1 Aug 2010 12:18:41 +0000 (12:18 +0000)]
Remove push-all from file list in boot script (push-all no longer exists)

13 years agoAdd error checking to boot-pkgs script
Ian Lynagh [Sun, 1 Aug 2010 12:14:32 +0000 (12:14 +0000)]
Add error checking to boot-pkgs script

13 years agoAdd more error checking to the boot script
Ian Lynagh [Sun, 1 Aug 2010 11:36:28 +0000 (11:36 +0000)]
Add more error checking to the boot script

13 years agoRemove libHSrtsmain.a before creating it
Ian Lynagh [Sun, 1 Aug 2010 00:54:32 +0000 (00:54 +0000)]
Remove libHSrtsmain.a before creating it
Otherwise it isn't updated properly if rts/Main.c changes

13 years agoExpose the functions haddock needs even when haddock is disabled; #3558
Ian Lynagh [Sat, 31 Jul 2010 11:55:06 +0000 (11:55 +0000)]
Expose the functions haddock needs even when haddock is disabled; #3558

13 years agoAlways haddock by default
Ian Lynagh [Fri, 30 Jul 2010 23:50:01 +0000 (23:50 +0000)]
Always haddock by default
Revert this patch:
    Matthias Kilian <kili@outback.escape.de>**20090920181319
    Don't build haddock if HADDOC_DOCS = NO, and disable HADDOC_DOCS
        if GhcWithInterpreter = NO
    Haddock uses TcRnDriver.tcRnGetInfo, which is only available if
    GHCI is built. Set HADDOC_DOCS to NO if GhcWithInterpreter is NO,
    and disable the haddock build if HADDOC_DOCS = NO.

13 years agoAdd a debugTrace for the phases that we run
Ian Lynagh [Thu, 29 Jul 2010 20:15:03 +0000 (20:15 +0000)]
Add a debugTrace for the phases that we run

13 years ago* Add StringPrimL as a constructor for Template Haskell (Trac #4168)
simonpj@microsoft.com [Fri, 30 Jul 2010 13:19:22 +0000 (13:19 +0000)]
* Add StringPrimL as a constructor for Template Haskell (Trac #4168)

There are already constructors for IntPrim, FloatPrim etc,
so this makes it more uniform.

There's a corresponding patch for the TH library

13 years agoAdd thread affinity support for FreeBSD
Gabor Pali [Tue, 20 Jul 2010 00:14:09 +0000 (00:14 +0000)]
Add thread affinity support for FreeBSD
- Implement missing functions for setting thread affinity and getting real
  number of processors.
- It is available starting from 7.1-RELEASE, which includes a native support
  for managing CPU sets.
- Add __BSD_VISIBLE, since it is required for certain types to be visible in
  addition to POSIX & C99.

13 years agoDisable symbol visibility pragmas for FreeBSD
Ian Lynagh [Thu, 29 Jul 2010 01:25:07 +0000 (01:25 +0000)]
Disable symbol visibility pragmas for FreeBSD
Do not use GCC pragmas for controlling visibility, because it causes
"undefined reference" errors at link-time.  The true reasons are
unknown, however FreeBSD 8.x includes GCC 4.2.1 in the base system,
which might be buggy.

13 years agoFix numeric escape sequences parsing
Anton Nikishaev [Wed, 21 Jul 2010 19:42:08 +0000 (19:42 +0000)]
Fix numeric escape sequences parsing
This fixes trac bug #1344

13 years agoExplicitly give the right path to perl when making the OS X installer; #4183
Ian Lynagh [Wed, 28 Jul 2010 16:30:30 +0000 (16:30 +0000)]
Explicitly give the right path to perl when making the OS X installer; #4183

13 years agoSet -fno-stack-protector in extra-gcc-opts; fixes #4206
Ian Lynagh [Wed, 28 Jul 2010 16:19:57 +0000 (16:19 +0000)]
Set -fno-stack-protector in extra-gcc-opts; fixes #4206
We were using it only when building the RTS, and only on certain
platforms. However, some versions of OS X need the flag, while others
don't support it, so we now test for it properly.

13 years agoMake PersistentLinkerState fields strict; fixes #4208
Ian Lynagh [Tue, 27 Jul 2010 20:19:11 +0000 (20:19 +0000)]
Make PersistentLinkerState fields strict; fixes #4208
We modify fields a lot, so we retain the old value if they aren't forced.

13 years agoDon't rebuild dependency files unnecessarily when doing "make 1" etc
Ian Lynagh [Mon, 26 Jul 2010 21:15:12 +0000 (21:15 +0000)]
Don't rebuild dependency files unnecessarily when doing "make 1" etc

13 years agoLLVM: If user specifies optlo, don't use '-O' levels
David Terei [Mon, 26 Jul 2010 10:56:50 +0000 (10:56 +0000)]
LLVM: If user specifies optlo, don't use '-O' levels

13 years agoFlatten flags for ghci's :show
Ian Lynagh [Sun, 25 Jul 2010 13:53:20 +0000 (13:53 +0000)]
Flatten flags for ghci's :show

13 years agoAdd support for Haskell98 and Haskell2010 "languages"
Ian Lynagh [Sat, 24 Jul 2010 23:01:21 +0000 (23:01 +0000)]
Add support for Haskell98 and Haskell2010 "languages"

13 years agoRename "language" varibles etc to "extension", and add --supported-extensions
Ian Lynagh [Sat, 24 Jul 2010 22:36:24 +0000 (22:36 +0000)]
Rename "language" varibles etc to "extension", and add --supported-extensions

13 years agoSeparate language option handling into 2 phases
Ian Lynagh [Sat, 24 Jul 2010 21:20:13 +0000 (21:20 +0000)]
Separate language option handling into 2 phases
We now first collect the option instructions (from the commandline,
from pragmas in source files, etc), and then later flatten them into
the list of enabled options. This will enable us to use different
standards (H98, H2010, etc) as a base upon which to apply the
instructions, when we don't know what the base will be when we start
collecting instructions.

13 years agoSeparate the language flags from the other DynFlag's
Ian Lynagh [Sat, 24 Jul 2010 13:31:03 +0000 (13:31 +0000)]
Separate the language flags from the other DynFlag's

13 years agoSet stage-specific CC/LD opts in the bindist configure.ac
Ian Lynagh [Sat, 24 Jul 2010 11:37:48 +0000 (11:37 +0000)]
Set stage-specific CC/LD opts in the bindist configure.ac

13 years agoUse different CC/LD options for different stages
Ian Lynagh [Fri, 23 Jul 2010 22:30:59 +0000 (22:30 +0000)]
Use different CC/LD options for different stages

13 years agoAdd some error belchs to the linker, when we find bad magic numbers
Ian Lynagh [Fri, 23 Jul 2010 20:08:22 +0000 (20:08 +0000)]
Add some error belchs to the linker, when we find bad magic numbers

13 years agoAdd some more linker debugging prints
Ian Lynagh [Fri, 23 Jul 2010 18:02:37 +0000 (18:02 +0000)]
Add some more linker debugging prints

13 years agoWhen (un)loading an object fails, say which object in teh panic
Ian Lynagh [Fri, 23 Jul 2010 16:26:49 +0000 (16:26 +0000)]
When (un)loading an object fails, say which object in teh panic

13 years agoAdd a release note: GHCi import syntax
Ian Lynagh [Wed, 21 Jul 2010 19:36:47 +0000 (19:36 +0000)]
Add a release note: GHCi import syntax

13 years agoDeprecate NewQualifiedOperators extension (rejected by H')
Ian Lynagh [Mon, 19 Jul 2010 15:09:09 +0000 (15:09 +0000)]
Deprecate NewQualifiedOperators extension (rejected by H')

13 years agoLLVM: Allow optlc and optlo to override default params for these systools
David Terei [Thu, 22 Jul 2010 18:16:31 +0000 (18:16 +0000)]
LLVM: Allow optlc and optlo to override default params for these systools

13 years agoLLVM: Code and speed improvement to dominateAllocs pass.
David Terei [Wed, 21 Jul 2010 14:36:54 +0000 (14:36 +0000)]
LLVM: Code and speed improvement to dominateAllocs pass.

13 years agoComments only
simonpj@microsoft.com [Wed, 21 Jul 2010 14:42:57 +0000 (14:42 +0000)]
Comments only

13 years agoFix inlining for default methods
simonpj@microsoft.com [Wed, 21 Jul 2010 14:42:48 +0000 (14:42 +0000)]
Fix inlining for default methods

This was discombobulated by a patch a week ago;
now fixed, quite straightforwardly.  See
Note [Default methods and instances]

13 years agoAllow reification of existentials and GADTs
simonpj@microsoft.com [Wed, 21 Jul 2010 09:04:37 +0000 (09:04 +0000)]
Allow reification of existentials and GADTs

It turns out that TH.Syntax is rich enough to express even GADTs,
provided we express them in equality-predicate form.  So for
example

  data T a where
     MkT1 :: a -> T [a]
     MkT2 :: T Int

will appear in TH syntax like this

  data T a = forall b. (a ~ [b]) => MkT1 b
           | (a ~ Int) => MkT2

While I was at it I also improved the reification of types,
so that we use TH.TupleT and TH.ListT when we can.

13 years agoadd numSparks# primop (#4167)
Simon Marlow [Tue, 20 Jul 2010 15:37:46 +0000 (15:37 +0000)]
add numSparks# primop (#4167)

13 years agoLLVM: Decrease max opt level used under OSX to avoid bug
David Terei [Tue, 20 Jul 2010 16:09:38 +0000 (16:09 +0000)]
LLVM: Decrease max opt level used under OSX to avoid bug

Currently, many programs compiled with GHC at -O2 and LLVM
set to -O3 will segfault (only under OSX). Until this issue
is fixed I have simply 'solved' the segfault by lowering
the max opt level for LLVM used to -O2 under OSX.

All these recent changes to OSX should mean its finally as
stable as Linux and Windows.

13 years agoLLVM: Fix OSX to work again with TNTC disabled.
David Terei [Tue, 20 Jul 2010 16:08:45 +0000 (16:08 +0000)]
LLVM: Fix OSX to work again with TNTC disabled.

13 years agoLLVM: Fix printing of local vars so LLVM works with -fnew-codegen
David Terei [Tue, 20 Jul 2010 16:03:02 +0000 (16:03 +0000)]
LLVM: Fix printing of local vars so LLVM works with -fnew-codegen

13 years agoUse a separate mutex to protect all_tasks, avoiding a lock-order-reversal
Simon Marlow [Fri, 16 Jul 2010 15:08:32 +0000 (15:08 +0000)]
Use a separate mutex to protect all_tasks, avoiding a lock-order-reversal
In GHC 6.12.x I found a rare deadlock caused by this
lock-order-reversal:

AQ cap->lock
  startWorkerTask
    newTask
      AQ sched_mutex

scheduleCheckBlackHoles
  AQ sched_mutex
   unblockOne_
    wakeupThreadOnCapabilty
      AQ cap->lock

so sched_mutex and cap->lock are taken in a different order in two
places.

This doesn't happen in the HEAD because we don't have
scheduleCheckBlackHoles, but I thought it would be prudent to make
this less likely to happen in the future by using a different mutex in
newTask.  We can clearly see that the all_tasks mutex cannot be
involved in a deadlock, becasue we never call anything else while
holding it.

13 years ago'make fast' in a package does not build any compilers
Simon Marlow [Thu, 15 Jul 2010 12:59:04 +0000 (12:59 +0000)]
'make fast' in a package does not build any compilers

13 years agoLLVM: Fix up botched last commit
David Terei [Mon, 19 Jul 2010 10:48:23 +0000 (10:48 +0000)]
LLVM: Fix up botched last commit

13 years agoLLVM: Fix warning introduce in last commit.
David Terei [Mon, 19 Jul 2010 10:34:11 +0000 (10:34 +0000)]
LLVM: Fix warning introduce in last commit.

13 years agoLLVM: Use mangler to fix up stack alignment issues on OSX
David Terei [Sun, 18 Jul 2010 23:10:00 +0000 (23:10 +0000)]
LLVM: Use mangler to fix up stack alignment issues on OSX

13 years agoFix #4195 (isGadtSyntaxTyCon returns opposite result)
illissius@gmail.com [Thu, 15 Jul 2010 13:41:34 +0000 (13:41 +0000)]
Fix #4195 (isGadtSyntaxTyCon returns opposite result)

13 years agoUpdate to time 1.2.0.3
Ian Lynagh [Sat, 17 Jul 2010 18:18:10 +0000 (18:18 +0000)]
Update to time 1.2.0.3

13 years agoReorder RTS --info output
Ian Lynagh [Sat, 17 Jul 2010 16:23:56 +0000 (16:23 +0000)]
Reorder RTS --info output

13 years agoFix unreg prof build: Define CCS_SYSTEM in stg/MiscClosures.h
Ian Lynagh [Sat, 17 Jul 2010 14:28:32 +0000 (14:28 +0000)]
Fix unreg prof build: Define CCS_SYSTEM in stg/MiscClosures.h

13 years agoMake mkDerivedConstants as a stage 1 program
Ian Lynagh [Sat, 17 Jul 2010 00:08:27 +0000 (00:08 +0000)]
Make mkDerivedConstants as a stage 1 program
This way it gets the defines for the right platform when cross-compiling

13 years agoDon't generate Haskell dependencies if we don't have any Haskell sources
Ian Lynagh [Sat, 17 Jul 2010 00:08:00 +0000 (00:08 +0000)]
Don't generate Haskell dependencies if we don't have any Haskell sources

13 years agoLink programs that have no Haskell objects with gcc rather than ghc
Ian Lynagh [Fri, 16 Jul 2010 23:53:03 +0000 (23:53 +0000)]
Link programs that have no Haskell objects with gcc rather than ghc

13 years agoUse gcc to build C programs for stages >= 1
Ian Lynagh [Fri, 16 Jul 2010 22:37:03 +0000 (22:37 +0000)]
Use gcc to build C programs for stages >= 1

13 years agoAdd platform info to "ghc --info" output
Ian Lynagh [Fri, 16 Jul 2010 14:19:53 +0000 (14:19 +0000)]
Add platform info to "ghc --info" output

13 years agoTidy up Config.hs generation
Ian Lynagh [Fri, 16 Jul 2010 14:06:30 +0000 (14:06 +0000)]
Tidy up Config.hs generation

13 years agoFix HC porting test in makefiles
Ian Lynagh [Fri, 16 Jul 2010 01:08:08 +0000 (01:08 +0000)]
Fix HC porting test in makefiles
Now that we are trying to support cross compilation, we can't use
    "$(TARGETPLATFORM)" != "$(HOSTPLATFORM)"
as a test for HC-porting.

13 years agoChange a BUILD var to a HOST var
Ian Lynagh [Fri, 16 Jul 2010 00:25:58 +0000 (00:25 +0000)]
Change a BUILD var to a HOST var

13 years agoRemove an unnecessary #include
Ian Lynagh [Thu, 15 Jul 2010 23:39:30 +0000 (23:39 +0000)]
Remove an unnecessary #include

13 years agoSplit up some make commands, so that errors aren't overlooked
Ian Lynagh [Thu, 15 Jul 2010 15:22:37 +0000 (15:22 +0000)]
Split up some make commands, so that errors aren't overlooked
When we ask make to run "a | b", if a fails then the pipeline might
still exit successfuly.

13 years agoRemove an unnecessary #include
Ian Lynagh [Thu, 15 Jul 2010 14:30:00 +0000 (14:30 +0000)]
Remove an unnecessary #include

13 years agoSimplify some more CPP __GLASGOW_HASKELL__ tests
Ian Lynagh [Thu, 15 Jul 2010 14:25:00 +0000 (14:25 +0000)]
Simplify some more CPP __GLASGOW_HASKELL__ tests

13 years agoRemove some code only used with GHC 6.11.*
Ian Lynagh [Thu, 15 Jul 2010 14:17:20 +0000 (14:17 +0000)]
Remove some code only used with GHC 6.11.*

13 years ago__GLASGOW_HASKELL__ >= 609 is now always true
Ian Lynagh [Thu, 15 Jul 2010 14:15:44 +0000 (14:15 +0000)]
__GLASGOW_HASKELL__ >= 609 is now always true

13 years agoCorrect the values in ghc_boot_platform.h
Ian Lynagh [Wed, 14 Jul 2010 22:37:17 +0000 (22:37 +0000)]
Correct the values in ghc_boot_platform.h

13 years agoChange some TARGET checks to HOST checks
Ian Lynagh [Wed, 14 Jul 2010 18:47:15 +0000 (18:47 +0000)]
Change some TARGET checks to HOST checks

13 years agoLLVM: Add inline assembly to binding.
David Terei [Wed, 14 Jul 2010 15:25:30 +0000 (15:25 +0000)]
LLVM: Add inline assembly to binding.

13 years agoLLVM: Fix mistype in last commit which broke TNTC under win/linux.
David Terei [Wed, 14 Jul 2010 15:33:39 +0000 (15:33 +0000)]
LLVM: Fix mistype in last commit which broke TNTC under win/linux.

13 years agoRemove unnecessary #include
Ian Lynagh [Tue, 13 Jul 2010 15:37:04 +0000 (15:37 +0000)]
Remove unnecessary #include

13 years agoChange some TARGET tests to HOST tests in the RTS
Ian Lynagh [Tue, 13 Jul 2010 14:10:34 +0000 (14:10 +0000)]
Change some TARGET tests to HOST tests in the RTS
Which was being used seemed to be random

13 years agoLLVM: Add in new LLVM mangler for implementing TNTC on OSX
David Terei [Tue, 13 Jul 2010 18:32:43 +0000 (18:32 +0000)]
LLVM: Add in new LLVM mangler for implementing TNTC on OSX

13 years agoRefactor where an error message is generated
simonpj@microsoft.com [Tue, 13 Jul 2010 11:57:33 +0000 (11:57 +0000)]
Refactor where an error message is generated

13 years agoComments only
simonpj@microsoft.com [Tue, 13 Jul 2010 11:57:03 +0000 (11:57 +0000)]
Comments only

13 years agoComments on data type families
simonpj@microsoft.com [Tue, 13 Jul 2010 11:56:40 +0000 (11:56 +0000)]
Comments on data type families

13 years agoFix Trac #T4136: take care with nullary symbol constructors
simonpj@microsoft.com [Wed, 7 Jul 2010 13:59:45 +0000 (13:59 +0000)]
Fix Trac #T4136: take care with nullary symbol constructors

When a nullary constructor is a symbol eg (:=:) we need
to take care.  Annoying.

13 years agoFix Trac #4127 (and hence #4173)
simonpj@microsoft.com [Wed, 7 Jul 2010 12:31:25 +0000 (12:31 +0000)]
Fix Trac #4127 (and hence #4173)

The change involves a little refactoring, so that the default
method Ids are brought into scope earlier, before the value
declarations are compiled.  (Since a value decl may contain
an instance decl in a quote.)

See Note [Default method Ids and Template Haskell] in
TcTyClsDcls.

13 years agoFix second bug in Trac #4127
simonpj@microsoft.com [Thu, 1 Jul 2010 14:01:24 +0000 (14:01 +0000)]
Fix second bug in Trac #4127

This bug concerned the awkward shadowing we do for
Template Haskell declaration brackets.  Lots of
comments in

  Note [Top-level Names in Template Haskell decl quotes]

13 years agoia64: switch handling of 'foreign import wrapper' (FIW) to libffi
Sergei Trofimovich [Fri, 9 Jul 2010 21:39:22 +0000 (21:39 +0000)]
ia64: switch handling of 'foreign import wrapper' (FIW) to libffi

I tried to build darcs-2.4.4 with ghc-6.12.3 and got coredumps when darcs is used
in interactive mode. I tried test from ticket #3516 and found out FIW code is broken.
Instead of fixing it I just switched to libffi. Result built successfully, passed
'foreign import wrapper' test from ticket #3516 and builds working darcs.

13 years ago* storage manager: preserve upper address bits on 64bit machines (thanks to zygoloid)
Sergei Trofimovich [Fri, 9 Jul 2010 11:59:17 +0000 (11:59 +0000)]
* storage manager: preserve upper address bits on 64bit machines (thanks to zygoloid)

Patch does not touch amd64 as it's address lengts is 48 bits at most, so amd64 is unaffected.

the issue: during ia64 ghc bootstrap (both 6.10.4 and 6.12.3) I
got the failure on stage2 phase:
    "inplace/bin/ghc-stage2"   -H32m -O -H64m -O0 -w ...
    ghc-stage2: internal error: evacuate: strange closure type 15
        (GHC version 6.12.3 for ia64_unknown_linux)
        Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
    make[1]: *** [libraries/dph/dph-base/dist-install/build/Data/Array/Parallel/Base/Hyperstrict.o] Aborted

gdb backtrace (break on 'barf'):
Breakpoint 1 at 0x400000000469ec31: file rts/RtsMessages.c, line 39.
(gdb) run -B/var/tmp/portage/dev-lang/ghc-6.12.3/work/ghc-6.12.3/inplace/bin --info
Starting program: /var/tmp/portage/dev-lang/ghc-6.12.3/work/ghc-6.12.3/inplace/lib/ghc-stage2 -B/var/tmp/portage/dev-lang/ghc-6.12.3/work/ghc-6.12.3/inplace/bin --info
[Thread debugging using libthread_db enabled]

Breakpoint 1, barf (s=0x40000000047915b0 "evacuate: strange closure type %d") at rts/RtsMessages.c:39
39        va_start(ap,s);
(gdb) bt
#0  barf (s=0x40000000047915b0 "evacuate: strange closure type %d") at rts/RtsMessages.c:39
#1  0x400000000474a1e0 in evacuate (p=0x6000000000147958) at rts/sm/Evac.c:756
#2  0x40000000046d68c0 in scavenge_srt (srt=0x6000000000147958, srt_bitmap=7) at rts/sm/Scav.c:348
...

> 16:52:53 < zygoloid> slyfox: i'm no ghc expert but it looks like HEAP_ALLOCED_GC(q)
>                      is returning true for a FUN_STATIC closure
> 17:18:43 < zygoloid> try: p HEAP_ALLOCED_miss((unsigned long)(*p) >> 20, *p)
> 17:19:12 < slyfox> (gdb) p HEAP_ALLOCED_miss((unsigned long)(*p) >> 20, *p)
> 17:19:12 < slyfox> $1 = 0
> 17:19:40 < zygoloid> i /think/ that means the mblock_cache is broken
> 17:22:45 < zygoloid> i can't help further. however i am suspicious that you seem to have pointers with similar-looking low 33
>                      bits and different high 4 bits, and it looks like such pointers get put into the same bucket in
>                      mblock_cache.
...
> 17:36:16 < zygoloid> slyfox: try changing the definition of MbcCacheLine to StgWord64, see if that helps
> 17:36:31 < zygoloid> that's in includes/rts/storage/MBlock.h
And it helped!

13 years agoFixing link failure of compiler on ia64 ('-Wl,' prefixed value passed directly to ld)
Sergei Trofimovich [Thu, 8 Jul 2010 18:09:43 +0000 (18:09 +0000)]
Fixing link failure of compiler on ia64 ('-Wl,' prefixed value passed directly to ld)

    /usr/bin/ld -Wl,--relax -r -o dist-stage1/build/HSghc-6.10.4.o \
                                  dist-stage1/build/BasicTypes.o dist-stage1/build/DataCon.o ...
    /usr/bin/ld: unrecognized option '-Wl,--relax'

If we just drop '-Wl,' part it will not help as '-r' and '--relax' are incompatible.

Looks like '-Wl,--relax' was skipped by earlier binutils' ld as unknown option.
Removing ia64 specific path.

13 years agoLLVM: Allow getelementptr to use LlvmVar for indexes.
David Terei [Mon, 12 Jul 2010 15:25:29 +0000 (15:25 +0000)]
LLVM: Allow getelementptr to use LlvmVar for indexes.

13 years agoMove all the warning workarounds to one place
Ian Lynagh [Sat, 10 Jul 2010 16:17:23 +0000 (16:17 +0000)]
Move all the warning workarounds to one place

13 years agoxhtml is now warning-free
Ian Lynagh [Sat, 10 Jul 2010 14:46:35 +0000 (14:46 +0000)]
xhtml is now warning-free

13 years agoMove a bit of build system code
Ian Lynagh [Fri, 9 Jul 2010 22:45:34 +0000 (22:45 +0000)]
Move a bit of build system code

13 years agoadapt to the new async exceptions API
Simon Marlow [Fri, 9 Jul 2010 12:52:38 +0000 (12:52 +0000)]
adapt to the new async exceptions API

13 years agoquiet some new spewage
Simon Marlow [Fri, 9 Jul 2010 09:15:21 +0000 (09:15 +0000)]
quiet some new spewage

13 years agoNew asynchronous exception control API (ghc parts)
Simon Marlow [Thu, 8 Jul 2010 14:48:51 +0000 (14:48 +0000)]
New asynchronous exception control API (ghc parts)

As discussed on the libraries/haskell-cafe mailing lists
  http://www.haskell.org/pipermail/libraries/2010-April/013420.html

This is a replacement for block/unblock in the asychronous exceptions
API to fix a problem whereby a function could unblock asynchronous
exceptions even if called within a blocked context.

The new terminology is "mask" rather than "block" (to avoid confusion
due to overloaded meanings of the latter).

In GHC, we changed the names of some primops:

  blockAsyncExceptions#   -> maskAsyncExceptions#
  unblockAsyncExceptions# -> unmaskAsyncExceptions#
  asyncExceptionsBlocked# -> getMaskingState#

and added one new primop:

  maskUninterruptible#

See the accompanying patch to libraries/base for the API changes.

13 years agoremove outdated comment
Simon Marlow [Thu, 8 Jul 2010 10:08:40 +0000 (10:08 +0000)]
remove outdated comment