summaryrefslogtreecommitdiff
path: root/mk
Commit message (Collapse)AuthorAgeFilesLines
* 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
* config.mk.in: removed stray HaveLibDL assignmentSergei Trofimovich2017-04-061-2/+0
| | | | | | | | | | | HaveLibDL substitution was removed from configure.ac in 2014 with 9692393d7ba91a091c1e61b6754d79ad17c5f193 commit. Noticed when scrolled through 'config.mk' which contained unsunstituted assignment after './configure' run: HaveLibDL = @HaveLibDL@ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* avoid $(CrossCompilerPrefix) for stage2 installSergei Trofimovich2017-04-061-1/+6
| | | | | | | | | | | | | | Suppose we are crossbuilding ghc (when ghc-stage2 is a normal compiler for $target): For this case 'make install' should install unprefixed stage2 'ghc' and not '$(CorssCompilePrefix)-ghc'. That way cross-built ghc is installable and usable on target as if it would be built natively on a target. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* config.mk.in: remove phase=0 hack for CrossCompilePrefixSergei Trofimovich2017-04-061-4/+0
| | | | | | | | | | $(CrossCompilePrefix) is used only in 'make install' target filenames in $(DESTDIR). None of inplace (or boot) files contain $(CrossCompilePrefix). Thus we don't need to worry about phases. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Revert "Enable new warning for fragile/incorrect CPP #if usage"Ben Gamari2017-04-051-2/+2
| | | | | | | | This is causing too much platform dependent breakage at the moment. We will need a more rigorous testing strategy before this can be merged again. This reverts commit 7e340c2bbf4a56959bd1e95cdd1cfdb2b7e537c2.
* Enable new warning for fragile/incorrect CPP #if usageErik de Castro Lopo2017-04-051-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
* config.mk.in: Add bzip, gzip, and xz executable names to be overriddenBen Gamari2017-03-231-3/+3
| | | | | | | | | | Reviewers: austin, hvr, erikd Reviewed By: erikd Subscribers: rwbarton, thomie, erikd, snowleopard Differential Revision: https://phabricator.haskell.org/D3367
* get-win32-tarballs: More reworking of tarball maintenanceBen Gamari2017-03-092-7/+28
| | | | | This fixes fetching of signatures and sources for inconsistently named msys2 tarballs.
* get-win32-tarballs: Rework handling of hashingBen Gamari2017-03-092-35/+49
| | | | | This pulls out the hashes into a separate file, making them far easier to update.
* get-win32-tarballs: Use haskell.org mirrorBen Gamari2017-03-091-1/+2
|
* Update crt to latest.Tamar Christina2017-03-091-2/+21
| | | | | | | | | | Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: RyanGlScott, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3292
* Add -dno-debug-output to validate GhcStage1HcOptsMatthew Pickering2017-03-061-2/+2
| | | | | | | | | | | | | | | | | | | | This flag only affects whether WARNs are printed to the build log. ASSERT fails will still be printed and cause an abort. Most of the WARNs in the compiler are speculative and meant to help with debugging rather than indicative of any real errors. This causes a lot of noise in the build log which is not helpful and makes them very long. Test Plan: Check that the build log is less than 27000 lines long Reviewers: austin, bgamari, rwbarton Reviewed By: bgamari Subscribers: thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3213
* Add SplitSections = NO to build flavors with SplitObjs = NOReid Barton2017-03-0611-0/+11
| | | | | | | | | | | | Test Plan: harbormaster Reviewers: nomeata, austin, bgamari Reviewed By: bgamari Subscribers: thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3276
* config.mk.in: Disable terminfo support on iOSBen Gamari2017-02-281-3/+6
| | | | | | | | | | Test Plan: Validate Reviewers: angerman, austin, rwbarton Subscribers: thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3242
* Add flag allowing convenient disabling of terminfo supportBen Gamari2017-02-284-0/+12
| | | | | | | | | | | | | This is a common thing that users who cross-compile must fight against. It turns out that it's pretty straightforward to make is convenient. Test Plan: Cross compile without a target `ncurses` available Reviewers: danharaj, hvr, erikd, austin, rwbarton Subscribers: rwbarton, thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3177
* build.mk: Add option for debug symbolsBen Gamari2017-02-201-0/+7
|
* Fix comment (old file names) in mk/ and utils/Takenobu Tani2017-02-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | There ware some old file names (.lhs, ...) at comments. * mk/config.mk.in - compiler/hsSyn/HsExpr.lhs -> HsExpr.hs * utils/ghc-pkg/Main.hs - compiler/main/Packages.lhs -> Packages.hs * utils/genapply/Main.hs - CgRetConv.lhs -> * REMOVE THIS COMMENT (OLDER FILE THAN GHC6) * - Constants.lhs -> Constants.hs - compiler/codeGen/CgCallConv.lhs -> compiler/codeGen/StgCmmLayout.hs - Apply.hc -> Apply.cmm - HeapStackCheck.hc -> HeapStackCheck.cmm Reviewers: mpickering, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3077
* Make split sections by default work againReid Barton2017-02-041-1/+1
| | | | | | | | | | | | | | | | | | Commit 266a9dc4c changed = to := in one place in mk/config.mk.in. This broke SupportsSplitSections because the variable LdIsGNULd that it depends on is not defined until later in the file. Test Plan: pushed to a wip/ branch for perf to build Reviewers: DemiMarie, austin, bgamari, mpickering Reviewed By: mpickering Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D3070 GHC Trac Issues: #13230
* Spelling fixesGabor Greif2017-02-021-1/+1
|
* Turn libraries/integer-gmp/gmp/tarball into a submoduleReid Barton2017-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The submodule repository contains the latest version of the GMP source distribution (6.1.2) with the doc/ subdirectory removed, as described in gmp/ghc.mk. Rather than applying the old patch from gmp/tarball/patch I moved its contents into gmp/gmpsrc.patch, canceling a patch related to memory management there. Experimentally, the PIC-related patch for OS X is still necessary. The upgrade to GMP 6.1.2 fixes #7655. Test Plan: Built on OS X with in-tree gmp and tested that the command `ghc -e 'length (show (2^(5*10^6) :: Integer))'` no longer segfaults. Reviewers: mpickering, hvr, austin, bgamari Reviewed By: bgamari Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D3044 GHC Trac Issues: #7655
* Don't use the splitter on DarwinDemi Obenour2017-01-101-17/+16
| | | | | | | | | | | | Test Plan: GHC CI Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2879
* Testsuite: Skip failing tests on PowerPC 64-bitPeter Trommler2016-12-271-1/+1
| | | | | | | | | | | | | | | | | | | The Power ISA says the result of a division by zero is undefined. So ignore stdout on PowerPC 64-bit systems. Disable ext-interp tests on 64-bit PowerPC. We don't have support for PowerPC 64-bit ELF in the RTS linker, which is needed for the external interpreter. Test Plan: ./validate Reviewers: austin, simonmar, hvr, erikd, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2782
* Enable split sections by default where possibleSimon Brenner2016-12-161-5/+16
| | | | | | | | | | | | | | | On non-windows platforms with GNU ld, enable SplitSections in the GHC build by default. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: DemiMarie, thomie Differential Revision: https://phabricator.haskell.org/D1800 GHC Trac Issues: #11445
* Adds llvm-prof flavourMoritz Angermann2016-12-152-0/+15
| | | | | | | | | | Reviewers: austin, bgamari, RyanGlScott Reviewed By: bgamari, RyanGlScott Subscribers: RyanGlScott, thomie Differential Revision: https://phabricator.haskell.org/D2824
* mk/config.mk.in: enable SMP on ARMv7+ (Trac #12981)Sergei Trofimovich2016-12-151-1/+1
| | | | | | | | | | | | | | | Before the change result of expression ArchSupportsSMP="$(if $(filter $(ARM_ISA),ARMv5 ARMv6),NO,YES)" to evaluate to ArchSupportsSMP="YES" After the change it's ArchSupportsSMP=YES Thanks to orion for the fix! Fixes Trac #12981 Signed-off-by: Sergei Trofimovich <siarheit@google.com>
* Note Trac #12141 in mk/build.mk.sampleRyan Scott2016-12-021-1/+2
| | | | | Mention that many GHC testsuite tests will fail with a compiler built with the quickest profile. See Trac #12141.
* Update Mingw-w64 bindist for WindowsTamar Christina2016-11-291-20/+45
| | | | | | | | | | | | | | | | | This updates the binary dists for windows to GCC 6.2.0 and binutils 2.27.2 which has fixes required for LLVM. Test Plan: ./validate Reviewers: simonmar, erikd, austin, bgamari Reviewed By: simonmar, bgamari Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2749 GHC Trac Issues: #12871, #8974
* configure: Pass HC_OPTS_STAGEx to build systemBen Gamari2016-11-101-0/+3
| | | | | | | | | | Test Plan: Try `./configure HC_OPTS_STAGE0=-foobar` and watch it fail Reviewers: austin, hvr Subscribers: thomie, erikd Differential Revision: https://phabricator.haskell.org/D2674
* Kill vestiages of DEFAULT_TMPDIRBen Gamari2016-09-011-15/+0
| | | | | | | | | | | | | | | | | It was removed long ago in cf403b50900648063d99afa160d2091a7d6f58c1. Thanks for @rwbarton for catching this. Updates nofib submodule. Test Plan: Validate Reviewers: austin, rwbarton Subscribers: thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D2493 GHC Trac Issues: #12443
* Log heap profiler samples to event logBen Gamari2016-07-162-26/+46
| | | | | | | | | | | | Test Plan: Try it Reviewers: hvr, simonmar, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1722 GHC Trac Issues: #11094
* Don't error on GCC inlining warning in rtsBartosz Nitka2016-06-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The warning for reference: ``` rts/RaiseAsync.c: In function ‘throwToMsg’: rts/SMPClosureOps.h:65:0: error: error: inlining failed in call to ‘lockClosure’: call is unlikely and code size would grow rts/RaiseAsync.c:305:0: error: error: called from here rts/SMPClosureOps.h:65:0: error: error: inlining failed in call to ‘lockClosure’: call is unlikely and code size would grow ``` This warning triggers on `gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)` and it doesn't trigger with new GCCs. Test Plan: build ghc/rts Reviewers: bgamari, simonmar, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2353
* Fix detection and use of `USE_LIBDW`Erik de Castro Lopo2016-06-011-1/+1
| | | | | | | | | | | | Test Plan: Configure/build with and without --enable-libdw Reviewers: trofi, hvr, austin, simonmar, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2276
* Suppress the warning about __sync_fetch_and_nand (#9678)Thomas Miedema2016-05-242-0/+6
|
* Comments onlyErik de Castro Lopo2016-05-101-0/+2
| | | | [skip ci]
* Warn about simplifiable class constraintsSimon Peyton Jones2016-04-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provoked by Trac #11948, this patch adds a new warning to GHC -Wsimplifiable-class-constraints It warns if you write a class constraint in a type signature that can be simplified by an existing instance declaration. Almost always this means you should simplify it right now; type inference is very fragile without it, as #11948 shows. I've put the warning as on-by-default, but I suppose that if there are howls of protest we can move it out (as happened for -Wredundant-constraints. It actually found an example of an over-complicated context in CmmNode. Quite a few tests use these weird contexts to trigger something else, so I had to suppress the warning in those. The 'haskeline' library has a few occurrences of the warning (which I think should be fixed), so I switched it off for that library in warnings.mk. The warning itself is done in TcValidity.check_class_pred. HOWEVER, when type inference fails we get a type error; and the error suppresses the (informative) warning. So as things stand, the warning only happens when it doesn't cause a problem. Not sure what to do about this, but this patch takes us forward, I think.
* Make it easy to get hyperlinked sourcesBartosz Nitka2016-04-181-0/+4
| | | | | | | | | | | | | | | | | | | | | The version of `haddock` that ghc has as a submodule has an option for generating linkified sources. I don't think it hurts to have this and they are great for exploring the codebase. I'd be nice if harbormaster or travis published them somewhere, but I don't know how to do that yet. Test Plan: uncomment, run `make` and look at the nicely linkified sources in `compiler/stage2/doc/html/ghc/` Reviewers: hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie, simonmar Differential Revision: https://phabricator.haskell.org/D2119
* Silence unused-import warning introduced by 93d85af9fec968bHerbert Valerio Riedel2016-04-171-0/+1
|
* Rework CC/CC_STAGE0 handling in `configure.ac`Herbert Valerio Riedel2016-04-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than using the non-standard/idiomatic `--with-{gcc,clang}=...` scheme use the `CC=...` style scheme. The basic idea is to have Autoconf's CC/CFLAG/CPPFLAG apply to stage{1,2,3}, while having a separate _STAGE0 set of env-vars denote the bootstrap-toolchain flags/programs. This should be simpler, less confusing, and somewhat more in line with Autoconf's idioms (allowing us to reuse more of Autoconf rather than (re)inventing our own confusing non-standard m4 macros to do stuff that Autoconf could almost do already for us) Morever, expose CC_STAGE0 as a so-called "precious" variable. So now we can better control which bootstrapping gcc is used (by default the one used by the stage0 ghc, unless CC_STAGE0 is overriden) ``` Some influential environment variables: CC_STAGE0 C compiler command (bootstrap) CC C compiler command CFLAGS C compiler flags ... Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. ``` Test Plan: I've tested that cross-compiling with `--target=powerpc-linux-gnu` still works, and tried a few variants of settting `CC=` and `CC_STAGE0=`; `./validate` passed as well Reviewers: erikd, austin, bgamari, simonmar Reviewed By: simonmar Subscribers: Phyx, thomie Differential Revision: https://phabricator.haskell.org/D2078
* Remove now obsolete LD_STAGE0 hackHerbert Valerio Riedel2016-03-271-3/+1
| | | | | | | This was introduced in 109a1e53287f50103e8a5b592275940b6e3dbb53 but isn't needed anymore because by now we're bootstrapping with GHC versions which already provide "ld command" in `ghc --info` (that field was added in GHC 7.8)
* Add NCG support for AIX/ppc32Herbert Valerio Riedel2016-03-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This extends the previous work to revive the unregisterised GHC build for AIX/ppc32. Strictly speaking, AIX runs on POWER4 (and later) hardware, but the PPC32 instructions implemented in the PPC NCG represent a compatible subset of the POWER4 ISA. IBM AIX follows the PowerOpen ABI (and shares many similiarites with the Linux PPC64 ELF V1 NCG backend) but uses the rather limited XCOFF format (compared to ELF). This doesn't support dynamic libraries yet. A major limiting factor is that the AIX assembler does not support the `@ha`/`@l` relocation types nor the ha16()/lo16() functions Darwin's assembler supports. Therefore we need to avoid emitting those. In case of numeric literals we simply compute the functions ourselves, while for labels we have to use local TOCs and hope everything fits into a 16bit offset (for ppc32 this gives us at most 16384 entries per TOC section, which is enough to compile GHC). Another issue is that XCOFF doesn't seem to have a relocation type for label-differences, and therefore the label-differences placed into tables-next-to-code can't be relocated, but the linker may rearrange different sections, so we need to place all read-only sections into the same `.text[PR]` section to workaround this. Finally, the PowerOpen ABI distinguishes between function-descriptors and actualy entry-point addresses. For AIX we need to be specific when emitting assembler code whether we want the address of the function descriptor `printf`) or for the entry-point (`.printf`). So we let the asm pretty-printer prefix a dot to all emitted subroutine calls (i.e. `BL`) on AIX only. For now, STG routines' entry-point labels are not prefixed by a label and don't have any associated function-descriptor. Reviewers: austin, trommler, erikd, bgamari Reviewed By: trommler, erikd, bgamari Differential Revision: https://phabricator.haskell.org/D2019
* Update transformer submodule to v0.5.2.0 releaseHerbert Valerio Riedel2016-02-261-0/+1
| | | | | | | Most notably, this update pulls in documentation improvements and several INLINE pragmas for significant performance gains[1]. [1]: https://groups.google.com/d/msg/haskell-cafe/SUKtkDI84EE/fXMBd-jNDQAJ
* Early error when crosscompiling + haddock/docsThomas Miedema2016-02-0914-14/+0
| | | | | | | | | | | | | | | | | | | | When CrossCompiling=YES or Stage1Only=YES, building the haddocks and the User's Guide should be skipped, because haddock and mkUserGuidePart depend on the GHC API. See Note [No stage2 packages when CrossCompiling or Stage1Only] for details. There are several places in the build system where the variables HADDOCK_DOCS and BUILD_SPHINX_* are checked. Instead of also checking for the variables CrossCompiling or Stage1Only in all those places, `make` will now exit with a nice error message when the user requests the impossible. Reviewers: rwbarton, austin, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1882
* validate: enable -DDEBUG in stage 1 by defaultÖmer Sinan Ağacan2016-02-071-1/+1
| | | | | | | | | | | | | | | | | | Since the whole point of validation is to test the compiler, assertions should be enabled at least for some part of the build. Previously assertions were only enabled (1) in stage 2 compiler (2) when "slow" setting is used. With this patch we enable assertions in stage 1 compiler in all settings, to test them on (1) the compiler itself (2) the libraries, even with the "fast" setting. This will make "fast" setting slower, but the difference should be quite modest - I didn't realize a significant difference in validation times. Reviewers: bgamari, austin, thomie Reviewed By: thomie Differential Revision: https://phabricator.haskell.org/D1890