| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
The most important effect of this macro is unlocking a thread-safe
`errno` which is essential for the threaded runtime.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
otherwise <math.h> includes <stdlib.h> which breaks compilation
of .hc files
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Tested on darwin and linux. Not tested on mingw32.
|
| |
|
|
|
|
| |
This was taken from 5200bdeb26c5ec98739b14b10fc8907296bceeb9 on master.
|
|
|
|
| |
This prevents warnings from the bootstrap compiler from killing validation
|
|
|
|
|
|
| |
Fixes Trac #10997
Merge to stable branch
|
| |
|
|
|
|
|
| |
This provides an easy way for users and packages to grab the tarballs
necessary to generate a complete source tarball.
|
| |
|
|
|
|
| |
Keep at 7.10.2 for release candidate
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Otherwise we get a C-- lint error due to mismatched RHS and
variable types.
|
| |
|
|
|
|
| |
Some day I'll learn to validate before pushing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example
```
pattern head `Cons` tail = head : tail
```
Reviewed By: goldfire, austin
Differential Revision: https://phabricator.haskell.org/D1295
GHC Trac Issues: #10747
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
A missing 'closeOverKinds' triggered Trac #10934.
Happily the fix is simple.
Merge to 7.10.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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}
|
|
|
|
|
|
| |
This change means that the intricate reasoning in TcErrors
around getting messages just right for nominal equalities
is skipped for representational equalities.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|