Ian Lynagh [Fri, 20 Aug 2010 15:55:23 +0000 (15:55 +0000)]
Add the RTS library path to the library search path
In case the RTS is being explicitly linked in. For #3807.
Ian Lynagh [Thu, 19 Aug 2010 23:37:43 +0000 (23:37 +0000)]
Remove some duplication of C flags
We now use the CONF_CC_OPTS_STAGEn C flags in machdepCCOpts, rather than
repeating them there.
Ian Lynagh [Thu, 19 Aug 2010 23:30:31 +0000 (23:30 +0000)]
Set -fno-stack-protector in CONF_CC_OPTS_STAGE* rathre than extra-gcc-opts
The latter is only used when compiling .hc files, whereas we need it for
.c files too.
Ian Lynagh [Thu, 19 Aug 2010 23:24:20 +0000 (23:24 +0000)]
Give clearer errors for bad input in the packages file; suggested by pejo
Ian Lynagh [Thu, 19 Aug 2010 23:09:39 +0000 (23:09 +0000)]
Set -march=i686 on OS X x86 in the configure variables
We used to set it only in machdepCCOpts, so this is more consistent
Ian Lynagh [Thu, 19 Aug 2010 22:47:09 +0000 (22:47 +0000)]
Give each stage its own Config.hs
This also means the file is generated in a dist directory, not a
source directory.
Ian Lynagh [Thu, 19 Aug 2010 13:13:46 +0000 (13:13 +0000)]
Fix cleaning when GhcProfiled = YES
We need to include the DPH cleaning rules, even though we don't build DPH
when GhcProfiled = YES.
Simon Marlow [Tue, 17 Aug 2010 15:08:36 +0000 (15:08 +0000)]
stgReallocBytes(DEBUG): don't fail when the ptr passed in is NULL
Ian Lynagh [Wed, 18 Aug 2010 19:12:43 +0000 (19:12 +0000)]
Use make-command in rules/bindist.mk
Rather than it having its own specialised version
Ian Lynagh [Wed, 18 Aug 2010 19:06:00 +0000 (19:06 +0000)]
Use make-command when installing packages
Ian Lynagh [Wed, 18 Aug 2010 18:58:01 +0000 (18:58 +0000)]
Add _DATA_FILES to package-data.mk files
Ian Lynagh [Wed, 18 Aug 2010 18:30:55 +0000 (18:30 +0000)]
Add a "make-command" utility Makefile function
David Terei [Tue, 17 Aug 2010 14:52:07 +0000 (14:52 +0000)]
LLVM: Nicer format for lack of shared lib warning
Ross Paterson [Mon, 16 Aug 2010 14:24:42 +0000 (14:24 +0000)]
fix FP_CHECK_ALIGNMENT for autoconf 2.66 (fixes #4252)
Recent versions of AS_LITERAL_IF don't like *'s. Fix from
http://blog.gmane.org/gmane.comp.sysutils.autoconf.general/month=
20100701
simonpj@microsoft.com [Mon, 16 Aug 2010 07:44:53 +0000 (07:44 +0000)]
Refactor the command-line argument parsing (again)
This change allows the client of CmdLineParser a bit more flexibility,
by giving him an arbitrary computation (not just a deprecation
message) for each flag.
There are several clients, so there are lots of boilerplate changes.
Immediate motivation: if RTS is not profiled, we want to make
Template Haskell illegal. That wasn't with the old setup.
Ian Lynagh [Sun, 15 Aug 2010 15:47:41 +0000 (15:47 +0000)]
Add upstream repo to the packages file
Ian Lynagh [Sun, 15 Aug 2010 15:16:57 +0000 (15:16 +0000)]
Make the "tag" column of the packages file always present
It makes the parsing simpler if we always have the same number of columns
Ian Lynagh [Sun, 15 Aug 2010 13:47:59 +0000 (13:47 +0000)]
Disable object splitting on OSX; works around #4013
Ian Lynagh [Fri, 13 Aug 2010 17:04:02 +0000 (17:04 +0000)]
Return memory to the OS; trac #698
Ian Lynagh [Thu, 12 Aug 2010 22:37:21 +0000 (22:37 +0000)]
Reduce the xargs -s value we use on Windows
With 30000 I was getting:
xargs: value for -s option should be < 28153
David Terei [Fri, 13 Aug 2010 19:15:34 +0000 (19:15 +0000)]
LLVM: Enable shared lib support on Linux x64
simonpj@microsoft.com [Fri, 13 Aug 2010 16:11:51 +0000 (16:11 +0000)]
Re-do the arity calculation mechanism again (fix Trac #3959)
After rumination, yet again, on the subject of arity calculation,
I have redone what an ArityType is (it's purely internal to the
CoreArity module), and documented it better. The result should
fix #3959, and I hope the related #3961, #3983.
There is lots of new documentation: in particular
* Note [ArityType]
describes the new datatype for arity info
* Note [State hack and bottoming functions]
says how bottoming functions are dealt with, particularly
covering catch# and Trac #3959
I also found I had to be careful not to eta-expand single-method
class constructors; see Note [Newtype classes and eta expansion].
I think this part could be done better, but it works ok.
simonpj@microsoft.com [Fri, 13 Aug 2010 16:10:19 +0000 (16:10 +0000)]
Comments only
simonpj@microsoft.com [Fri, 13 Aug 2010 16:31:20 +0000 (16:31 +0000)]
Modify FloatOut to fix Trac #4237
The problem was that a strict binding was getting floated
out into a letrec. This only happened when profiling was
on. It exposed a fragility in the floating strategy. This
patch makes it more robust. See
Note [Avoiding unnecessary floating]
simonpj@microsoft.com [Fri, 13 Aug 2010 16:14:29 +0000 (16:14 +0000)]
Fix egregious bug in SetLevels.notWorthFloating
This bug just led to stupid code, which would
later be optimised away, but better not to generate
stupid code in the first place.
simonpj@microsoft.com [Fri, 13 Aug 2010 14:01:52 +0000 (14:01 +0000)]
Delete GhcLibProfiled
Simon M and I looked at this, and we think GhcLibProfiled is
(a) not needed (b) confusing.
Ian should review.
Really, if GhcProfiled is on we should also
check that 'p' is in the GhcLibWays
simonpj@microsoft.com [Fri, 13 Aug 2010 14:00:21 +0000 (14:00 +0000)]
Do not build DPH when GhcProfiled (fixes #4172)
Reason: DPH uses Template Haskell and TH doesn't work
in a profiled compiler
simonpj@microsoft.com [Thu, 12 Aug 2010 13:13:19 +0000 (13:13 +0000)]
Fix Trac #4220
For deriving Functor, Foldable, Traversable with empty
data cons I just generate a null equation
f _ = error "urk"
There are probably more lurking (eg Enum) but this will do for now.
simonpj@microsoft.com [Thu, 12 Aug 2010 13:11:33 +0000 (13:11 +0000)]
Improve the Specialiser, fixing Trac #4203
Simply fixing #4203 is a tiny fix: in case alterantives we should
do dumpUDs *including* the case binder.
But I realised that we can do better and wasted far too much time
implementing the idea. It's described in
Note [Floating dictionaries out of cases]
simonpj@microsoft.com [Thu, 12 Aug 2010 10:14:56 +0000 (10:14 +0000)]
Comments
simonpj@microsoft.com [Thu, 12 Aug 2010 10:14:39 +0000 (10:14 +0000)]
Comments only
simonpj@microsoft.com [Thu, 12 Aug 2010 10:14:13 +0000 (10:14 +0000)]
Fix bug in linting of shadowed case-alternative binders
simonpj@microsoft.com [Thu, 12 Aug 2010 10:13:47 +0000 (10:13 +0000)]
Comments and spacing only
Ian Lynagh [Mon, 9 Aug 2010 23:31:08 +0000 (23:31 +0000)]
Add more info to more parse error messages (#3811)
Simon Marlow [Tue, 10 Aug 2010 13:37:39 +0000 (13:37 +0000)]
Run finalizers *after* updating the stable pointer table (#4221)
Silly bug really, we were running the C finalizers while the StablePtr
table was still in a partially-updated state during GC, but finalizers
are allowed to call freeStablePtr() (via hs_free_fun_ptr(), for
example), and chaos ensues.
Simon Marlow [Tue, 10 Aug 2010 09:34:46 +0000 (09:34 +0000)]
Do the dependency-omitting for 'make 1' in a slightly different way
I encountered a couple of things that broke after Ian's previous
patch: one was my nightly build scripts that use 'make stage=2' at the
top level, and the other is 'make fast' in libraries/base, which uses
'stage=0' to avoid building any compilers.
So my version of this patch is more direct: it just turns off the
appropriate dependencies using a variable set by 'make 1', 'make 2',
etc.
Johan Tibell [Sat, 24 Jul 2010 10:23:55 +0000 (10:23 +0000)]
Integrate new I/O manager, with signal support
Ian Lynagh [Sun, 8 Aug 2010 19:46:25 +0000 (19:46 +0000)]
Add DoAndIfThenElse support
Ian Lynagh [Sun, 8 Aug 2010 19:33:40 +0000 (19:33 +0000)]
Make another parse error more informative
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
Ian Lynagh [Sun, 8 Aug 2010 14:25:42 +0000 (14:25 +0000)]
Send ghc progress output to stdout; fixes #3636
Ian Lynagh [Thu, 5 Aug 2010 15:53:19 +0000 (15:53 +0000)]
Fix the HsColour test in the build system
Ian Lynagh [Thu, 5 Aug 2010 14:25:08 +0000 (14:25 +0000)]
Fix the -lm configure test; fixes #4155
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>"
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.
Ian Lynagh [Thu, 5 Aug 2010 13:25:55 +0000 (13:25 +0000)]
Add "cmmcpp" as a Haskellish source suffix
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
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
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".
Ian Lynagh [Wed, 4 Aug 2010 17:36:36 +0000 (17:36 +0000)]
Test for (fd < 0) before trying to FD_SET it
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.
Ian Lynagh [Sun, 1 Aug 2010 18:32:06 +0000 (18:32 +0000)]
Fix build: Add newline to end of ghc-pkg/Main.hs
Ian Lynagh [Sun, 1 Aug 2010 18:09:17 +0000 (18:09 +0000)]
Add a versions haddock binary for Windows
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
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)
Ian Lynagh [Sun, 1 Aug 2010 12:14:32 +0000 (12:14 +0000)]
Add error checking to boot-pkgs script
Ian Lynagh [Sun, 1 Aug 2010 11:36:28 +0000 (11:36 +0000)]
Add more error checking to the boot script
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
Ian Lynagh [Sat, 31 Jul 2010 11:55:06 +0000 (11:55 +0000)]
Expose the functions haddock needs even when haddock is disabled; #3558
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.
Ian Lynagh [Thu, 29 Jul 2010 20:15:03 +0000 (20:15 +0000)]
Add a debugTrace for the phases that we run
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
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.
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.
Anton Nikishaev [Wed, 21 Jul 2010 19:42:08 +0000 (19:42 +0000)]
Fix numeric escape sequences parsing
This fixes trac bug #1344
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
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.
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.
Ian Lynagh [Mon, 26 Jul 2010 21:15:12 +0000 (21:15 +0000)]
Don't rebuild dependency files unnecessarily when doing "make 1" etc
David Terei [Mon, 26 Jul 2010 10:56:50 +0000 (10:56 +0000)]
LLVM: If user specifies optlo, don't use '-O' levels
Ian Lynagh [Sun, 25 Jul 2010 13:53:20 +0000 (13:53 +0000)]
Flatten flags for ghci's :show
Ian Lynagh [Sat, 24 Jul 2010 23:01:21 +0000 (23:01 +0000)]
Add support for Haskell98 and Haskell2010 "languages"
Ian Lynagh [Sat, 24 Jul 2010 22:36:24 +0000 (22:36 +0000)]
Rename "language" varibles etc to "extension", and add --supported-extensions
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.
Ian Lynagh [Sat, 24 Jul 2010 13:31:03 +0000 (13:31 +0000)]
Separate the language flags from the other DynFlag's
Ian Lynagh [Sat, 24 Jul 2010 11:37:48 +0000 (11:37 +0000)]
Set stage-specific CC/LD opts in the bindist configure.ac
Ian Lynagh [Fri, 23 Jul 2010 22:30:59 +0000 (22:30 +0000)]
Use different CC/LD options for different stages
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
Ian Lynagh [Fri, 23 Jul 2010 18:02:37 +0000 (18:02 +0000)]
Add some more linker debugging prints
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
Ian Lynagh [Wed, 21 Jul 2010 19:36:47 +0000 (19:36 +0000)]
Add a release note: GHCi import syntax
Ian Lynagh [Mon, 19 Jul 2010 15:09:09 +0000 (15:09 +0000)]
Deprecate NewQualifiedOperators extension (rejected by H')
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
David Terei [Wed, 21 Jul 2010 14:36:54 +0000 (14:36 +0000)]
LLVM: Code and speed improvement to dominateAllocs pass.
simonpj@microsoft.com [Wed, 21 Jul 2010 14:42:57 +0000 (14:42 +0000)]
Comments only
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]
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.
Simon Marlow [Tue, 20 Jul 2010 15:37:46 +0000 (15:37 +0000)]
add numSparks# primop (#4167)
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.
David Terei [Tue, 20 Jul 2010 16:08:45 +0000 (16:08 +0000)]
LLVM: Fix OSX to work again with TNTC disabled.
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
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.
Simon Marlow [Thu, 15 Jul 2010 12:59:04 +0000 (12:59 +0000)]
'make fast' in a package does not build any compilers
David Terei [Mon, 19 Jul 2010 10:48:23 +0000 (10:48 +0000)]
LLVM: Fix up botched last commit
David Terei [Mon, 19 Jul 2010 10:34:11 +0000 (10:34 +0000)]
LLVM: Fix warning introduce in last commit.
David Terei [Sun, 18 Jul 2010 23:10:00 +0000 (23:10 +0000)]
LLVM: Use mangler to fix up stack alignment issues on OSX
illissius@gmail.com [Thu, 15 Jul 2010 13:41:34 +0000 (13:41 +0000)]
Fix #4195 (isGadtSyntaxTyCon returns opposite result)
Ian Lynagh [Sat, 17 Jul 2010 18:18:10 +0000 (18:18 +0000)]
Update to time 1.2.0.3
Ian Lynagh [Sat, 17 Jul 2010 16:23:56 +0000 (16:23 +0000)]
Reorder RTS --info output
Ian Lynagh [Sat, 17 Jul 2010 14:28:32 +0000 (14:28 +0000)]
Fix unreg prof build: Define CCS_SYSTEM in stg/MiscClosures.h