summaryrefslogtreecommitdiff
path: root/mk
Commit message (Collapse)AuthorAgeFilesLines
* Update Wiki URLs to point to GitLabTakenobu Tani2019-03-255-6/+6
| | | | | | | | | | | | | | | | | | | | | | | This moves all URL references to Trac Wiki to their corresponding GitLab counterparts. This substitution is classified as follows: 1. Automated substitution using sed with Ben's mapping rule [1] Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy... New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy... 2. Manual substitution for URLs containing `#` index Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...#Zzz New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...#zzz 3. Manual substitution for strings starting with `Commentary` Old: Commentary/XxxYyy... New: commentary/xxx-yyy... See also !539 [1]: https://gitlab.haskell.org/bgamari/gitlab-migration/blob/master/wiki-mapping.json
* gitlab-ci: Explicitly set bindist tarball nameBen Gamari2019-03-161-6/+6
|
* Update Trac ticket URLs to point to GitLabRyan Scott2019-03-153-3/+3
| | | | | This moves all URL references to Trac tickets to their corresponding GitLab counterparts.
* Rip out perl dependencyBen Gamari2019-03-093-3/+0
| | | | | | The object splitter was the last major user of perl. There remain a few uses in nofib but we can just rely on the system's perl for this since it's not critical to the build.
* Rip out object splittingBen Gamari2019-03-0519-49/+1
| | | | | | | | | | | | | | | The splitter is an evil Perl script that processes assembler code. Its job can be done better by the linker's --gc-sections flag. GHC passes this flag to the linker whenever -split-sections is passed on the command line. This is based on @DemiMarie's D2768. Fixes Trac #11315 Fixes Trac #9832 Fixes Trac #8964 Fixes Trac #8685 Fixes Trac #8629
* gitlab-ci: Produce DWARF-enabled binary distributionBen Gamari2019-03-011-0/+14
|
* Expression/command ambiguity resolutionVladislav Zavialov2019-02-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes 'HsArrApp' and 'HsArrForm' from 'HsExpr' by introducing a new ambiguity resolution system in the parser. Problem: there are places in the grammar where we do not know whether we are parsing an expression or a command: proc x -> do { (stuff) -< x } -- 'stuff' is an expression proc x -> do { (stuff) } -- 'stuff' is a command Until we encounter arrow syntax (-<) we don't know whether to parse 'stuff' as an expression or a command. The old solution was to parse as HsExpr always, and rejig later: checkCommand :: LHsExpr GhcPs -> P (LHsCmd GhcPs) This meant polluting 'HsExpr' with command-related constructors. In other words, limitations of the parser were affecting the AST, and all other code (the renamer, the typechecker) had to deal with these extra constructors by panicking. We fix this abstraction leak by parsing into an intermediate representation, 'ExpCmd': data ExpCmdG b where ExpG :: ExpCmdG HsExpr CmdG :: ExpCmdG HsCmd type ExpCmd = forall b. ExpCmdG b -> PV (Located (b GhcPs)) checkExp :: ExpCmd -> PV (LHsExpr GhcPs) checkCmd :: ExpCmd -> PV (LHsCmd GhcPs) checkExp f = f ExpG -- interpret as an expression checkCmd f = f CmdG -- interpret as a command See Note [Ambiguous syntactic categories] for details. Now the intricacies of parsing have no effect on the hsSyn AST when it comes to the expression/command ambiguity. Future work: apply the same principles to the expression/pattern ambiguity.
* Turn on -Wno-unused-imports in make build systemMatthew Pickering2019-02-021-0/+3
| | | | This mirrors Hadrian and it good enough to get us unstuck.
* Use O2 on stage1 for faster overall build times with make.klebinger.andreas@gmx.at2019-01-319-9/+9
| | | | | | | | | | | | | | Build times when using the quick flavour: stage1 opt | time (wall) | time (user) -O1 | 13m | 53m -O2 | 13m | 51m So even when we compile stage2 with -O0 (quick) using -O2 on stage1 is already faster. The difference is even bigger when freezing stage1 and doing multiple builds or compiling stage2 with optimizations.
* Hadrian: support in-tree GMPAlec Theriault2019-01-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: This adds top-level configure flags '--with-intree-gmp' and '--with-framework-preferred', both of which are especially relevant on MacOS. Besides gaining two new flags, Hadrian also had to be taught what to do with the 'framework' in .cabal files. Test Plan: ./boot && ./configure --with-intree-gmp && ./hadrian/build.sh ./boot && ./configure --with-gmp-framework-preferred && ./hadrian/build.sh # on macos Reviewers: carter, snowleopard, alpmestan, hvr, goldfire, bgamari Subscribers: rwbarton, erikd GHC Trac Issues: #16001 Differential Revision: https://phabricator.haskell.org/D5417
* Remove warnings-silencing flags for code generated by AlexSimon Jakobi2018-11-221-3/+0
| | | | | | | | | | | | | | | | | | Current versions of Alex don't seem to produce as many warnings any more. In order to silence a warning and to avoid overlong lines, I've taken the liberty of refactoring 'tok_num'. Test Plan: ./validate Reviewers: bgamari, simonmar Reviewed By: simonmar Subscribers: erikd, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5319
* Build debugged prof runtimesÖmer Sinan Ağacan2018-09-101-0/+1
| | | | | | | | | | | | | For some reason these were disabled. I find these quite useful when debugging profiling issues, so enable them again. Reviewers: bgamari, simonmar Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5140
* function-section: enable on windowsTamar Christina2018-08-211-1/+1
| | | | | | | | | | | | | | | | | gc-sections was onced observed to be slow on Windows, which is the only reason it's not enabled yet. However, it seems to be better now. Test Plan: ./validate Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15051 Differential Revision: https://phabricator.haskell.org/D4916
* Allow arbitrary options to be passed to tar compressionBen Gamari2018-08-081-3/+3
|
* Make :doc work for the ghc librarySimon Jakobi2018-07-271-2/+5
| | | | | | | | | | | | | | | | | We already include -haddock in the GhcLibHcOpts in order to include the boot libraries' docs in their .hi-files. By including -haddock in the GhcStage2HcOpts and GhcStage3HcOpts, we make the docs for the ghc library also available to the GHCi :doc command. Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4913
* circleci: Detect core countBen Gamari2018-07-061-0/+26
| | | | | | | | | | | | | | | Test Plan: Try `./validate`, CircleCI build; make sure core count detection works in both cases. Reviewers: alpmestan Reviewed By: alpmestan Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14470 Differential Revision: https://phabricator.haskell.org/D4897
* Remove BUILD_DPH, not usedKrzysztof Gogolewski2018-07-062-5/+0
|
* Serialize docstrings to ifaces, display them with new GHCi :doc commandSimon Jakobi2018-06-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | If `-haddock` is set, we now extract docstrings from the renamed ast and serialize them in the .hi-files. This includes some of the changes from D4749 with the notable exceptions of the docstring lexing and renaming. A currently limited and experimental GHCi :doc command can be used to display docstrings for declarations. The formatting of pretty-printed docstrings is changed slightly, causing some changes in testsuite/tests/haddock. Test Plan: ./validate Reviewers: alexbiehl, hvr, gershomb, harpocrates, bgamari Reviewed By: alexbiehl Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4758
* `--via-asm` only for windows targetsMoritz Angermann2018-03-061-2/+6
| | | | | | | | | | Reviewers: trofi, bgamari Reviewed By: trofi, bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4467
* Compile with `--via-asm` when cross compiling.Moritz Angermann2018-03-021-2/+6
| | | | | | | | | | | | | | | | | | | This bumps `hsc2hs` and adds the new `--via-asm` flag, which allows to successfully cross compile the win32 lirbary. - Compile with `--via-asm` when cross compiling. This requires haskell/hsc2hs#5 (https://github.com/haskell/hsc2hs/pull/5) Test Plan: ./validate Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4439
* Adds *-cross-ncg flavour.Moritz Angermann2018-03-024-4/+63
| | | | | | | | | | | | | | | Our *-cross flavours force -fllvm, this adds flavours for cross compilation to x86_64, where we can use our native code generator. Test Plan: ./validate Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4443
* Don't use ld.gold when building libraries for GHCiSimon Marlow2018-02-211-0/+1
| | | | | | | | | | | | | | | | | | | Summary: ld.gold is buggy when using -r and a linker script. See upstream bug https://sourceware.org/bugzilla/show_bug.cgi?id=22266 This has been causing various brokenness for the GHC runtime linker, where we load these broken object files. Test Plan: Test program from #14675 Reviewers: bgamari, RyanGlScott, alpmestan, hvr, erikd Subscribers: rwbarton, thomie, erikd, carter GHC Trac Issues: #14328, #14675, #14291 Differential Revision: https://phabricator.haskell.org/D4431
* ghc-prim: Emulate C11 atomics when not availableBen Gamari2018-02-032-1/+4
| | | | | | | | | | | | | | | | | | GCC's __sync primitives apparently "usually" imply a full barrier, meaning they can be used to emulate the more precise C11 atomics albeit with a loss of efficiency. This restores compatibility with GCC 4.4. This partially reverts commit 59de290928e6903337f31c1f8107ac8a98ea145d. Test Plan: Validate on Centos Reviewers: hvr, simonmar, trommler Subscribers: rwbarton, thomie, erikd, carter GHC Trac Issues: #14244 Differential Revision: https://phabricator.haskell.org/D4364
* Typos in commentsGabor Greif2018-01-171-2/+2
|
* Windows: Bump to GCC 7.2 for GHC 8.4Tamar Christina2017-11-112-40/+39
| | | | | | | | | | | | | | | | | | | | | | GHC 8.4 is expected to ship with an updated GCC bindist based on GCC 7.2. I am however at this time not updating the crt due to an issue introduced in September. https://sourceforge.net/p/mingw-w64/mailman/message/36085637/ Unless a favorable fix comes out of the discussion I will just ship the old crt with GHC 8.4. Test Plan: ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D4125
* Update autoconf test for gcc to require 4.7 and upPeter Trommler2017-11-062-8/+1
| | | | | | | | | | | | | | | | | | | Fixing #14244 required the newer gcc atomic built-ins that are provided from 4.7 and up. This updates the test to check for minimum gcc version 4.7. The version tests for 3.4 (!), 4.4, and 4.6 are no longer needed and can be removed. This makes the build system simpler. Test Plan: validate Reviewers: austin, bgamari, hvr, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D4165
* Bump haddock submodulealexbiehl2017-11-021-1/+1
| | | | | | | | Reviewers: austin, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4144
* Windows: Update the mirror script to generate hashes and use mirror fallbackTamar Christina2017-10-251-6/+24
| | | | | | | | | | | | | | | | | | | | | This fixes the mirror script so it correctly queries haskell.org and if packages aren't found check repo.msys2.org. Also the mirror functionality now generates the md5 hashes after a mirror fetch that can be placed in the md5sums file. Test Plan: mk/get-win32-tarballs.sh fetch mirror and ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4118
* Revert "Windows: Bump to GCC 7.2 for GHC 8.4"Tamar Christina2017-10-252-39/+40
| | | | This reverts commit b62097d10e0ff490f862661a24e3ca1cc1bba841.
* Windows: Bump to GCC 7.2 for GHC 8.4Tamar Christina2017-10-252-40/+39
| | | | | | | | | | | | | | | | | | | Summary: GHC 8.4 is expected to ship with an updated GCC bindist based on GCC 7.2. I am however at this time not updating the crt due to an issue introduced in september. https://sourceforge.net/p/mingw-w64/mailman/message/36085637/ Unless a favorable fix comes out of the discussion I will just ship the old crt with GHC 8.4. Test Plan: ./validate Reviewers: austin, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4119
* configure: Don't hard-code strip toolBen Gamari2017-09-251-1/+1
| | | | | | | | | | | | | | For reasons that I don't entirely understand we didn't previously detect `strip` using autoconf. This naturally broke during cross-compilation. How did this ever work? I have no idea. Test Plan: Try cross-compiling Reviewers: austin, hvr, angerman Subscribers: rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D4008
* Remove makefile logic for legacy -this-package-keyHerbert Valerio Riedel2017-09-091-2/+0
| | | | | | This isn't needed anymore as we don't support GHC < 8 anymore. This is a follow-up to 122f183
* Clean up opt and llcMoritz Angermann2017-09-061-0/+1
| | | | | | | | | | | | | | | | | | | | | The LLVM backend shells out to LLVMs `opt` and `llc` tools. This clean up introduces a shared data structure to carry the arguments we pass to each tool so that corresponding flags are next to each other. It drops the hard coded data layouts in favor of using `-mtriple` and have LLVM infer them. Furthermore we add `clang` as a proper tool, so we don't rely on assuming that `clang` is called `clang` on the `PATH` when using `clang` as the assembler. Finally this diff also changes the type of `optLevel` from `Int` to `Word`, as we do not have negative optimization levels. Reviewers: erikd, hvr, austin, rwbarton, bgamari, kavon Reviewed By: kavon Subscribers: michalt, Ericson2314, ryantrinkle, dfeuer, carter, simonpj, kavon, simonmar, thomie, erikd, snowleopard Differential Revision: https://phabricator.haskell.org/D3352
* get-win32-tarballs: Use correct `find`Ben Gamari2017-09-051-3/+6
| | | | | | | | | | | | | | | | | This fixes #12502 by using the `find` utility found by FP_PROG_FIND instead of the first one in PATH. Test Plan: Validate on Windows Reviewers: Phyx, austin, hvr Reviewed By: Phyx Subscribers: rwbarton, thomie, erikd GHC Trac Issues: #12502 Differential Revision: https://phabricator.haskell.org/D3907
* get-win32-tarballs: Use bash, not shBen Gamari2017-09-051-1/+1
| | | | | | | | | | | | | The script appears to use the local keyword, which I'm fairly certain is a feature of bash and not sh. Reviewers: Phyx, austin Reviewed By: Phyx Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3906
* Enable -Wcpp-undef for GHC and runtime systemBen Gamari2017-08-181-3/+8
| | | | | | | | | | | | | | | | This gets us much of the benefit of enabling it globally, which avoiding (at least for now) the pain of making the core libraries build as well. See #13636. Test Plan: Validate Reviewers: erikd, austin Subscribers: rwbarton, thomie GHC Trac Issues: #13636 Differential Revision: https://phabricator.haskell.org/D3517
* Enable building Cabal with parsecHerbert Valerio Riedel2017-08-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cabal's parser has been rewritten in terms of Parsec (which is not enabled yet in Cabal-2.0 by default, but can be enabled by a cabal flag). The plan for Cabal is to drop support for the non-parsec parser, so we need to prepare GHC to cope with new situation. However, this means that lib:Cabal requires three new library dependency submodules, - parsec - text - mtl What complicates matters is that we need to build `ghc-cabal` early on during the bootstrap phase which currently needs to invoke `ghc --make` directly. So these additional dependencies need to be integrated into the monolithic `ghc --make` invocation which produces the `ghc-cabal` executable. Test Plan: `./validate --fast` passed Reviewers: austin, bgamari Subscribers: erikd, phadej, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3757
* [skip ci] Temporarily disable split-sections on Windows.Tamar Christina2017-07-131-2/+3
| | | | | | | | | | | | | | | | | | | | | Summary: This temporarily disabled split-sections again on Windows because of the overhead in linking it introduces. Unfortunately because BFD is so slow a testsuite run gets almost 2x slower. Simply linking Hello World takes an unacceptable long time. So for now, it'll be disabled as we look into different linkers such as LLD. Test Plan: ./validate Reviewers: austin, bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #12913 Differential Revision: https://phabricator.haskell.org/D3731
* Implement split-sections support for windows.Tamar Christina2017-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Initial implementation of split-section on Windows. This also corrects section namings and uses the platform convention of `$` instead of `.` to separate sections. Implementation is based on @awson's patches to binutils. Binutils requires some extra help when compiling the libraries for GHCi usage. We drop the `-T` and use implicit scripts to amend the linker scripts instead of replacing it. Because of these very large GHCi object files, we need big-obj support, which will be added by another patch. Test Plan: ./validate Reviewers: awson, austin, bgamari Subscribers: dfeuer, rwbarton, thomie, snowleopard, #ghc_windows_task_force GHC Trac Issues: #12913 Differential Revision: https://phabricator.haskell.org/D3383
* configure: Remove --with-curses-includes flagBen Gamari2017-07-031-1/+0
| | | | | | | | | | | terminfo no longer needs to be able to find the ncurses headers. See https://github.com/judah/terminfo/pull/22. Reviewers: austin, hvr Subscribers: rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D3688
* Typos in comments and manual [ci skip]Gabor Greif2017-05-231-3/+3
|
* mk/config.mk.in: lower -O2 optimization down to -O1 on UNREGSergei Trofimovich2017-05-231-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not a new behaviour. First it was introduced by 2d5372cfdc2236a77ec49df249f3379b93224e06 ("lower -O2 optimization down to -O1 on UNREG") to fix build failure on unregisterised powerpc64. This time I've noticed build failures on unregisterised ia64. The change was accidentally reverted by commit 14d0f7f1221db758cd06a69f53803d9d0150164a ("Build system: Add stage specific SRC_HC_(WARNING_)OPTS) The revert happened due to the following code rearrangement: ifeq "$(GhcUnregisterised)" "YES" GhcStage1HcOpts= GhcStage2HcOpts= GhcStage3HcOpts= endif GhcUnregisterised=@Unregisterised@ As a result 'ifeq' part has no effect. The change moves 'ifeq' down to the very end of file and adds a note it depends on the 'GhcUnregisterised' variable. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Pass LLVMTarget (identical to --target)Moritz Angermann2017-05-111-18/+19
| | | | | | | | | | | | | | | | Sometimes it might be of interest to have access to the raw target value when calling subcommands (e.g. llvm tools with --target), as such we forward the specified (or inferred) --target for later consumption. Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D3559
* Disable -Wcpp-undef for nowBen Gamari2017-04-301-2/+2
| | | | | We at very least need to upstream a patch for the time submodule to compile on OS X.
* Enable new warning for fragile/incorrect CPP #if usageErik de Castro Lopo2017-04-281-2/+2
| | | | | | | | | | | | | | | | The C code in the RTS now gets built with `-Wundef` and the Haskell code (stages 1 and 2 only) with `-Wcpp-undef`. We now get warnings whereever `#if` is used on undefined identifiers. Test Plan: Validate on Linux and Windows Reviewers: austin, angerman, simonmar, bgamari, Phyx Reviewed By: bgamari Subscribers: thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3278
* get-win32-tarballs: Grab perl tarball from haskell.org, not GitHubBen Gamari2017-04-281-1/+1
| | | | | | | | | | Reviewers: austin, dfeuer Reviewed By: dfeuer Subscribers: Phyx, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3509
* Add backup url and sync support for Win32 tarball scriptTamar Christina2017-04-251-13/+59
| | | | | | | | | | | | | | | | | | | | | This imports @bgamari's sync script into the mirror script and adds a backup url for packages. The idea is that the URLs won't need updating when updating the tarballs from now on. It will first try haskell.org, failing that it'll try repo.msys2.org Test Plan: try new command `mk/get-win32-tarballs.sh sync` Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, bgamari Differential Revision: https://phabricator.haskell.org/D3488
* First update mingw-w64 packages for 8.4Tamar Christina2017-04-232-49/+49
| | | | | | | | | | | | | | | | Summary: Updating to get latest binutils etc. Test Plan: ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, snowleopard GHC Trac Issues: #12913 Differential Revision: https://phabricator.haskell.org/D3382
* Build system: fix bindist for cross-build GHCFangrui Song2017-04-211-0/+1
| | | | | | | | | | | | The change fixes case of installing cross-built GHC from bindist (BINDIST=YES) on TARGET. In this case we need to use TARGET tools in `INSTALLED_GHC{,_PKG}_REAL`. The original change is provided by Fangrui Song as pull request https://github.com/ghc/ghc/pull/34 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Remove GhcDynamic (in favor of DYNAMIC_GHC_PROGRAMS)Reid Barton2017-04-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | DYNAMIC_GHC_PROGRAMS and GhcDynamic both tried to control whether the ghc binary was built as a dynamic executable, with confusing results. In particular, setting GhcDynamic=NO has no effect on systems where DYNAMIC_GHC_PROGRAMS defaults to YES. DYNAMIC_GHC_PROGRAMS is more fully-featured (it ensures that the correct flavor of the libraries is built, for example) so let's keep it and remove GhcDynamic to reduce confusion. This effectively reverts commit 3c6190b0. Test Plan: tested locally; harbormaster Reviewers: simonmar, austin, bgamari Reviewed By: bgamari Subscribers: thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3428