summaryrefslogtreecommitdiff
path: root/ghc.mk
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't build old-{time,locale} and haskell{98,2010}Austin Seipp2014-11-201-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As discussed on ghc-devs@haskell.org and the trac ticket, we're removing these packages from the 7.10 release as they no longer work correctly, and can't easily be made to properly follow the standard as `base` changes over time. This does not remove the packages from the tree, only the build system. https://www.haskell.org/pipermail/ghc-devs/2014-November/007357.html Signed-off-by: Austin Seipp <austin@well-typed.com> Test Plan: iiam Reviewers: hvr, ekmett Reviewed By: hvr, ekmett Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D510 GHC Trac Issues: #9590
* Build xhtml and haddock only when `HADDOCK_DOCS=YES`Joachim Breitner2014-11-181-0/+6
| | | | This fixes #8558
* Implement new integer-gmp2 from scratch (re #9281)Herbert Valerio Riedel2014-11-121-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done as a separate `integer-gmp2` backend library because it turned out to become a complete rewrite from scratch. Due to the different (over)allocation scheme and potentially different accounting (via the new `{shrink,resize}MutableByteArray#` primitives), some of the nofib benchmarks actually results in increased allocation numbers (but not necessarily an increase in runtime!). I believe the allocation numbers could improve if `{resize,shrink}MutableByteArray#` could be optimised to reallocate in-place more efficiently. Here are the more apparent changes in the latest nofib comparision between `integer-gmp` and `integer-gmp2`: ------------------------------------------------------------------ Program Size Allocs Runtime Elapsed TotalMem ------------------------------------------------------------------ ... bernouilli +1.6% +15.3% 0.132 0.132 0.0% ... cryptarithm1 -2.2% 0.0% -9.7% -9.7% 0.0% ... fasta -0.7% -0.0% +10.9% +10.9% 0.0% ... kahan +0.6% +38.9% 0.169 0.169 0.0% ... lcss -0.7% -0.0% -6.4% -6.4% 0.0% ... mandel +1.6% +33.6% 0.049 0.049 0.0% ... pidigits +0.8% +8.5% +3.9% +3.9% 0.0% power +1.4% -23.8% -18.6% -18.6% -16.7% ... primetest +1.3% +50.1% 0.085 0.085 0.0% ... rsa +1.6% +53.4% 0.026 0.026 0.0% ... scs +1.2% +6.6% +6.5% +6.6% +14.3% ... symalg +1.0% +9.5% 0.010 0.010 0.0% ... transform -0.6% -0.0% -5.9% -5.9% 0.0% ... ------------------------------------------------------------------ Min -2.3% -23.8% -18.6% -18.6% -16.7% Max +1.6% +53.4% +10.9% +10.9% +14.3% Geometric Mean -0.3% +1.9% -0.8% -0.8% +0.0% (see P35 / https://phabricator.haskell.org/P35 for full report) By default, `INTEGER_LIBRARY=integer-gmp2` is active now, which results in the package `integer-gmp-1.0.0.0` being registered in the package db. The previous `integer-gmp-0.5.1.0` can be restored by setting `INTEGER_LIBRARY=integer-gmp` (but will probably be removed altogether for GHC 7.12). In-tree GMP support has been stolen from the old `integer-gmp` (while unpatching the custom memory-allocators, as well as forcing `-fPIC`) A minor hack to `ghc-cabal` was necessary in order to support two different `integer-gmp` packages (in different folders) with the same package key. There will be a couple of follow-up commits re-implementing some features that were dropped to keep D82 minimal, as well as further clean-ups/improvements. More information can be found via #9281 and https://ghc.haskell.org/trac/ghc/wiki/Design/IntegerGmp2 Reviewed By: austin, rwbarton, simonmar Differential Revision: https://phabricator.haskell.org/D82
* small parser/lexer cleanupYuri de Wit2014-11-071-7/+6
| | | | | | | | | | | | | | | | | | Summary: The last three '#define ...' macros were removed from Parser.y.pp and this file was renamed to Parser.y. This basically got rid of a CPP step in the build. Also converted two modules in compiler/parser/ from .lhs to .hs. Test Plan: Does it build? Yes, I performed a full build here and things are looking good. Reviewers: austin Reviewed By: austin Subscribers: adamse, thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D411
* Implement `MIN_VERSION_GLASGOW_HASKELL()` macroHerbert Valerio Riedel2014-10-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This exposes the `cProjectPatchLevel{1,2}` value at the CPP level to allow it to be used in CPP conditionals. Concretely, GHC 7.10.2.20150623 would result in #define __GLASGOW_HASKELL__ 710 #define __GLASGOW_HASKELL_PATCHLEVEL1__ 2 #define __GLASGOW_HASKELL_PATCHLEVEL2__ 20150623 while GHC 7.10.3 results in #define __GLASGOW_HASKELL__ 710 #define __GLASGOW_HASKELL_PATCHLEVEL1__ 3 and finally GHC 7.9.20141009 results in #define __GLASGOW_HASKELL__ 709 #define __GLASGOW_HASKELL_PATCHLEVEL1__ 20141009 As it's error-prone to properly express CPP conditionals for testing GHC multi-component versions, a new macro `MIN_VERSION_GLASGOW_HASKELL()` is provided (also via the new CPP include file `ghcversion.h`) Finally, in order to make it easier to define the new CPP macro `MIN_VERSION_GLASGOW_HASKELL()`, a new default-included `include/ghcversion.h` is used for the new CPP definitions. Reviewed By: ekmett, austin, #ghc Differential Revision: https://phabricator.haskell.org/D66
* Update Cabal submodule & ghc-pkg to use new module re-export typesEdward Z. Yang2014-09-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The main change is that Cabal changed the representation of module re-exports to distinguish reexports in source .cabal files versus re-exports in installed package registraion files. Cabal now also does the resolution of re-exports to specific installed packages itself, so ghc-pkg no longer has to do this. This is a cleaner design overall because re-export resolution can fail so it is better to do it during package configuration rather than package registration. It also simplifies the re-export representation that ghc-pkg has to use. Add extra ghc-pkg sanity check for module re-exports and duplicates For re-exports, check that the defining package exists and that it exposes the defining module (or for self-rexport exposed or hidden modules). Also check that the defining package is actually a direct or indirect dependency of the package doing the re-exporting. Also add a check for duplicate modules in a package, including re-exported modules. Test Plan: So far the sanity checks are totally untested. Should add some test case to make sure the sanity checks do catch things correctly, and don't ban legal things. Reviewers: austin, duncan Subscribers: angerman, simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D183 GHC Trac Issues:
* Make binary a boot packageDuncan Coutts2014-08-291-1/+1
| | | | Since ghc-pkg needs a relatively recent version.
* Package keys (for linking/type equality) separated from package IDs.Edward Z. Yang2014-08-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch set makes us no longer assume that a package key is a human readable string, leaving Cabal free to "do whatever it wants" to allocate keys; we'll look up the PackageId in the database to display to the user. This also means we have a new level of qualifier decisions to make at the package level, and rewriting some Safe Haskell error reporting code to DTRT. Additionally, we adjust the build system to use a new ghc-cabal output Make variable PACKAGE_KEY to determine library names and other things, rather than concatenating PACKAGE/VERSION as before. Adds a new `-this-package-key` flag to subsume the old, erroneously named `-package-name` flag, and `-package-key` to select packages by package key. RFC: The md5 hashes are pretty tough on the eye, as far as the file system is concerned :( ToDo: safePkg01 test had its output updated, but the fix is not really right: the rest of the dependencies are truncated due to the fact the we're only grepping a single line, but ghc-pkg is wrapping its output. ToDo: In a later commit, update all submodules to stop using -package-name and use -this-package-key. For now, we don't do it to avoid submodule explosion. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, simonmar, hvr, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D80
* Don't clean away inplace/mingw and inplace/perl.niklas2014-07-281-1/+2
| | | | | | Fixes #9362. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Add BUILD_DPH variable to GHC build-systemHerbert Valerio Riedel2014-06-291-3/+13
| | | | | | | | | | | | | | | | | | | Now that the `libraries/dph` submodule is checked out always we need a different way to disable building DPH to save compile-time while developing GHC. This commit adds a new YES/NO Make variable `BUILD_DPH` that can be used inside mk/build.mk to control whether to build libraries/dph or not. The default setting is `BUILD_DPH=YES` (via `mk/config.mk.in`). This also changes `validate`'s flag `--no-dph` to explicitly disable DPH for the current validation run. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org> Test Plan: successful validates with `--fast --no-dph` Differential Revision: https://phabricator.haskell.org/D31
* Ship xhtml, terminfo, haskeline (#8919)Jens Petersen2014-06-091-7/+7
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Remove external coreAustin Seipp2014-05-031-1/+0
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Be more aggressive in `make clean`Herbert Valerio Riedel2014-04-221-0/+8
| | | | | | | | | | This quiets down the utils/testremove/checkremove step Basically the idea is to have 'make clean' remove everything that was generated by `make`, while `make distclean` ought to remove everything created by `./configure`. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Temporarily fight off build bogons on OS XAustin Seipp2014-03-311-1/+1
| | | | | | | Right now there's a bug with Clang that prevents 'cabal haddock' from working nicely. But there's an easy fix for now. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Make distribution tarball compression format configurableHerbert Valerio Riedel2014-02-261-9/+9
| | | | | | | | | | | | | By default, bzip2 compression is selected (which is what has been used till now). Additionally, by setting the TAR_COMP make variable to one of the values "bzip2", "gzip", or "xz", an explicit compression format can be requested for the distribution tarballs. For instance, invoking make TAR_COMP=xz sdist-ghc will result in a tarball `./sdistprep/ghc-7.9.20140226-src.tar.xz` Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Fix #8801: exclude extra packages from the sdist.Austin Seipp2014-02-201-0/+4
| | | | | | | This is special cased a little since it's cleaner, and we don't necessarily want to remove nofib anyway - just the extra packages. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Let `make distclean` remove `/{ch01,ch02,index}.html`Herbert Valerio Riedel2014-02-091-0/+1
| | | | | | | These files are created during `./configure` and therefore by convention are expected to be removed by `make distclean`. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* double-negate test for Stage1Only to fix `make clean`Herbert Valerio Riedel2014-02-091-3/+3
| | | | | | | | This was causing `utils/ghctags/dist-install` to not get removed on `make clean` as `Stage1Only` was unset. So testing for `!= YES` is less fragile than testing for `== NO` in this case. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Individual sdist-foo targetsJoachim Breitner2014-01-311-2/+12
| | | | | so that one can build a source distribution without downloading the windows tarballs.
* No need to remove testsuite/.gitJoachim Breitner2014-01-311-1/+0
| | | | as there is no testsuite/.git any more.
* Fix inplace dynamic linking on OS X (#8266)Christiaan Baaj2014-01-281-5/+0
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix #8675Austin Seipp2014-01-171-2/+0
| | | | | | | | Haddock no longer has a generated parser, so we don't need it in the sdist and we certainly don't want to check for it in the ./configure script (as that would be bogus.) Signed-off-by: Austin Seipp <austin@well-typed.com>
* Clean `.buildinfo` only if `.buildinfo.in` existsHerbert Valerio Riedel2013-10-251-1/+1
| | | | Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Globally replace "hackage.haskell.org" with "ghc.haskell.org"Simon Marlow2013-10-011-4/+4
|
* Cause "make install" to install dynamic libraries (#8194)Bryan O'Sullivan2013-09-151-1/+2
| | | | | | Our special ghc-cabal command needs to be told that we are building with dynamic library support when it does its copying. We do so by passing an extra parameter from ghc.mk.
* Don't delete HsTimeConfig.h.in during distclean.Austin Seipp2013-08-141-1/+1
| | | | | | | | | | | | | | | sdist preps the tree via distclean before anything else, which caused HsTimeConfig.h.in under 'time' to be deleted - even though it should be included in the resulting tarball for ./configure. The correct target is 'maintainer-clean'. I'm guessing the nightlies didn't complain because they run ./boot, forcing regeneration. NixOS's Hydra does not, though. Thanks to Peter Simons and Andres Löh for pointing this out. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Fix Stage1Only: don't build ghctags.Austin Seipp2013-08-141-0/+2
| | | | | | | | | ghctags needs the stage2 compiler, since it uses the GHC API. Fixes #8126. Authored-by: Stephen Blackheath <...@blacksapphire.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Make sdist make a separate tarball for the Windows tarballsIan Lynagh2013-07-301-12/+29
|
* Change the ranlib detectionIan Lynagh2013-07-031-1/+1
| | | | | | | | On Windows, the ranlib in the path may not be the right ranlib (it may be the 32bit ranlib when we are making a Win64 compiler, or vice-versa). Therefore we can't leave it up to libffi to detect the right ranlib, but need to tell it which ranlib to use. This means that we need to find ranlib even if we don't actually need it ourselves.
* Fix the dynmaic library paths in the libs, as well as in the programsIan Lynagh2013-06-221-0/+5
| | | | Part of #7833
* Cleaning fixes, and other build system tweaks; part of #7941Ian Lynagh2013-06-141-4/+11
|
* Don't create mk/stamp-hIan Lynagh2013-06-091-1/+0
| | | | I don't think we are using it for anything any more.
* Rarrange the distclean list; part of #7941Ian Lynagh2013-06-091-7/+41
|
* Change how we check that we have a suitable 'make'Ian Lynagh2013-06-091-0/+17
| | | | We now check in the same way that the testsuite does.
* Remove ghc.specIan Lynagh2013-06-091-2/+1
| | | | | It doesn't look like it would work now, and doesn't really belong in the GHC tree anyway.
* Add an echo target to the build systemIan Lynagh2013-05-251-0/+8
|
* Refer to the wiki page in the "Make has restarted itself n times" errorIan Lynagh2013-05-191-1/+1
| | | | Fixes #7592.
* Stop excluding the dyn way for the dph packages on WindowsIan Lynagh2013-05-141-12/+0
| | | | | Now that we can build the GHC package the dyn way, there's no need to exclude them.
* Simplify ghc-cabalIan Lynagh2013-05-141-2/+2
| | | | | | It now consistently takes directory and distDirectory as its first 2 arguments. Also, it only supports configuring 1 package at a time now (we weren't using the ability to configure more than one at once).
* Merge win:/cygdrive/c/ghc/git/dtIan Lynagh2013-05-121-18/+9
|\
| * More work towards dynamic programs on WindowsIan Lynagh2013-05-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dynamic GHC is now working in-place, but pathologically slow due to the DLL split. (GHC assumes that all intra-package calls are in the same DLL, but that isn't true when we split the GHC package into 2 DLLs. That means that GHC's startup time is around 22 seconds, as it is doing run-time linking). Also, ghci isn't actually working yet: $ inplace/bin/ghc-stage2 --interactive GHCi, version 7.7.20130512: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... <command line>: can't load .so/.DLL for: HSghc-prim-0.3.1.0.dll (addDLL: could not load DLL) ghc-stage2.exe: HSghc-prim-0.3.1.0: The specified module could not be found.
| * We actually need to use -threaded/-debug when linking /all/ DLLsIan Lynagh2013-05-121-18/+0
| | | | | | | | Not just base, integer-gmp and ghc-prim.
* | Some build system tweaksIan Lynagh2013-05-101-2/+2
|/
* Fix dynamically linked GHC on WindowsIan Lynagh2013-05-091-0/+18
| | | | | | | | | This is a rather ugly hack to fix dynamically linked GHC on Windows. If GHC is linked with -threaded, then it links against libHSrts_thr. But if base is linked against libHSrts, then both end up getting loaded, and things go wrong. We therefore link the libraries that link against the RTS with the same RTS flags that we link GHC with.
* Remove some cross-compilation kludgesIan Lynagh2013-04-211-13/+3
| | | | | I don't think these should be necessary. If something breaks as a result then we can look at why.
* Fix typo (spotted by gabor)Ian Lynagh2013-04-201-1/+1
|
* Fix haddockingIan Lynagh2013-04-201-5/+5
| | | | We weren't seting the _DO_HADDOCK variables early enough.
* Remove ghc-pkg from the list of dep files we build during phase 0Ian Lynagh2013-04-201-2/+0
| | | | I don't think it's necessary to build ghc-pkg that early.
* Add deriveConstants to the dep files we build in phase 0Ian Lynagh2013-04-201-0/+15
| | | | | | Dependency problem was discovered by int-e. I've also added some comments about what's going on.
* Follow build system changes in integer-gmpIan Lynagh2013-04-201-0/+2
| | | | Also a couple of other fixes and sanity checks along the way.