summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* WIP: local random AIX hackswip/ghc710-aixHerbert Valerio Riedel2015-11-174-3/+40
|
* Set `THREAD_SAFE` CPP macro for AIXHerbert Valerio Riedel2015-11-171-2/+3
| | | | | The most important effect of this macro is unlocking a thread-safe `errno` which is essential for the threaded runtime.
* Make `timer_create(CLOCK_REALTIME)` autoconf test more reliableHerbert Valerio Riedel2015-11-171-4/+5
| | | | | | | | | | | | | | | | | | | | | I've noticed that on a platform with a coarse timer/scheduling granularity of 10ms this autoconf tests fails to detect a working `timer_create(CLOCK_REALTIME)`. On AIX, this effectively means that intervals/timers are rounded up to multiples of 10ms, so a 13ms delay is effectively a 20ms delay. By using a 100ms timeout we are on the safe side. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie, erikd Differential Revision: https://phabricator.haskell.org/D1483 (cherry picked from commit 8ad9e74f1f88d5c86d2e76f9992f9b2d267421d3)
* Update unix submodule to pull in AIX fixesHerbert Valerio Riedel2015-11-171-0/+0
|
* We need to use -mminimal-toc on IBM AIXHerbert Valerio Riedel2015-11-162-0/+14
| | | | | | | | | AIX's XCOFF is limited to 16k entries in its TOC for 32bit compilation, which quickly overflows with GHC's code generation. Otoh, the Parser.hs module contains more entries than fit into a minimal-toc, so we need to switch back to `-mfull-toc` for that single module again.
* On AIX we need -D_BSD defined in <Stg.h>Herbert Valerio Riedel2015-11-161-0/+5
| | | | | otherwise <math.h> includes <stdlib.h> which breaks compilation of .hc files
* Make GHC aware of OSAIX and AixLDHerbert Valerio Riedel2015-11-164-2/+15
|
* Workaround broken latin1 iconv on AIXHerbert Valerio Riedel2015-11-161-0/+2
|
* backported AIX tweaks to CabalHerbert Valerio Riedel2015-11-161-0/+0
|
* PPC nativeGen: fix shift right arithmetic > 31 bitPeter Trommler2015-11-111-0/+2
| | | | | | | | | | Arithmetic shift right of more than 31 bits yields zero for positive Int and -1 for negative Int. On PowerPC immediates greater than 31 are not allowed, so replace with a shift by 31 bits which gives the correct result. Fixes #10870
* Call Arity: In "e x", the result of "x" is not sharedJoachim Breitner2015-11-081-7/+16
| | | | | | | | | | | | | | | | | | | | in contrast to "e (f x)", where CorePrep will turn it into "let y = f x in e x". So in let f = ... in e (f x) we know that f is called at most once, but in let f = ... in e f we do not know that. Previously Call Arity would assume that in "e x", "x" is evaluated at most once. This rarely would make a difference (the argument "x" is analized with an incoming arity of 0, so no eta-expansion would be done anyways), but of course this should still be fixed. This fixes #11064. Note the corresponding code dmdTransformThunkDmd in DmdAnal.
* aclocal.m4: Do not check for readelf on darwinghc-7.10.3-rc2Erik de Castro Lopo2015-11-051-1/+2
| | | | Tested on darwin and linux. Not tested on mingw32.
* Remove pprTrace from RichardBen Gamari2015-11-041-3/+1
|
* rts/win32: Add missing definition for EH_UNWINDINGBen Gamari2015-11-021-0/+5
| | | | This was taken from 5200bdeb26c5ec98739b14b10fc8907296bceeb9 on master.
* Only apply WERROR to Stage2HcOpts and LibHcOptsghc-7.10.3-rc1Ben Gamari2015-10-301-3/+3
| | | | This prevents warnings from the bootstrap compiler from killing validation
* Zonk properly when checkig pattern synonymsSimon Peyton Jones2015-10-287-40/+115
| | | | | | Fixes Trac #10997 Merge to stable branch
* TcRnMonad: Backport pushLevelAndCaptureConstraintsBen Gamari2015-10-281-0/+11
|
* Move win32 tarball download logic to scriptBen Gamari2015-10-273-78/+177
| | | | | This provides an easy way for users and packages to grab the tarballs necessary to generate a complete source tarball.
* testsuite: Update base version number in resultsBen Gamari2015-10-2663-76/+75
|
* configure.ac: Bump back down to 7.10.2Ben Gamari2015-10-261-1/+1
| | | | Keep at 7.10.2 for release candidate
* base: Add Haddocks to GHC.RTS.FlagsBen Gamari2015-10-261-3/+46
|
* Fix 7.10.3 release notesBen Gamari2015-10-261-1/+1
|
* More release notesBen Gamari2015-10-261-37/+2
|
* base: Update version numberBen Gamari2015-10-261-1/+1
|
* configure.ac: Bump to 7.10.3Ben Gamari2015-10-261-1/+1
|
* Handle platforms with renamed "readelf"Mykola Orliuk2015-10-268-3/+58
| | | | | | | | | | | | | | | | | | | | | - Add `-pgmreadelf` option - Auto configure path and name of "readelf" - Add settings `readelf command` - During build of GHC name of tool can be changed with `./configure --with-readelf=myreadelf` Test Plan: ``` make -C testsuite/tests/driver/recomp011 ``` Reviewers: austin, bgamari Subscribers: erikd, thomie Differential Revision: https://phabricator.haskell.org/D1335 GHC Trac Issues: #10974
* 7.10.3 release notesBen Gamari2015-10-261-0/+108
|
* Testsuite: skip T10489 unless compiler_debugged (#10489)Thomas Miedema2015-10-262-1/+2
|
* Update perf test resultsBen Gamari2015-10-263-11/+19
|
* T10518: Ensure literal has 64-bit typeBen Gamari2015-10-261-1/+1
| | | | | Otherwise we get a C-- lint error due to mismatched RHS and variable types.
* Testsuite: T3333 still fails on non-linux statically linked ghci (#3333)Thomas Miedema2015-10-221-1/+1
|
* InteractiveUI: Fix previous commitBen Gamari2015-10-221-1/+1
| | | | Some day I'll learn to validate before pushing.
* Suggest chmod 755 instead of 644Ben Gamari2015-10-221-1/+1
| | | | | | | | | | | | | | | | | Previous suggestion would clear executable bit, meaning directory couldn't be entered. Fixes #11003. Test Plan: Read message. Reviewers: austin, thomie, dfeuer Reviewed By: thomie, dfeuer Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1350 GHC Trac Issues: #11003
* Regression test for Trac #10390Simon Peyton Jones2015-10-222-0/+17
|
* Make Data.List.foldr1 inlineJoachim Breitner2015-10-223-3/+9
| | | | | | | | | | Previously, foldr1 would be defiend recursively and thus not inline. This is bad, for example, when maximumBy has a strict comparison function: Before the BBP, it was implemented via foldl1, which inlined and yielded good code. With BBP, it goes via foldr1, so we better inline this as well. Fixes #10830. Differential Revision: https://phabricator.haskell.org/D1205
* Testsuite: mark encoding005 expect_broken(#10623) on WindowsThomas Miedema2015-10-221-1/+2
|
* Add short library names support to Windows linkerTamar Christina2015-10-229-13/+72
| | | | | | | | | | | | | | | Make Linker.hs try asking gcc for lib%s.dll as well, also changed tryGcc to pass -L to all components by using -B instead. These two fix shortnames linking on windows. re-enabled tests: ghcilink003, ghcilink006 and T3333 Added two tests: load_short_name and enabled T1407 on windows. Reviewed By: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1310 GHC Trac Issues: #9878, #1407, #1883, #5289
* Allow non-operator infix pattern synonymsMatthew Pickering2015-10-223-1/+7
| | | | | | | | | | | | | | For example ``` pattern head `Cons` tail = head : tail ``` Reviewed By: goldfire, austin Differential Revision: https://phabricator.haskell.org/D1295 GHC Trac Issues: #10747
* base: Have the argument of mask restore the state.Facundo Domínguez2015-10-225-3/+31
| | | | | | | | | | | | | | | | | | | | | The implementation of `mask` and `uninterruptibleMask` assumed so far that the restore argument would be called in a context with the same masking state as that set by `mask` or `uninterruptibleMask`. This patch has the restore argument restore the masking, whatever the current masking state is. Test Plan: validate Reviewers: simonmar, hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie, qnikst Differential Revision: https://phabricator.haskell.org/D1327 GHC Trac Issues: #10149
* Parser: revert some error messages to what they were before 7.10Thomas Miedema2015-10-228-34/+29
| | | | | | | | | | | | | | | | | Among doing other things, Phab:D201 (bc2289e13d9586be087bd8136943dc35a0130c88) tried to improve the error messages thrown by the parser. For example a missing else clause now prints "parse error in if statement: else clause empty" instead of "parse error (possibly incorrect indentation or mismatched brackets)". Some error messages got much worse however (see tests), and the result seems to be a net negative. Although not entirely satisfactory, this commits therefore reverts those parser changes. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1309 GHC Trac Issues: #10498
* PPC: Fix right shift by 32 bits #10870Erik de Castro Lopo2015-10-221-2/+10
| | | | | | | | | | | | | Backported from: commit 4bd58c179b8d0f8cf2850acb920cef8605826a2a Author: Erik de Castro Lopo <erikd@mega-nerd.com> Date: Sun Sep 13 18:57:40 2015 +1000 PPC: Fix right shift by 32 bits #10870 The patch in HEAD didn't apply cleanly because of the powerpc64el work that has been done in HEAD.
* Fix GHCi on Arm (#10375).Erik de Castro Lopo2015-10-224-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Arm has two instruction sets, Arm and Thumb, and an execution mode for each. Executing Arm code in Thumb mode or vice-versa will likely result in an Illegal instruction exception. Furthermore, Haskell code compiled via LLVM was generating Arm instructions while C code compiled via GCC was generating Thumb code by default. When these two object code types were being linked by the system linker, all was fine, because the system linker knows how to jump and call from one instruction set to the other. The first problem was with GHCi's object code loader which did not know about Thumb vs Arm. When loading an object file `StgCRun` would jump into the loaded object which could change the mode causing a crash after it returned. This was fixed by forcing all C code to generate Arm instructions by passing `-marm` to GCC. The second problem was the `mkJumpToAddr` function which was generating Thumb instructions. Changing that to generate Arm instructions instead results in a working GHCi on Arm. Test Plan: validate on x86_64 and arm Reviewers: bgamari, austin, hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1323 GHC Trac Issues: #10375
* Fix kind-var abstraction in SimplUtils.abstractFloatsSimon Peyton Jones2015-10-223-19/+69
| | | | | | | A missing 'closeOverKinds' triggered Trac #10934. Happily the fix is simple. Merge to 7.10.3
* Slightly better `Coercible` errors.Richard Eisenberg2015-10-228-8/+90
| | | | | | | | | | | | | | | This makes two real changes: - Equalities like (a ~R [a]) really *are* insoluble. Previously, GHC refused to give up when an occurs check bit on a representational equality. But for datatypes, it really should bail. - Now, GHC will sometimes report an occurs check error (in cases above) for representational equalities. Previously, it never did. This "fixes" #10715, where by "fix", I mean clarifies the error message. It's unclear how to do more to fix that ticket. Test cases: typecheck/should_fail/T10715{,b}
* Fix #10495.Richard Eisenberg2015-10-224-4/+20
| | | | | | This change means that the intricate reasoning in TcErrors around getting messages just right for nominal equalities is skipped for representational equalities.
* Merge #10817/#10899 (e27b267f)Richard Eisenberg2015-10-2213-18/+80
|
* Make Windows linker more robust to unknown sectionsTamar Christina2015-10-227-121/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Windows Linker has 3 main parts that this patch changes. 1) Identification and classification of sections 2) Adding of symbols to the symbols tables 3) Reallocation of sections 1. Previously section identification used to be done on a whitelisted basis. It was also exclusively being done based on the names of the sections. This meant that there was a bit of a cat and mouse game between `GCC` and `GHC`. Every time `GCC` added new sections there was a good chance `GHC` would break. Luckily this hasn't happened much in the past because the `GCC` versions `GHC` used were largely unchanged. The new code instead treats all new section as `CODE` or `DATA` sections, and changes the classifications based on the `Characteristics` flag in the PE header. By doing so we no longer have the fragility of changing section names. The one exception to this is the `.ctors` section, which has no differentiating flag in the PE header, but we know we need to treat it as initialization data. The check to see if the sections are aligned by `4` has been removed. The reason is that debug sections often time are `1 aligned` but do have relocation symbols. In order to support relocations of `.debug` sections this check needs to be gone. Crucially this assumption doesn't seem to be in the rest of the code. We only check if there are at least 4 bytes to realign further down the road. 2. The second loop is iterating of all the symbols in the file and trying to add them to the symbols table. Because the classification of the sections we did previously are (currently) not available in this phase we still have to exclude the sections by hand. If they don't we will load in symbols from sections we've explicitly ignored the in # 1. This whole part should rewritten to avoid this. But didn't want to do it in this commit. 3. Finally the sections are relocated. But for some reason the PE files contain a Linux relocation constant in them `0x0011` This constant as far as I can tell does not come from GHC (or I couldn't find where it's being set). I believe this is probably a bug in GAS. But because the constant is in the output we have to handle it. I am thus mapping it to the constant I think it should be `0x0003`. Finally, static linking *should* work, but won't. At least not if you want to statically link `libgcc` with exceptions support. Doing so would require you to link `libgcc` and `libstd++` but also `libmingwex`. The problem is that `libmingwex` also defines a lot of symbols that the RTS automatically injects into the symbol table. Presumably because they're symbols that it needs. like `coshf`. The these symbols are not in a section that is declared with weak symbols support. So if we ever want to get this working, we should either a) Ask mingw to declare the section as such, or b) treat all a imported symbols as being weak. Though this doesn't seem like it's a good idea.. Test Plan: Running ./validate for both x86 and x86_64 Also running the specific test case for #10672 make TESTS="T10672_x86 T10672_x64" Reviewed By: ezyang, thomie, austin Differential Revision: https://phabricator.haskell.org/D1244 GHC Trac Issues: #9907, #10672, #10563
* Don't inline/apply other rules when simplifying a rule RHS.Andrew Farmer2015-10-223-18/+19
| | | | | | | | | | | | | | | | HERMIT users depend on RULES to specify equational properties. 6.10.2 performed both inlining and simplification in both sides of the rules, meaning they can't really be used for this. This breaks most HERMIT use cases. A separate commit already disabled this for the LHS of rules. This does so for the RHS. See Trac #10829 for nofib results. Reviewed By: austin, bgamari, simonpj Differential Revision: https://phabricator.haskell.org/D1246 GHC Trac Issues: #10829
* Update mingw tarball locationBen Gamari2015-10-221-1/+1
|
* Upgrade GCC to 5.2.0 for Windows x86 and x86_64Tamar Christina2015-10-2210-361/+453
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does a few things - Moved GHC x86 to MinGW-w64 (Using Awson's patch) - Moves Both GHCs to MSYS2 toolchains - Completely removes the dependencies on the git tarball repo - Downloads only the required tarball for the architecture for which we are building - Downloads the perl tarball is missing as well - Fixed a few bugs in the linker to fix tests on Windows The links currently point to repo.msys2.org and GitHub, it might be more desirable to mirror them on http://downloads.haskell.org/~ghc/mingw/ as with the previous patch attempt. For more details on what the MSYS2 packages I include see #10726 (Awson's comment). but it should contain all we need and no python or fortran, which makes the uncompressed tar a 1-2 hundreds mb smaller. The `GCC 5.2.0` in the package supports `libgcc` as a shared library, this is a problem since when compiling with -shared the produced dll now has a dependency on `libgcc_s_sjlj-1.dll`. To solve this the flag `-static-libgcc` is now being used for all GCC calls on windows. Test Plan: ./validate was ran both on x86 and x86_64 windows and compared against the baseline. A few test were failing due to Ld no longer being noisy. These were updated. The changes to the configure script *should* be validated by the build bots for the other platforms before landing Reviewers: simonmar, awson, bgamari, austin, thomie Reviewed By: thomie Subscribers: #ghc_windows_task_force, thomie, awson Differential Revision: https://phabricator.haskell.org/D1123 GHC Trac Issues: #10726, #9014, #9218, #10435