summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Enable building Cabal with parsecwip/cabal-parsecHerbert Valerio Riedel2017-07-189-5/+82
| | | | | | | | | | | | | | | | | | | | 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 dependencies: - 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.
* Make module membership on ModuleGraph fasterBartosz Nitka2017-07-1814-74/+158
| | | | | | | | | | | | | | | | | | | When loading/reloading with a large number of modules (>5000) the cost of linear lookups becomes significant. The changes here made `:reload` go from 6s to 1s on my test case. The bottlenecks were `needsLinker` in `DriverPipeline` and `getModLoop` in `GhcMake`. Test Plan: ./validate Reviewers: simonmar, austin, bgamari Subscribers: thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D3703
* Typos in comments and explanation for unusused importsGabor Greif2017-07-184-9/+9
|
* Fix a missing getNewNursery(), and related cleanupSimon Marlow2017-07-182-27/+14
| | | | | | | | | | | | | | | | | | | | Summary: When we use nursery chunks with +RTS -n<size>, when the current nursery runs out we have to check whether there's another chunk available with getNewNursery(). There was one place we weren't doing this: the ad-hoc heap check in scheduleProcessInbox(). The impact of the bug was that we would GC too early when using nursery chunks, especially in programs that used messages (throwTo between capabilities could do this, also hs_try_putmvar()). Test Plan: validate, also local testing in our application Reviewers: bgamari, niteria, austin, erikd Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3749
* [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
* Fix some excessive spacing in error messagesRyan Scott2017-07-124-15/+15
| | | | | | | | | | Test Plan: If it builds, ship it Reviewers: austin, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3729
* testsuite: Again update allocations of T13701Ben Gamari2017-07-121-1/+2
| | | | This test appears to be quite unstable.
* testsuite: Update haddock allocationsBen Gamari2017-07-121-2/+4
| | | | It seems to be the change to getNameToInstancesIndex that bumped these.
* [iserv] Fixing the word size for RemotePtr and toWordArrayBen Gamari2017-07-1210-67/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | When we load non absolute pathed .so's this usually implies that we expect the system to have them in place already, and hence we should not need to ship them. Without the absolute path to the library, we are also unable to open and send said library. Thus we'll do library shipping only for libraries with absolute paths. When dealing with a host and target of different word size (say host hast 64bit, target has 32bit), we need to fix the RemotePtr size and the toWordArray function, as they are part of the iserv ResolvedBCO binary protocol. This needs to be word size independent. The choice for RemotePtr to 64bit was made to ensure we can store 64bit pointers when targeting 64bit. The choice for 32bit word arrays was made wrt. encoding/decoding on the potentially slower device. The efficient serialization code has been graciously provided by @bgamari. Reviewers: bgamari, simonmar, austin, hvr Reviewed By: bgamari Subscribers: Ericson2314, rwbarton, thomie, ryantrinkle Differential Revision: https://phabricator.haskell.org/D3443
* distrib/configure: Fail if we can't detect machine's word sizeBen Gamari2017-07-123-6/+16
| | | | | | | | | | | | | | | | | | This is a sure sign that something is terribly wrong. We also now verify that the word size that the binary distribution expects matches the word size produced by the local target toolchain. Finally we rename WordSize to TargetWordSize, since non-host/target qualified quantities are terribly confusing. Reviewers: austin, hvr, Phyx Reviewed By: Phyx Subscribers: Phyx, rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D3711
* Fix missing escape in macroMoritz Angermann2017-07-121-1/+1
| | | | | | | | | | Reviewers: angerman, austin, bgamari, erikd, simonmar Reviewed By: angerman Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3727
* Use correct section types syntax for architectureBen Gamari2017-07-118-19/+47
| | | | | | | | | | | | | | | | | | Previously GHC would always assume that section types began with `@` while producing assembly, which is not true. For instance, in ARM assembly syntax section types begin with `%`. This abstracts out section type pretty-printing and adjusts it to correctly account for the target architectures assembly flavor. Reviewers: austin, hvr, Phyx Reviewed By: Phyx Subscribers: Phyx, rwbarton, thomie, erikd GHC Trac Issues: #13937 Differential Revision: https://phabricator.haskell.org/D3712
* Mention which -Werror promoted a warning to an errorÖmer Sinan Ağacan2017-07-1128-148/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously -Werror or -Werror=flag printed warnings as usual and then printed these two lines: <no location info>: error: Failing due to -Werror. This is not ideal: first, it's not clear which flag made one of the warnings an error. Second, warning messages are not modified in any way, so there's no way to know which warnings caused this error. With this patch we (1) promote warning messages to error messages if a relevant -Werror is enabled (2) mention which -Werror is used during this promotion. Previously: [1 of 1] Compiling Main ( test.hs, test.o ) test.hs:9:10: warning: [-Wincomplete-patterns] Pattern match(es) are non-exhaustive In a case alternative: Patterns not matched: (C2 _) | 9 | sInt s = case s of | ^^^^^^^^^... test.hs:12:14: warning: [-Wmissing-fields] • Fields of ‘Rec’ not initialised: f2 • In the first argument of ‘print’, namely ‘Rec {f1 = 1}’ In the expression: print Rec {f1 = 1} In an equation for ‘main’: main = print Rec {f1 = 1} | 12 | main = print Rec{ f1 = 1 } | ^^^^^^^^^^^^^ <no location info>: error: Failing due to -Werror. Now: [1 of 1] Compiling Main ( test.hs, test.o ) test.hs:9:10: error: [-Wincomplete-patterns, -Werror=incomplete-patterns] Pattern match(es) are non-exhaustive In a case alternative: Patterns not matched: (C2 _) | 9 | sInt s = case s of | ^^^^^^^^^... test.hs:12:14: error: [-Wmissing-fields, -Werror=missing-fields] • Fields of ‘Rec’ not initialised: f2 • In the first argument of ‘print’, namely ‘Rec {f1 = 1}’ In the expression: print Rec {f1 = 1} In an equation for ‘main’: main = print Rec {f1 = 1} | 12 | main = print Rec{ f1 = 1 } | ^^^^^^^^^^^^^ Test Plan: - Update old tests, add new tests if there aren't any relevant tests Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3709
* Remove redundant import; fix noteDavid Feuer2017-07-112-6/+3
| | | | | | | | | | | | | | | * Remove the redundant import of `Data.Maybe` from `GHC.Foreign`. * Fix the note in `GHC.Stack.Types` to give a correct explanation of the problematic cycle. Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3722
* Fix minor typoIsmail2017-07-111-1/+1
|
* testsuite: Show stderr output on command failureBen Gamari2017-07-111-1/+1
| | | | | | | | Reviewers: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3716
* StgLint: Don't loop on tycons with runtime rep argumentsBen Gamari2017-07-111-6/+19
| | | | | | | | | | | | Test Plan: Validate Reviewers: austin Subscribers: rwbarton, thomie GHC Trac Issues: #13941 Differential Revision: https://phabricator.haskell.org/D3714
* configure: Ensure that we don't set LD to unusable linkerBen Gamari2017-07-111-5/+7
| | | | | | | | | | | | | | | | | | | Previously if we found an unusable linker in PATH (e.g. ld.lld on OS X) we would notice the -fuse-ld=... was broken, but neglected to reset LD to a usable linker. This resulted in brokenness on OS X when lld is in PATH. Test Plan: Validate on OS X with lld in PATH Reviewers: austin, hvr, angerman Reviewed By: angerman Subscribers: rwbarton, thomie, erikd, angerman GHC Trac Issues: #13541 Differential Revision: https://phabricator.haskell.org/D3713
* testsuite: Fix T13701 allocations yet againBen Gamari2017-07-111-1/+1
|
* Remove unnecessarily returned res_ty from rejigConResRyan Scott2017-07-111-11/+10
| | | | | | | | | | | | | @goldfire noticed that we don't need to thread through `res_ty` through to the return type of `rejigConRes`, as it never changes. Reviewers: goldfire, austin, bgamari Reviewed By: goldfire Subscribers: rwbarton, thomie, goldfire Differential Revision: https://phabricator.haskell.org/D3725
* Add Template Haskell support for overloaded labelsMatthew Pickering2017-07-111-0/+6
| | | | | | | | | | Reviewers: RyanGlScott, austin, goldfire, bgamari Reviewed By: RyanGlScott, goldfire, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3715
* Parenthesize infix type names in data declarations in TH printerEugene Akentyev2017-07-113-7/+8
| | | | | | | | | | | | Previously datatype names were not paraenthesized (#13887). Reviewers: austin, bgamari, RyanGlScott Reviewed By: RyanGlScott Subscribers: RyanGlScott, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3717
* Fix #13947 by checking for unbounded names moreRyan Scott2017-07-114-2/+12
| | | | | | | | | | | | | | | | | | | Commit 2484d4dae65c81f218dcfe494b963b2630bb8fa6 accidentally dropped a call to `isUnboundName` in an important location. This re-adds it. Fixes #13947. Test Plan: make test TEST=T13947 Reviewers: adamgundry, austin, bgamari Reviewed By: adamgundry Subscribers: rwbarton, thomie GHC Trac Issues: #13947 Differential Revision: https://phabricator.haskell.org/D3718
* Fix #13948 by being pickier about when to suggest DataKindsRyan Scott2017-07-1114-25/+15
| | | | | | | | | | | | | | | | | | | | | | | Commit 343cb32d0983f576d344a2d04a35c3fd6eecf2c5 (#13568) made GHC a bit too cavalier in suggesting when data constructors are in scope (and suggesting the use of `DataKinds`). This tones down the suggestions so that `DataKinds` is only suggested if a data constructor of that name is actually in scope (previously, it would always suggest, even if it was out of scope). Fixes #13948. Test Plan: ./validate Reviewers: mpickering, austin, bgamari Reviewed By: mpickering Subscribers: rwbarton, thomie GHC Trac Issues: #13948 Differential Revision: https://phabricator.haskell.org/D3719
* Fix logic error in GhcMake.enableCodeGenForTHDouglas Wilson2017-07-117-16/+54
| | | | | | | | | | | | | | | | | | | | | transitive_deps_set was incorrect, it was not considering the dependencies of dependencies in some cases. I've corrected it and tidied it up a little. The test case from leftaroundabout, as linked to from the ticket, is added with small modifications to flatten directory structure. Test Plan: make test TEST=T13949 Reviewers: austin, bgamari, alexbiehl Reviewed By: alexbiehl Subscribers: rwbarton, thomie, alexbiehl GHC Trac Issues: #13949 Differential Revision: https://phabricator.haskell.org/D3720
* Optimize TimerManageralexbiehl2017-07-112-425/+404
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After discussion with Kazu Yamamoto we decided to try two things: - replace current finger tree based priority queue through a radix tree based one (code is based on IntPSQ from the psqueues package) - after editing the timer queue: don't wake up the timer manager if the next scheduled time didn't change Benchmark results (number of TimerManager-Operations measured over 20 seconds, 5 runs each, higher is better) ``` -- baseline (timermanager action commented out) 28817088 28754681 27230541 27267441 28828815 -- ghc-8.3 with wake opt and new timer queue 18085502 17892831 18005256 18791301 17912456 -- ghc-8.3 with old timer queue 6982155 7003572 6834625 6979634 6664339 ``` Here is the benchmark code: ``` {-# LANGUAGE BangPatterns #-} module Main where import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.State.Strict import Data.Foldable import GHC.Event import System.Random import Control.Concurrent import Control.Exception import Data.IORef main :: IO () main = do let seed = 12345 :: Int nthreads = 1 :: Int benchTime = 20 :: Int -- in seconds timerManager <- getSystemTimerManager :: IO TimerManager let {- worker loop depending on the random generator it either * registers a new timeout * updates existing timeout * or cancels an existing timeout Additionally it keeps track of a counter tracking how often a timermanager was being modified. -} loop :: IORef Int -> [TimeoutKey] -> StdGen -> IO a loop !i !timeouts !rng = do let (rand0, rng') = next rng (rand1, rng'') = next rng' case rand0 `mod` 3 of 0 -> do timeout <- registerTimeout timerManager (rand1) (return ()) modifyIORef' i (+1) loop i (timeout:timeouts) rng'' 1 | (timeout:_) <- timeouts -> do updateTimeout timerManager timeout (rand1) modifyIORef' i (+1) loop i timeouts rng'' | otherwise -> loop i timeouts rng' 2 | (timeout:timeouts') <- timeouts -> do unregisterTimeout timerManager timeout modifyIORef' i (+1) loop i timeouts' rng' | otherwise -> loop i timeouts rng' _ -> loop i timeouts rng' let -- run a computation which can produce new -- random generators on demand withRng m = evalStateT m (mkStdGen seed) -- split a new random generator newRng = do (rng1, rng2) <- split <$> get put rng1 return rng2 counters <- withRng $ do replicateM nthreads $ do rng <- newRng ref <- liftIO (newIORef 0) liftIO $ forkIO (loop ref [] rng) return ref threadDelay (1000000 * benchTime) for_ counters $ \ref -> do n <- readIORef ref putStrLn (show n) ``` Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: Phyx, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3707
* Add Template Haskell support for overloaded labelsMatthew Pickering2017-07-119-4/+44
| | | | | | | | | | Reviewers: RyanGlScott, austin, goldfire, bgamari Reviewed By: RyanGlScott, goldfire, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3715
* users-guide/rel-notes: Describe #13875 fixBen Gamari2017-07-111-0/+6
| | | | | | | | | | | | | | Test Plan: Read it. Reviewers: simonmar, austin Reviewed By: simonmar Subscribers: rwbarton, thomie GHC Trac Issues: #13875 Differential Revision: https://phabricator.haskell.org/D3710
* ByteCodeGen: use depth instead of offsets in BCEnvMichal Terepeta2017-07-112-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is based on unfinished work in D38 started by Simon Marlow and is the first step for fixing #13825. (next step use byte-indexing for stack) The change boils down to adjusting everything in BCEnv by +1, which simplifies the code a bit. I've also looked into a weird stack adjustement that we did in `getIdValFromApStack` and moved it to `ByteCodeGen` to just keep everything in one place. I've left a comment about this. Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com> Test Plan: ./validate Reviewers: austin, hvr, bgamari, simonmar Reviewed By: bgamari, simonmar Subscribers: simonmar, rwbarton, thomie GHC Trac Issues: #13825 Differential Revision: https://phabricator.haskell.org/D3708
* Always allow -staticlibMoritz Angermann2017-07-113-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the `-staticlib` flag is currently only supported on apple platforms, due to the avaiablity of libtool (the apple version, which is unlike the gnu version). This however prevents the use of -staticlib in cases where it would be beneficial as well. The functionality that `-staticlib` uses from `libtool` can be stubbed with a small script like the following: ``` #!/bin/bash # This script pretends to be libtool. And supports # only a limited set of flags. # # It is supposed to be a stand in for libtool -static, whic # creates a static archive. This is done by locating all -l<lib> # libs in the provied -L<lib path> library paths, and building an # MRI script to create the final archive from all the libraries, and # other provided inputs. # name=${0##*/} target=${name%-*} set -e ldflags_L=() ldflags_l=() output="" inputs=() STATIC=0 DYNAMIC=1 mode=$DYNAMIC verbose=0 # find_lib <name> path path path path function find_lib () { lib=$1; shift 1; for dir in $@; do if [ -f "$dir/$lib" ]; then echo "$dir/$lib" break fi done } while [ "$#" -gt 0 ]; do case "$1" in -v|--verbose) verbose=1; shift 1;; -o) output="$2"; shift 2;; -L*) ldflags_L+=("${1:2:${#1}-2}"); shift 1;; -l*) ldflags_l+=("lib${1:2:${#1}-2}.a"); shift 1;; -static) mode=$STATIC; shift 1;; -dynamic) mode=$DYNAMIC; shift 1;; -Wl,*) ldflags+=("${1#*,}"); shift 1;; -*) echo "unknown option: $1" >&2; exit 1;; *) inputs+=("$1"); shift 1;; esac done if [ ! $mode == $STATIC ]; then echo "-dynamic not supported!" >&2; exit 1; fi MRI="create ${output}\n" for input in "${ldflags_l[@]}"; do lib=$(find_lib $input ${ldflags_L[@]}) if [ -z $lib ]; then echo "Failed to find lib $input" >&2 exit 1 else MRI+="addlib $lib\n" continue fi done for input in "${inputs[@]}"; do MRI+="addmod $input\n" done MRI+="save\nend\n" echo -e "$MRI" | $target-ar -M $target-ranlib $output ``` if `ar` supports MRI scripts. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3706
* Sort list of failed tests for easier comparison between runsAndreas Klebinger2017-07-111-1/+1
| | | | | | | | | | | | | | Test Plan: Running the testsuite. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13922 Differential Revision: https://phabricator.haskell.org/D3705
* Suppress unused warnings for selectors for some derived classesRyan Scott2017-07-115-38/+110
| | | | | | | | | | | | | | | | | | | | | | Although derived `Read`, `Show`, and `Generic` instances technically don't //use// the record selectors of the data type for which an instance is being derived, the derived code is affected by the //presence// of record selectors. As a result, we should suppress `-Wunused-binds` for those record selectors when deriving these classes. This is accomplished by threading through more information from `hasStockDeriving`. Test Plan: make test TEST=T13919 Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13919 Differential Revision: https://phabricator.haskell.org/D3704
* Add testcase for T13818Douglas Wilson2017-07-113-0/+14
| | | | | | | | | | | | | | | | | Annotations currently fail to type check if they annotation cannot be loaded into ghci, such as when built with -fno-code. Test Plan: ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13818 Differential Revision: https://phabricator.haskell.org/D3701
* Improve Wmissing-home-modules warning under CabalBen Gamari2017-07-119-9/+16
| | | | | | | | | | | | Reviewers: hvr, alanz, austin Reviewed By: alanz Subscribers: rwbarton, thomie GHC Trac Issues: #13899 Differential Revision: https://phabricator.haskell.org/D3686
* Fix Work Balance computation in RTS statsDouglas Wilson2017-07-1111-33/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | An additional stat is tracked per gc: par_balanced_copied This is the the number of bytes copied by each gc thread under the balanced lmit, which is simply (copied_bytes / num_gc_threads). The stat is added to all the appropriate GC structures, so is visible in the eventlog and in GHC.Stats. A note is added explaining how work balance is computed. Remove some end of line whitespace Test Plan: ./validate experiment with the program attached to the ticket examine code changes carefully Reviewers: simonmar, austin, hvr, bgamari, erikd Reviewed By: simonmar Subscribers: Phyx, rwbarton, thomie GHC Trac Issues: #13830 Differential Revision: https://phabricator.haskell.org/D3658
* Make ':info Coercible' display an arbitrary string (fixes #12390)Patrick Dougherty2017-07-118-14/+43
| | | | | | | | | | | | | | | | | | | | This change enables the addition of an arbitrary string to the output of GHCi's ':info'. It was made for Coercible in particular but could be extended if desired. Updates haddock submodule. Test Plan: Modified test 'ghci059' to match new output. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: goldfire, rwbarton, thomie GHC Trac Issues: #12390 Differential Revision: https://phabricator.haskell.org/D3634
* user-guide: Various fixes to FFI sectionBen Gamari2017-07-111-9/+9
|
* testsuite: Decrease T13701 allocationsBen Gamari2017-07-111-1/+1
|
* Pretty-printer no longer butchers function arrow fixityAlan Zimmerman2017-07-105-0/+54
| | | | | | | | | | | | | | It now correctly prints the parens around '(Int -> Int)' in {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -ddump-splices #-} module Bug where $([d| f :: Either Int (Int -> Int) f = undefined |]) Closes #13942
* Big-obj support for the Windows runtime linkerTamar Christina2017-07-088-152/+543
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The normal object file on Windows has a limit of `2^16` sections that can be in an object-file. The `big-obj` format raises this to `2^32` sections. The implementation is made difficult because we now need to support two header formats and two section formats that differ only by a single element size within each. The element that's different is in the middle of the structs and since the structs are used to map regions of memory directly, it means we need to know which struct it is when we do the mapping or pointer arithmetics. This is the final Object-Code format which Windows compilers can generate which we do not support yet in GHCI. All other major compilers on the platforms can produce it and all linkers consume it (bfd and lld). See http://tinyurl.com/bigobj This patch abstracts away retrieving the fields to functions which all take an struct which describes which object format is currently being parsed. These functions are always in-lined as they're small but would looks messy being copy-pasted everywhere. Test Plan: ./validate and new test `big-obj` ``` Tamar@Rage MINGW64 /r $ gcc -c -Wa,-mbig-obj foo.c -o foo.o Tamar@Rage MINGW64 /r $ objdump -h foo.o foo.o: file format pe-bigobj-x86-64 Sections: Idx Name Size VMA LMA File off Algn 0 .text 00000010 0000000000000000 0000000000000000 00000128 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 00000000 0000000000000000 0000000000000000 00000000 2**4 ALLOC, LOAD, DATA 2 .bss 00000000 0000000000000000 0000000000000000 00000000 2**4 ALLOC 3 .xdata 00000008 0000000000000000 0000000000000000 00000138 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .pdata 0000000c 0000000000000000 0000000000000000 00000140 2**2 CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA 5 .rdata$zzz 00000030 0000000000000000 0000000000000000 0000014c 2**4 CONTENTS, ALLOC, LOAD, READONLY, DATA Tamar@Rage MINGW64 /r $ echo main | ~/ghc/inplace/bin/ghc-stage2.exe --interactive bar.hs foo.o GHCi, version 8.3.20170430: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( bar.hs, interpreted ) Ok, modules loaded: Main. *Main> 17 *Main> Leaving GHCi. ``` Reviewers: austin, bgamari, erikd, simonmar Subscribers: awson, rwbarton, thomie, #ghc_windows_task_force GHC Trac Issues: #13815 Differential Revision: https://phabricator.haskell.org/D3523
* Fix typos in Bag.hs [ci skip]Ömer Sinan Ağacan2017-07-081-2/+2
|
* aclocal.m4: allow arbitrary <vendor> string in toolchain tripletsSergei Trofimovich2017-07-081-2/+1
| | | | | | | | | | | | | | | | | | | | Canonical triplets have a form of <arch>-<vendor>-<os>[-<abi>] Checking for vendor is almost never correct as it's an arbitrary string. It's useful to have multiple "vendors" to denote otherwise the same (WRT <arch>, <os>, <abi>) target: --target=x86_64-pc-linux-gnu --target=x86_64-unknown-linux-gnu --target=x86_64-ghc80-linux-gnu --target=x86_64-ghchead-linux-gnu Do not fail unknown vendors. Only emit a warning. Ideally configure checks should never use "vendor". Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Implement split-sections support for windows.Tamar Christina2017-07-086-18/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Typos in comments [ci skip]Gabor Greif2017-07-068-8/+8
|
* lowercase clangMoritz Angermann2017-07-061-2/+2
|
* mkDocs: Don't install *.psBen Gamari2017-07-051-1/+1
| | | | We now longer produce PostScript output.
* rts: Address AP_STACK comment suggestion from SimonBen Gamari2017-07-051-3/+3
|
* rts/sm/Storage.c: tweak __clear_cache proto for clangSergei Trofimovich2017-07-051-2/+15
| | | | | | | | | | | | | | | | | | clang defines '__clear_cache' slightly differently from gcc: rts/sm/Storage.c:1349:13: error: error: conflicting types for '__clear_cache' | 1349 | extern void __clear_cache(char * begin, char * end); | ^ extern void __clear_cache(char * begin, char * end); ^ note: '__clear_cache' is a builtin with type 'void (void *, void *)' Reported by Moritz Angermann. While at it used '__builtin___clear_cache' if advertised by clang. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Revert "rts/sm/Storage.c: tweak __clear_cache proto for clang"Sergei Trofimovich2017-07-051-13/+2
| | | | | | This reverts commit 9492703a5862ee8623455209e50344cf8c4de077. Incomplete patch (missing begin, end assignments).
* rts/sm/Storage.c: tweak __clear_cache proto for clangSergei Trofimovich2017-07-051-2/+13
| | | | | | | | | | | | | | | | | | clang defines '__clear_cache' slightly differently from gcc: rts/sm/Storage.c:1349:13: error: error: conflicting types for '__clear_cache' | 1349 | extern void __clear_cache(char * begin, char * end); | ^ extern void __clear_cache(char * begin, char * end); ^ note: '__clear_cache' is a builtin with type 'void (void *, void *)' Reported by Moritz Angermann. While at it used '__builtin___clear_cache' if advertised by clang. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>