summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* cpp: Use #pragma once instead of #ifndef guardsBen Gamari2017-04-23183-742/+191
| | | | | | | | | | | | | | This both says what we mean and silences a bunch of spurious CPP linting warnings. This pragma is supported by all CPP implementations which we support. Reviewers: austin, erikd, simonmar, hvr Reviewed By: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3482
* win32/Ticker: Stop ticker on exitBen Gamari2017-04-231-0/+1
| | | | | | | | | | | | | | | | While debugging an unrelated issue I noticed that we leak a TimerQueueTimer on exit since we don't necessarily call stopTicker before exitTicker. Fix this. Test Plan: Validate on Windows Reviewers: simonmar, austin, erikd Reviewed By: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3477
* ghc.mk: fix 'make install' for cross-mingw32Sergei Trofimovich2017-04-231-1/+1
| | | | | | | | | | | | | | | | Attempt to install cross-compiled mingw32 GHC built on linux failed as: $ make install DESTDIR=$(pwd)/__i__ "mv" "$(pwd)/__i__/usr/local/lib/ghc-8.3.20170422/bin/ghc-stage2" \ "$(pwd)/__i__/usr/local/lib/ghc-8.3.20170422/bin/ghc" mv: failed to stat '$(pwd)/__i__/usr/local/lib/ghc-8.3.20170422/bin/ghc-stage2': \ No such file or directory The rename should not be performed for windows targets. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* ghc: tweak cross-compilation to mingw32Sergei Trofimovich2017-04-231-5/+5
| | | | | | | | | | | | | | | The build failure when cross-compiling from linux to windows looks like: HC [stage 1] ghc/stage2/build/tmp/ghc-stage2.exe Call hs_init_ghc() from your main() function to set these options. /usr/libexec/gcc/i686-w64-mingw32/ld: cannot find -lHSghc-8.3-0 Similar to commit 745032dd02da511067c2939259ed212852187e0f ("rts: tweak cross-compilation to mingw32") decision to split stage2 should be done based based on TargetOS, not HostOS. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Fix compilation for !HAVE_FLOCKHerbert Valerio Riedel2017-04-231-0/+4
|
* Minor reordering of `#include`s fixing compilation on AIXHerbert Valerio Riedel2017-04-233-7/+7
| | | | | | | This helps ensure that system includes on some more fragile platforms (like e.g. AIX) see a more consistent set of CPP defines, and consequently reduce the risk of conflicting typdefs/prototypes being exposed.
* rts: tweak cross-compilation to mingw32Sergei Trofimovich2017-04-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found the problem on x86_64-linux host where I tried to cross-compile GHC to windows as: $ ./configure --target=i686-w64-mingw32 \ Windres=i686-w64-mingw32-windres \ DllWrap=i686-w64-mingw32-dllwrap As a result build failed as POSIX bits of RTS. For example 'rts/posix/OSMem.c' contains unix-specific mmap() syscalls and constants and thus can't be compiled by i686-w64-mingw32 toolchain. It's caused by the following part of 'rts/ghc.mk': ifeq "$(HostOS_CPP)" "mingw32" ALL_DIRS += win32 else ALL_DIRS += posix endif In our case _CPP variables are defined this way (project.mk): BuildOS_CPP = linux HostOS_CPP = linux TargetOS_CPP = mingw32 RTS should never be built for 'BuildOS' or 'HostOS' as it's always built by ghc-stage1 (targeted at TargetOS). The change is to flip 'HostOS_CPP' to 'TargetOS_CPP' in 'rts/ghc.mk'. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* aclocal.m4: treat '*-w64-mingw32' targets as windowsSergei Trofimovich2017-04-231-1/+2
| | | | | | | | Noticed when tried to cross-compile GHC from x86_64-linux to --target=i686-w64-mingw32. Final ghc executables did not have '.exe' extensions. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* configure.ac: print paths to dllwrap and windresSergei Trofimovich2017-04-231-0/+2
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* 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
* skip T13525 when running on Windows.Tamar Christina2017-04-231-1/+1
|
* Haddock submodule update.Edward Z. Yang2017-04-221-0/+0
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Bump time submoduleBen Gamari2017-04-211-0/+0
|
* Bump filepath submoduleBen Gamari2017-04-211-0/+0
|
* Bump deepseeq submoduleBen Gamari2017-04-211-0/+0
|
* base: update comment to match the change from e134af01Andrzej Rybczak2017-04-211-3/+2
| | | | | | | | | | Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3484
* testsuite: Update performance metricsBen Gamari2017-04-211-2/+5
|
* Edit eventlog-formats.rst to match implementationMitsutoshi Aoe2017-04-211-23/+9
| | | | | | | * Add missing filters in EVENT_HEAP_PROF_BEGIN and reorder them * EVENT_HEAP_PROF_SAMPLE_COST_CENTRE isn't used in retainer profiling * Modify EVENT_HEAP_PROF_SAMPLE_STRING's format * Biography break-down isn't implemented
* Sync up terminfo submodule to 0.4.1.0 release tagHerbert Valerio Riedel2017-04-221-0/+0
|
* Build system: fix bindist for cross-build GHCFangrui Song2017-04-212-1/+2
| | | | | | | | | | | | 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>
* Bump haskeline and terminfo submodulesBen Gamari2017-04-211-0/+0
|
* linters/check-cpp: Demote #if lints to warningsBen Gamari2017-04-211-3/+6
| | | | Errors trigger even for lines which the author didn't touch, which is undesired.
* catch the case where there is no symCmdMoritz Angermann2017-04-212-1/+5
| | | | | | | | | | | | | | | | | We do check for symCmd, to set the info->nlist value, but forgot to do the same check for info->names. Thus when trying to extract stroff from symCmd, we hit a segfault. Test Plan: The validation failure on windows is rather suspicious... let's try this one Reviewers: bgamari, adinapoli, austin, erikd, simonmar Reviewed By: adinapoli Subscribers: thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D3468
* Fix build on DragonflyBSDBen Gamari2017-04-212-3/+6
| | | | | | | | | | | | Test Plan: Validate on DragonflyBSD Reviewers: austin, erikd, simonmar Reviewed By: erikd Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3480
* base: Fix hWaitForInput with timeout on POSIXBen Gamari2017-04-213-12/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was previously broken (#13252) by f46369b8a1bf90a3bdc30f2b566c3a7e03672518, which ported the fdReady function from `select` to `poll` and in so doing dropping support for timeouts. Unfortunately, while `select` tells us the amount of time not slept (on Linux anyways; it turns out this is implementation dependent), `poll` does not give us this luxury. Consequently, we manually need to track time slept in this case. Unfortunately, portably measuring time is hard. Ideally we would use `clock_gettime` with the monotonic clock here, but sadly this isn't supported on most versions of Darwin. Consequently, we instead use `gettimeofday`, running the risk of system time changes messing us up. Test Plan: Validate Reviewers: simonmar, austin, hvr Reviewed By: simonmar Subscribers: rwbarton, thomie GHC Trac Issues: #13252 Differential Revision: https://phabricator.haskell.org/D3473
* testsuite: Bump timeout multiplier for T11195Ben Gamari2017-04-211-1/+1
| | | | | | | This test has been occassionally failing on the Darwin build bot for some time now. (cherry picked from commit b3a4dd1152884ff1240824137eca0a49cb6e5a2c)
* base: Fix offset initialization of Windows hLock implementationBen Gamari2017-04-211-3/+2
| | | | | | | | | | | | | | | The previous implementation swapped the buffer size with the byte to be set, essentially resulting in an uninitialized buffer. Test Plan: Validate on Windows Reviewers: austin, hvr Subscribers: rwbarton, thomie GHC Trac Issues: #13599 Differential Revision: https://phabricator.haskell.org/D3478
* Sync up haskeline submodule to 0.7.4.0 release tagHerbert Valerio Riedel2017-04-211-0/+0
|
* utils/debugNCG: remove old toolSergei Trofimovich2017-04-213-445/+0
| | | | | | | | | | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Reviewers: simonmar, austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3476
* pprDebugCLabel: drop duplicate trailing ')'Sergei Trofimovich2017-04-201-2/+2
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* testsuite: disable 'optllvm' for unregisterised compilerSergei Trofimovich2017-04-201-1/+1
| | | | | | | | | | | | | | commit 74615f412ad3de2910a156ff494bfe5497fada7e ("UNREG: ignore -fllvm (Trac #13495)") enabled 'optllvm' tests to be ran in 'make fulltest' mode. As a result many (~1000) tests fail due to stderr misamatch: +when making flags consistent: warning: + Compiler unregisterised, so compiling via C The change removes 'optllvm' tests for unregisterised compiler. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Simplify StgCases when all alts refer to the case binderJoachim Breitner2017-04-182-2/+31
| | | | | | as proposed in #13588. Differential Revision: https://phabricator.haskell.org/D3467
* Revert "linker/mach-o: Catch the case where there is no symCmd"Ben Gamari2017-04-182-5/+1
| | | | | | This causes validation failures on Windows. This reverts commit 6c05b27e5bafe9f232e7014f4760335f5e3ba591.
* Add failing test case for #13588Joachim Breitner2017-04-184-0/+230
|
* Fix LaTeX in core-specJoachim Breitner2017-04-182-1/+1
| | | | | where d49b2bb21691892ca6ac8f2403e31f2a5e53feb3 introduced some TeX breakage, and re-generate core-spec.pdf.
* Update xhtml submodule to potential 3000.2.2 release commitHerbert Valerio Riedel2017-04-181-0/+0
|
* Caret diag.: Avoid decoding whole module if only specific line is neededalexbiehl2017-04-172-15/+52
| | | | | | | | | | | | | | | | | Before we were decoding the whole file to get to the desired line. This patch introduces a fast function which searches a StringBuffer for the desired line so we only need to utf8 decode a little portion. This is especially interesting if we have big modules with lots of warnings. Reviewers: austin, bgamari, Rufflewind, trofi Reviewed By: Rufflewind, trofi Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3440
* Use intersect and minus instead of filterBartosz Nitka2017-04-175-6/+13
| | | | | | | | | | | | | | | These are asymptotically better and convey the intent a bit better. Test Plan: ./validate Reviewers: simonpj, bgamari, austin, goldfire Reviewed By: bgamari Subscribers: rwbarton, thomie, simonmar Differential Revision: https://phabricator.haskell.org/D3455
* Fix "Glasgow Haskell Compiler <release> Users Guide"Bartosz Nitka2017-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | If you go to https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/index.html the window title has `<release>` in it. I don't understand how it all works, but inspired by the line below which produces a correct string in the docs I just blindly changed it in the same way. Cabal appears to have the same problem. Test Plan: it'd be nice if I could check the result on harbormaster, can I? Reviewers: thomie, bgamari, austin Reviewed By: bgamari Subscribers: rwbarton, simonmar Differential Revision: https://phabricator.haskell.org/D3458
* Remove redundant flag (-O) registration (fixes #13392)Santiago Munin2017-04-174-1/+9
| | | | | | | | | | | | Reviewers: austin, bgamari, dfeuer Reviewed By: bgamari, dfeuer Subscribers: rwbarton, thomie GHC Trac Issues: #13392 Differential Revision: https://phabricator.haskell.org/D3461
* [iserv] drop cryptonite dependency.Moritz Angermann2017-04-174-20/+11
| | | | | | | | | | Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3462
* utils: Lazily decode UTF8 stringsBen Gamari2017-04-174-19/+26
| | | | | | | | | | Reviewers: austin, hvr Subscribers: rwbarton, thomie GHC Trac Issues: #13527 Differential Revision: https://phabricator.haskell.org/D3442
* Fix space leak in sortByGregory2017-04-171-3/+6
| | | | | | | | | | | This makes yields a small improvement in sort performance: around 3.5% in runtime on random Ints. Reviewers: austin, hvr, mpickering Subscribers: siddhanathan, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3454
* base: Track timer PSQ timeouts as Word64 instead of DoubleBen Gamari2017-04-177-24/+33
| | | | | | | | | | Test Plan: Validate on all the platforms Reviewers: nh2, hvr, austin Subscribers: Phyx, nh2, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3417
* aclocal.m4: respect user's --with-ar= choiceSergei Trofimovich2017-04-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 'FP_PROG_AR' macro has a minor bug: it ignores already existing value stored in '$fp_prog_ar'. I've noticed it when tried to built UNREG ghc using thin LTO: $ ./configure --enable-unregisterised \ --with-nm=gcc-nm \ --with-ar=gcc-ar \ --with-ranlib=gcc-ranlib \ ./configure refused to use 'gcc-ar' (LTO-aware variant of 'ar') and kept using 'ar'. '$fp_prog_ar' is initialized (in a complex manner) in 'configure.ac' as: FP_ARG_WITH_PATH_GNU_PROG([AR], [ar], [ar]) ArCmd="$AR" fp_prog_ar="$AR" AC_SUBST([ArCmd]) The change keeps that value. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* configure.ac: print resolved 'ar' and 'ranlib' toolsSergei Trofimovich2017-04-171-0/+2
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* hs_add_root() RTS API removalSergei Trofimovich2017-04-1710-100/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Before ghc-7.2 hs_add_root() had to be used to initialize haskell modules when haskell was called from FFI. commit a52ff7619e8b7d74a9d933d922eeea49f580bca8 ("Change the way module initialisation is done (#3252, #4417)") removed needs for hs_add_root() and made function a no-op. For backward compatibility '__stginit_<module>' symbol was not removed. This change removes no-op hs_add_root() function and unused '__stginit_<module>' symbol from each haskell module. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Test Plan: ./validate Reviewers: simonmar, austin, bgamari, erikd Reviewed By: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3460
* UNREG: fix spelling of '-split-objs' in warningSergei Trofimovich2017-04-161-1/+1
| | | | | | | | | Spelling if warning message slightly mismathed passed commandline: $ ghc-stage2 -split-objs -C N.hs on the commandline: warning: ignoring -fsplit-objs Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* UNREG: remove dead code around -split-objsSergei Trofimovich2017-04-163-27/+4
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* rts/RtsUtils.c: drop stale commentsSergei Trofimovich2017-04-161-3/+3
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>