ghc.git
10 years agoFix configure
Ian Lynagh [Sat, 23 May 2009 00:42:31 +0000 (00:42 +0000)] 
Fix configure

10 years agoghc_ge_607 is now always true
Ian Lynagh [Sat, 23 May 2009 00:16:43 +0000 (00:16 +0000)] 
ghc_ge_607 is now always true

10 years agoSanity check the platforms we are given
Ian Lynagh [Sat, 23 May 2009 00:04:45 +0000 (00:04 +0000)] 
Sanity check the platforms we are given

10 years agoChange how we find the host/build/target platforms
Ian Lynagh [Fri, 22 May 2009 23:30:22 +0000 (23:30 +0000)] 
Change how we find the host/build/target platforms
Rather than using the autoconf built-in stuff and mangling it, we
now just ask the bootstrapping compiler what platform we are on.

When doing a port of GHC, you need to specify the platform you are
porting to.

The minimum version of GHC required is now 6.8.

10 years agoremove old todo comment
Simon Marlow [Wed, 20 May 2009 22:44:27 +0000 (22:44 +0000)] 
remove old todo comment

10 years agodocument -XUnicodeSyntax
Simon Marlow [Wed, 20 May 2009 22:36:47 +0000 (22:36 +0000)] 
document -XUnicodeSyntax

10 years agoexport sysErrorBelch
Simon Marlow [Sat, 28 Mar 2009 19:13:55 +0000 (19:13 +0000)] 
export sysErrorBelch

10 years ago rm package.conf.inplace in distclean, not clean
Simon Marlow [Wed, 6 May 2009 19:52:16 +0000 (19:52 +0000)] 
 rm package.conf.inplace in distclean, not clean

10 years ago#2197: try to detect when GHCi is compiled with -prof and emit an error message
Simon Marlow [Wed, 6 May 2009 19:48:02 +0000 (19:48 +0000)] 
#2197: try to detect when GHCi is compiled with -prof and emit an error message

10 years agofix typo
Simon Marlow [Sat, 28 Mar 2009 21:15:18 +0000 (21:15 +0000)] 
fix typo

10 years agoRemove hacky on-demand building of libraries/*/ghc.mk, put it back in sh boot
Simon Marlow [Fri, 22 May 2009 08:33:51 +0000 (08:33 +0000)] 
Remove hacky on-demand building of libraries/*/ghc.mk, put it back in sh boot
Now that the clean rules don't require libraries/*/ghc.mk, we don't
have to build them on demand.  And having them built on demand
introduced a failure mode (where some libraries have ghc.mk and some
don't).

10 years agoFix unregisterised bindists
Ian Lynagh [Thu, 21 May 2009 22:35:19 +0000 (22:35 +0000)] 
Fix unregisterised bindists

10 years agoPass CFLAGS and LDFLAGS to libffi's configure
Ian Lynagh [Thu, 21 May 2009 16:02:10 +0000 (16:02 +0000)] 
Pass CFLAGS and LDFLAGS to libffi's configure

10 years agoDon't overwrite the *OPTS/*Opts variables in mk/validate-settings.mk
Ian Lynagh [Thu, 21 May 2009 14:19:38 +0000 (14:19 +0000)] 
Don't overwrite the *OPTS/*Opts variables in mk/validate-settings.mk
Overwriting means we lose the -m64 on OS X 64.

10 years agoBuild and install gmp.h
Ian Lynagh [Thu, 21 May 2009 13:36:14 +0000 (13:36 +0000)] 
Build and install gmp.h

10 years agoClean gmp.h
Ian Lynagh [Thu, 21 May 2009 13:36:06 +0000 (13:36 +0000)] 
Clean gmp.h

10 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

10 years agoSet C compiler and linker flags correctly for OS X 64
Ian Lynagh [Thu, 21 May 2009 12:44:59 +0000 (12:44 +0000)] 
Set C compiler and linker flags correctly for OS X 64

10 years agoFix #3201: "ar: Bad file number" build error with MSYS and SplitObjs=YES
Simon Marlow [Thu, 21 May 2009 10:31:31 +0000 (10:31 +0000)] 
Fix #3201: "ar: Bad file number" build error with MSYS and SplitObjs=YES

10 years agofix warning (and validate)
Simon Marlow [Thu, 21 May 2009 08:19:32 +0000 (08:19 +0000)] 
fix warning (and validate)

10 years agodon't clean GMP before validating (it rarely changes, and is slow to build)
Simon Marlow [Thu, 21 May 2009 07:48:40 +0000 (07:48 +0000)] 
don't clean GMP before validating (it rarely changes, and is slow to build)

10 years agoremove a todo item (bug #2966 is fixed)
Simon Marlow [Wed, 20 May 2009 13:05:04 +0000 (13:05 +0000)] 
remove a todo item (bug #2966 is fixed)

10 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.

10 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.

10 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.

10 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.

10 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.

10 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

10 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.

10 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.

10 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

10 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

10 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

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

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

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

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

10 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

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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

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

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

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

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

10 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

10 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).

10 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

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

10 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

10 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 ':')

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

10 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

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

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

10 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

10 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.

10 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.

10 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.

10 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

10 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

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

10 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.

10 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

10 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

10 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)

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

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

10 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

10 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!

10 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).

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

10 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).

10 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.

10 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

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

10 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

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

10 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

10 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

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