ghc-hetmet.git
14 years agoWhen linking a shared library with --make, always do the link step
Duncan Coutts [Tue, 19 May 2009 12:11:49 +0000 (12:11 +0000)]
When linking a shared library with --make, always do the link step
Without -shared, the default target is a binary and in that case
it makes sense for --make to not try and link a binary when there
is no Main module. But for a shared library the user already has
to specify -shared and there's no reason a shared lib should
contain any Main module or main function.

14 years agoPass --enable-shared and --with-hscolour to ghc-cabal configure
Duncan Coutts [Tue, 19 May 2009 12:09:53 +0000 (12:09 +0000)]
Pass --enable-shared and --with-hscolour to ghc-cabal configure
It tried to do this already, but the make variable name was wrong.

14 years agoUse shared lib mode -dynload deploy to build the rts and core shared libs
Duncan Coutts [Tue, 19 May 2009 12:08:01 +0000 (12:08 +0000)]
Use shared lib mode -dynload deploy to build the rts and core shared libs
This is now the same as the old default. Currently we cannot embed
rpaths because they would point to the build tree. We should embed
rpaths relative to the $ORIGIN in future.

14 years agoMake -dynload sysdep mean to embed rpaths in shared libs as well as binaries
Duncan Coutts [Tue, 19 May 2009 12:05:33 +0000 (12:05 +0000)]
Make -dynload sysdep mean to embed rpaths in shared libs as well as binaries
Previously it only did it for binaries. This was presumably on the
theory that the binary could specify the rpath for all the libs.
However when it is the shared lib that is the final product (ie to
link into a bigger project) then we need the rpaths for the shared
lib to be self-contianed.

14 years agoSwitch the default -dynload mode to SystemDependent
Duncan Coutts [Sun, 17 May 2009 00:36:30 +0000 (00:36 +0000)]
Switch the default -dynload mode to SystemDependent
The previous default was Deployable though it was being
overridden to Wrapper in the ghc shell script wrapper.

14 years agoSet the soname when creating a shared lib
Duncan Coutts [Fri, 15 May 2009 20:37:30 +0000 (20:37 +0000)]
Set the soname when creating a shared lib
It's still possible to override it, just use -optl-Wl,-soname, eg:
ghc -shared -dynamic foo.o -o libfoo.so -optl-Wl,-soname,libbar.so

14 years agoKeep C main separate from rts lib and link it in for standalone progs
Duncan Coutts [Fri, 15 May 2009 16:08:14 +0000 (16:08 +0000)]
Keep C main separate from rts lib and link it in for standalone progs
Previously the object code for the C main function lived in the rts
lib, however this is a problem when the rts is built as a shared lib.
With Windows DLLs it always causes problems while on ELF systems it's a
problem when the user decides to use their own C main function rather
than a Haskell Main.main. So instead we now put main in it's own tiny
little static lib libHSrtsmain.a which we install next to the rts libs.
Whenever ghc links a program (without -no-hs-main) then it also links
in -lHSrtsmain. For consistency we always do it this way now rather
than trying to do it differently for static vs shared libraries.

14 years agoRemove old Windows-only implementation of keeping main outside the rts
Duncan Coutts [Thu, 14 May 2009 18:35:50 +0000 (18:35 +0000)]
Remove old Windows-only implementation of keeping main outside the rts
We now do it for all ways and for all platforms. This was a Windows-only
version that only kept a separate Main.dyn_o for the dynamic linking case.
It had to do that because Windows DLLs are stricter about unresolved symbols
where as for ELF platforms we only run into the problem when we're not using
a Haskell main function.

14 years agoFix silly make macro mistake in a rule used in the --enable-shared case
Duncan Coutts [Thu, 14 May 2009 18:42:16 +0000 (18:42 +0000)]
Fix silly make macro mistake in a rule used in the --enable-shared case

14 years agoWindows: load msvcrt and kernel32 manually
Simon Marlow [Wed, 20 May 2009 12:43:10 +0000 (12:43 +0000)]
Windows: load msvcrt and kernel32 manually

14 years agoNeed to pass gcc -m64 on amd64 OSX
Ian Lynagh [Wed, 20 May 2009 22:40:20 +0000 (22:40 +0000)]
Need to pass gcc -m64 on amd64 OSX

14 years agoOS X / amd64 fixes
Ian Lynagh [Wed, 20 May 2009 22:36:10 +0000 (22:36 +0000)]
OS X / amd64 fixes

14 years agoFix the unregisterised build
Ian Lynagh [Wed, 20 May 2009 22:10:46 +0000 (22:10 +0000)]
Fix the unregisterised build

14 years agoBuild fix for amd64/OSX
Ian Lynagh [Wed, 20 May 2009 21:17:05 +0000 (21:17 +0000)]
Build fix for amd64/OSX

14 years agoFix building with the HEAD
Ian Lynagh [Wed, 20 May 2009 20:25:32 +0000 (20:25 +0000)]
Fix building with the HEAD

14 years agoNeed to pass gcc -m64 on amd64 OSX
Ian Lynagh [Wed, 20 May 2009 17:05:08 +0000 (17:05 +0000)]
Need to pass gcc -m64 on amd64 OSX

14 years agoUse machdepCCOpts when running "as"
Ian Lynagh [Wed, 20 May 2009 16:58:11 +0000 (16:58 +0000)]
Use machdepCCOpts when running "as"

14 years agoUse SRC_HC_OPTS when making ghc-cabal and ghc-pkg
Ian Lynagh [Wed, 20 May 2009 13:00:09 +0000 (13:00 +0000)]
Use SRC_HC_OPTS when making ghc-cabal and ghc-pkg

14 years agoFix building ghc-pkg when bootstrapping
Ian Lynagh [Wed, 20 May 2009 12:22:41 +0000 (12:22 +0000)]
Fix building ghc-pkg when bootstrapping

14 years agoSimplify ghc-pkg's ghc.mk slightly
Ian Lynagh [Wed, 20 May 2009 12:19:40 +0000 (12:19 +0000)]
Simplify ghc-pkg's ghc.mk slightly

14 years agoSet CLEANING=YES for the clean_% targets
Ian Lynagh [Wed, 20 May 2009 11:43:12 +0000 (11:43 +0000)]
Set CLEANING=YES for the clean_% targets

14 years agoUse SRC_CC_OPTS when making HSffi.o
Ian Lynagh [Tue, 19 May 2009 19:57:42 +0000 (19:57 +0000)]
Use SRC_CC_OPTS when making HSffi.o

14 years agomake [123] omits phases 1,2, and 3
Simon Marlow [Tue, 19 May 2009 08:34:19 +0000 (08:34 +0000)]
make [123] omits phases 1,2, and 3

14 years agoallow phases to be omitted by setting OMIT_PHASE_[123]=YES
Simon Marlow [Tue, 19 May 2009 08:33:50 +0000 (08:33 +0000)]
allow phases to be omitted by setting OMIT_PHASE_[123]=YES

14 years agofix a dependency: Makefile -> includes/Makefile
Simon Marlow [Tue, 19 May 2009 08:33:17 +0000 (08:33 +0000)]
fix a dependency: Makefile -> includes/Makefile

14 years agoMake -Odph imply -fsimplifier-phases=3
Roman Leshchinskiy [Tue, 19 May 2009 05:58:07 +0000 (05:58 +0000)]
Make -Odph imply -fsimplifier-phases=3

14 years agoAdd missing word, spotted by Tom Lokhorst
Max Bolingbroke [Mon, 18 May 2009 15:33:14 +0000 (15:33 +0000)]
Add missing word, spotted by Tom Lokhorst

14 years agofix typo: TH.ModName -> TH.PkgName
Simon Marlow [Mon, 18 May 2009 12:04:57 +0000 (12:04 +0000)]
fix typo: TH.ModName -> TH.PkgName

14 years agoFix #3236: emit a helpful error message when the RTS has not been initialised
Simon Marlow [Mon, 18 May 2009 10:41:08 +0000 (10:41 +0000)]
Fix #3236: emit a helpful error message when the RTS has not been initialised

14 years agoFix #3207: add has_side_effects = True for lots of primops
Simon Marlow [Fri, 15 May 2009 14:36:08 +0000 (14:36 +0000)]
Fix #3207: add has_side_effects = True for lots of primops
and document primOpHasSideEffects

14 years agoBootstrapping fixes
Ian Lynagh [Sun, 17 May 2009 13:05:58 +0000 (13:05 +0000)]
Bootstrapping fixes

14 years agoBootstrapping fixes
Ian Lynagh [Sun, 17 May 2009 00:11:46 +0000 (00:11 +0000)]
Bootstrapping fixes

14 years agoBootstrapping fixes
Ian Lynagh [Sat, 16 May 2009 18:30:20 +0000 (18:30 +0000)]
Bootstrapping fixes

14 years agoRemove a done TODO item
Ian Lynagh [Sat, 16 May 2009 17:58:36 +0000 (17:58 +0000)]
Remove a done TODO item

14 years agoAdd libraries/dph/LICENSE to bindists
Ian Lynagh [Sat, 16 May 2009 13:00:16 +0000 (13:00 +0000)]
Add libraries/dph/LICENSE to bindists

14 years agoTweak bindist creation
Ian Lynagh [Sat, 16 May 2009 12:55:27 +0000 (12:55 +0000)]
Tweak bindist creation
libraries built by stage2 need all their bits in the bindist too.
We were testing (stage == 1) rather than (stage /= 0).

14 years agoMove the fixed paths out of config.mk, so cleaning works without configuring
Ian Lynagh [Sat, 16 May 2009 12:12:48 +0000 (12:12 +0000)]
Move the fixed paths out of config.mk, so cleaning works without configuring

14 years agoRemove an incorrect comment
Ian Lynagh [Sat, 16 May 2009 12:02:55 +0000 (12:02 +0000)]
Remove an incorrect comment

14 years agoHide more make rules when cleaning
Ian Lynagh [Sat, 16 May 2009 11:45:11 +0000 (11:45 +0000)]
Hide more make rules when cleaning

14 years agoRemove some $(TOP)s that cause problems on Windows (as they contain ':')
Ian Lynagh [Sat, 16 May 2009 00:11:18 +0000 (00:11 +0000)]
Remove some $(TOP)s that cause problems on Windows (as they contain ':')

14 years agoDisable suffix rules when cleaning
Ian Lynagh [Fri, 15 May 2009 23:19:47 +0000 (23:19 +0000)]
Disable suffix rules when cleaning

14 years agoDon't require the library ghc.mk files in order to clean
Ian Lynagh [Fri, 15 May 2009 23:15:16 +0000 (23:15 +0000)]
Don't require the library ghc.mk files in order to clean

14 years agoAdd a maintainer-clean rule
Ian Lynagh [Fri, 15 May 2009 22:56:59 +0000 (22:56 +0000)]
Add a maintainer-clean rule

14 years agoMake dph required
Ian Lynagh [Fri, 15 May 2009 20:51:22 +0000 (20:51 +0000)]
Make dph required

14 years agoRemove --extra flag from darcs-all
Ian Lynagh [Fri, 15 May 2009 20:36:46 +0000 (20:36 +0000)]
Remove --extra flag from darcs-all

14 years agoRemove nofib-analyse
Ian Lynagh [Fri, 15 May 2009 20:02:41 +0000 (20:02 +0000)]
Remove nofib-analyse
It's now in the nofib repo.

14 years agoMove hasktags out of the GHC repo
Ian Lynagh [Fri, 15 May 2009 13:57:55 +0000 (13:57 +0000)]
Move hasktags out of the GHC repo
Now configure looks for it as an installed program instead.

14 years agoFurther fixes to the stage1 version hack; fix validate.
Simon Marlow [Fri, 15 May 2009 11:11:09 +0000 (11:11 +0000)]
Further fixes to the stage1 version hack; fix validate.
I'm less convinced this is a good idea now.  But it does avoid
rebuilding most of stage1 when you pull and reconfigure.  Better
solutions welcome.

14 years agoremove warning settings; we already have warnings turned on everywhere
Simon Marlow [Fri, 15 May 2009 09:40:46 +0000 (09:40 +0000)]
remove warning settings; we already have warnings turned on everywhere

14 years agodisable all docs in the "quick" and "devel" builds
Simon Marlow [Fri, 15 May 2009 09:35:00 +0000 (09:35 +0000)]
disable all docs in the "quick" and "devel" builds

14 years agoremove XmlDocWays relic
Simon Marlow [Fri, 15 May 2009 09:44:52 +0000 (09:44 +0000)]
remove XmlDocWays relic

14 years agocleanup: remove reference to $1_$2_CONFIGURE_FLAGS, which is never used
Simon Marlow [Fri, 15 May 2009 09:28:58 +0000 (09:28 +0000)]
cleanup: remove reference to $1_$2_CONFIGURE_FLAGS, which is never used
we also have $1_$2_CONFIGURE_OPTS, which is used.

14 years agofix cut-and-pasto in mkWeakForeignEnv#, causing random segfaults
Simon Marlow [Fri, 15 May 2009 09:23:56 +0000 (09:23 +0000)]
fix cut-and-pasto in mkWeakForeignEnv#, causing random segfaults

14 years agoFix maintainer-clean for library/dph
Manuel M T Chakravarty [Fri, 15 May 2009 02:48:12 +0000 (02:48 +0000)]
Fix maintainer-clean for library/dph

14 years agouse StgWord for the lock (fixes valgrind complaint on 64-bit machines)
Simon Marlow [Thu, 14 May 2009 14:55:24 +0000 (14:55 +0000)]
use StgWord for the lock (fixes valgrind complaint on 64-bit machines)

14 years agodon't rebuild the whole of stage 1 just because the date has changed
Simon Marlow [Thu, 14 May 2009 09:36:36 +0000 (09:36 +0000)]
don't rebuild the whole of stage 1 just because the date has changed

14 years agoRemove left-over bits of extralib support
Ian Lynagh [Thu, 14 May 2009 12:58:04 +0000 (12:58 +0000)]
Remove left-over bits of extralib support

14 years agoClean the right directory in bindisttest
Ian Lynagh [Thu, 14 May 2009 12:50:44 +0000 (12:50 +0000)]
Clean the right directory in bindisttest

14 years agovalidate now uses maintainer-clean, not distclean
Simon Marlow [Thu, 14 May 2009 10:57:17 +0000 (10:57 +0000)]
validate now uses maintainer-clean, not distclean

14 years agomain repeated 'make maintainer-clean' not fail
Simon Marlow [Thu, 14 May 2009 10:57:04 +0000 (10:57 +0000)]
main repeated 'make maintainer-clean' not fail

14 years agomake repeated 'make distclean' not fail
Simon Marlow [Thu, 14 May 2009 10:56:45 +0000 (10:56 +0000)]
make repeated 'make distclean' not fail

14 years agodummy-ghc should depend on config.mk, to pick up the latest version number
Simon Marlow [Wed, 13 May 2009 14:44:44 +0000 (14:44 +0000)]
dummy-ghc should depend on config.mk, to pick up the latest version number
This fixes build problems of the form
  ghc-cabal: Version mismatch between ghc and ghc-pkg

14 years agorejig ghc version test; fail if GHC version can't be determined
Simon Marlow [Wed, 13 May 2009 10:39:05 +0000 (10:39 +0000)]
rejig ghc version test; fail if GHC version can't be determined

14 years agoHide warnings from alex/happy sources
Ian Lynagh [Thu, 14 May 2009 00:54:50 +0000 (00:54 +0000)]
Hide warnings from alex/happy sources

14 years agoFix some warnings in Lexer
Ian Lynagh [Wed, 13 May 2009 23:40:42 +0000 (23:40 +0000)]
Fix some warnings in Lexer

14 years agoFix building dph in the new build system
Ian Lynagh [Wed, 13 May 2009 16:05:31 +0000 (16:05 +0000)]
Fix building dph in the new build system

14 years agoImprove error reporting for kind errors (fix Trac #1633)
simonpj@microsoft.com [Wed, 13 May 2009 15:11:30 +0000 (15:11 +0000)]
Improve error reporting for kind errors (fix Trac #1633)

A long-standing improvement to the error message for kinds. Now instead of
    Expected kind `* -> *', but `Int' has kind `*'
we get
    The first argument of `T' should have kind `* -> *',
    but `Int' has kind `*'

Ha!

14 years agoFix Trac #3219: type of a record update
simonpj@microsoft.com [Wed, 13 May 2009 15:09:22 +0000 (15:09 +0000)]
Fix Trac #3219: type of a record update

Record updates are amazingly hard to typecheck right.  This is one place
where GHC's policy of typechecking the original source is much harder than
desugaring and typechecking that!

Anyway, the bug here is that to compute the 'fixed' type variables I was
only looking at one constructor rather than all the relevant_cons

Test is typecheck/should_compile/T3219, which GHC 6.10 barfs on (with Lint).

14 years agoAdd comments
simonpj@microsoft.com [Wed, 13 May 2009 14:59:44 +0000 (14:59 +0000)]
Add comments

14 years agoLink the rts shared libs against gmp and the other C libs
Duncan Coutts [Fri, 1 May 2009 23:58:24 +0000 (23:58 +0000)]
Link the rts shared libs against gmp and the other C libs
When using shared libs we should link each lib against its deps. This allows
the dynamic linker to chase dependencies and means we do not have to specify
all indirect dependencies (as we must do for static libs).

14 years agoMake ghc -dynamic imply -fPIC for C code
Duncan Coutts [Fri, 1 May 2009 12:14:45 +0000 (12:14 +0000)]
Make ghc -dynamic imply -fPIC for C code
As is already the case for ghc -fPIC. This is needed because ghc -dynamic
means to generate code that is capable of being linked to Haskell shared
libs and for C code the equivalent is -fPIC. Normally C code does not need
-fPIC merely to link to shared libs however Haskell shared libs do not
follow common conventions. In particular the static data cannot be
referenced statically because it cannot be copied by the static linker.
The linker cannot copy them because we do not specify a .size for the
_closure entries (in the .data section) though in principle we could.

14 years agovalidate does "exit 1" if it fails
Simon Marlow [Wed, 13 May 2009 10:20:44 +0000 (10:20 +0000)]
validate does "exit 1" if it fails

14 years agofix warning
Simon Marlow [Wed, 13 May 2009 10:16:49 +0000 (10:16 +0000)]
fix warning

14 years agoremove old unused fop/dvips/xmltex stuff
Simon Marlow [Wed, 13 May 2009 10:03:17 +0000 (10:03 +0000)]
remove old unused fop/dvips/xmltex stuff

14 years agobuild Haddock docs
Simon Marlow [Wed, 13 May 2009 10:01:42 +0000 (10:01 +0000)]
build Haddock docs

15 years agoenable LinkDynLib in compilier phase
y.zhuang5@lse.ac.uk [Wed, 22 Apr 2009 20:19:37 +0000 (20:19 +0000)]
enable LinkDynLib in compilier phase

14 years agoexpand hack to include PS docs too
Simon Marlow [Wed, 13 May 2009 07:59:03 +0000 (07:59 +0000)]
expand hack to include PS docs too

14 years agostub Makefile
Simon Marlow [Mon, 11 May 2009 14:51:22 +0000 (14:51 +0000)]
stub Makefile

14 years agoGhcBootLibs is no more
Simon Marlow [Mon, 11 May 2009 14:50:06 +0000 (14:50 +0000)]
GhcBootLibs is no more

14 years agoupdates to the section describing the +RTS -s/-S output (#3211)
Simon Marlow [Mon, 11 May 2009 14:49:35 +0000 (14:49 +0000)]
updates to the section describing the  +RTS -s/-S output (#3211)

14 years agomulti-slurp protection
Simon Marlow [Fri, 8 May 2009 09:22:00 +0000 (09:22 +0000)]
multi-slurp protection

14 years agoImprove error messages for type functions
simonpj@microsoft.com [Tue, 12 May 2009 17:12:29 +0000 (17:12 +0000)]
Improve error messages for type functions

Following a suggestion of Claus Reinke, this patch improves the error
messages involving type functions.  Here's the relevant note from TcTyFuns.

Note [Non-injective type functions]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's very confusing to get a message like
     Couldn't match expected type `Depend s'
            against inferred type `Depend s1'
so pp_open_tc adds:
       NB: `Depend' is a (non-injective) type function

Currently we add this independently for each argument, so we also get
     Couldn't match expected type `a'
            against inferred type `Dual (Dual a)'
       NB: `Dual' is a (non-injective) type function
which is arguably redundant.  But on the other hand, it's probably
a good idea for the programmer to know the error involves type functions
so I've left it in for now.  The obvious alternative is to only add
this NB in the case of matching (T ...) ~ (T ...).

14 years agostub makefile
Simon Marlow [Mon, 11 May 2009 13:36:15 +0000 (13:36 +0000)]
stub makefile

14 years agoHack to make the user's guide build in a linked build tree
Simon Marlow [Mon, 11 May 2009 13:35:23 +0000 (13:35 +0000)]
Hack to make the user's guide build in a linked build tree
See comment for details

14 years agomake it so that 'make html', 'make pdf', and 'make ps' work for docs
Simon Marlow [Mon, 11 May 2009 12:02:56 +0000 (12:02 +0000)]
make it so that 'make html', 'make pdf', and 'make ps' work for docs

14 years agocorrect the +RTS -? docs for -A (default is 512k not 256k)
Simon Marlow [Fri, 8 May 2009 08:38:11 +0000 (08:38 +0000)]
correct the +RTS -? docs for -A (default is 512k not 256k)

14 years agoUse a more compact +RTS -s output for Tasks
Simon Marlow [Fri, 8 May 2009 08:37:38 +0000 (08:37 +0000)]
Use a more compact +RTS -s output for Tasks

                        MUT time (elapsed)       GC time  (elapsed)
  Task  0 (worker) :    0.00s    (  0.00s)       0.00s    (  0.00s)
  Task  1 (worker) :    0.00s    (  0.01s)       0.00s    (  0.00s)
  Task  2 (worker) :    0.00s    (  0.03s)       0.00s    (  0.00s)
  Task  3 (bound)  :    0.00s    (  0.00s)       0.02s    (  0.04s)

14 years agodisable a warning
Simon Marlow [Tue, 5 May 2009 09:20:15 +0000 (09:20 +0000)]
disable a warning

14 years agodocbook PDF item is done
Simon Marlow [Tue, 5 May 2009 09:20:09 +0000 (09:20 +0000)]
docbook PDF item is done

14 years agoadd a .c --> .s rule
Simon Marlow [Fri, 1 May 2009 09:56:27 +0000 (09:56 +0000)]
add a .c --> .s rule

14 years agoRemove libraries/ifBuildable.hs; it's no longer used
Ian Lynagh [Sat, 9 May 2009 20:07:08 +0000 (20:07 +0000)]
Remove libraries/ifBuildable.hs; it's no longer used

14 years agoFix configure
Ian Lynagh [Sat, 9 May 2009 18:46:34 +0000 (18:46 +0000)]
Fix configure

14 years agoBuild system tweak
Ian Lynagh [Sat, 9 May 2009 14:29:36 +0000 (14:29 +0000)]
Build system tweak

14 years agoAdd a Makefile in libraries/
Ian Lynagh [Fri, 8 May 2009 23:29:20 +0000 (23:29 +0000)]
Add a Makefile in libraries/

14 years agoTweak ./boot
Ian Lynagh [Fri, 8 May 2009 23:02:36 +0000 (23:02 +0000)]
Tweak ./boot

14 years agoPartially fix "make framework-pkg"
Ian Lynagh [Fri, 8 May 2009 22:48:57 +0000 (22:48 +0000)]
Partially fix "make framework-pkg"
We still need to sort out the "install-docs" story to get this working
properly.

14 years agoHandle deciding what docs to build better
Ian Lynagh [Fri, 8 May 2009 00:06:03 +0000 (00:06 +0000)]
Handle deciding what docs to build better
Now we have variables for whether or not to build the docbook docs as
HTML, as PS, and as PDF. The configure script output now matches what
the build system will do (except it cannot take account of any
mk/build.mk settings, of course).

14 years agoRemove oldconfig.mk.in
Ian Lynagh [Thu, 7 May 2009 15:06:41 +0000 (15:06 +0000)]
Remove oldconfig.mk.in

14 years agoRename pwd to ghc-pwd
Ian Lynagh [Thu, 7 May 2009 13:50:34 +0000 (13:50 +0000)]
Rename pwd to ghc-pwd

14 years agoRemove pwd's Makefile from the old build system
Ian Lynagh [Thu, 7 May 2009 13:43:56 +0000 (13:43 +0000)]
Remove pwd's Makefile from the old build system