This project is mirrored from https://gitlab.haskell.org/ghc/ghc.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
  1. 07 Apr, 2015 1 commit
  2. 03 Apr, 2015 1 commit
  3. 14 Mar, 2015 1 commit
    • Peter Trommler's avatar
      Link temporary shared objects with `--no-as-needed` · 1b7f5976
      Peter Trommler authored
      Some ELF link editors default to `--as-needed` and record only
      those libraries in DT_NEEDED tags that are needed to resolve
      undefined symbols in the shared object to be created.
      
      In Template Haskell we rely on all symbols that were defined
      in modules compiled so far to be available in the current
      temporary shared object. To prevent the link editor from
      dropping the DT_NEEDED tag for the previously linked temporary
      shared object we need to override the link editors default and
      specify `--no-as-needed` on the command line. This is for GNU ld
      and GOLD ld.
      
      This addresses #10110
      
      TODO: regression test
      
      Reviewed By: hvr
      
      Differential Revision: https://phabricator.haskell.org/D731
      1b7f5976
  4. 09 Mar, 2015 1 commit
    • thomie's avatar
      Update process submodule · 8b7534b3
      thomie authored
      Summary:
      Rename `SysTools.readCreateProcess`.
      
      Functions `readCreateProcess` and `readCreateProcessWithExitCode` were added
      to `System.Process`, the former of which conflicts with
      `SysTools.readCreateProcess`.
      
      Reviewed by: austin
      
      Differential Revision: https://phabricator.haskell.org/D713
      8b7534b3
  5. 28 Jan, 2015 1 commit
  6. 29 Dec, 2014 1 commit
    • Peter Trommler's avatar
      Fix system linker on Mac OS X · b32c2276
      Peter Trommler authored
      Summary:
      Flag `-l:` is GNU ld specific and not supported by the
      Mac OS X link editor. So we create a temporary file name
      lib<tmpname>.<so_ext> and link with the standard -l<tmpname>
      option on Linux and OS X.
      
      Fixes #9875
      
      Test Plan: validate on Mac OS X
      
      Reviewers: austin, hvr, ezyang
      
      Reviewed By: ezyang
      
      Subscribers: carter, thomie, ezyang
      
      Differential Revision: https://phabricator.haskell.org/D579
      
      GHC Trac Issues: #9875
      b32c2276
  7. 28 Dec, 2014 1 commit
    • Erik de Castro Lopo's avatar
      LlvmCodeGen cross-compiling fixes (#9895) · 58ac9c8f
      Erik de Castro Lopo authored
      Summary:
      * Throw an error when cross-compiling without a target definition.
        When cross compiling via LLVM, a target 'datalayout' and 'triple' must
        be defined or LLVM will generate code for the compile host instead of
        the compile target.
      
      * Add aarch64-unknown-linux-gnu target.
        The datalayout and triple lines were found by using clang to compile a
        small C program and -emit-llvm to get the LLVM IR output.
      Signed-off-by: Erik de Castro Lopo's avatarErik de Castro Lopo <erikd@mega-nerd.com>
      
      Test Plan: validate
      
      Reviewers: rwbarton, carter, hvr, bgamari, austin
      
      Reviewed By: austin
      
      Subscribers: carter, thomie, garious
      
      Differential Revision: https://phabricator.haskell.org/D585
      
      GHC Trac Issues: #9895
      58ac9c8f
  8. 20 Dec, 2014 1 commit
  9. 03 Dec, 2014 1 commit
  10. 30 Nov, 2014 1 commit
    • Peter Trommler's avatar
      Fix obscure problem with using the system linker (#8935) · 383733b9
      Peter Trommler authored
      Summary:
      In a statically linked GHCi symbol `environ` resolves to NULL when
      called from a Haskell script.
      
      When resolving symbols in a Haskell script we need to search the
      executable program and its dependent (DT_NEEDED) shared libraries
      first and then search the loaded libraries.
      
      We want to be able to override functions in loaded libraries later.
      Libraries must be opened with local scope (RTLD_LOCAL) and not global.
      The latter adds all symbols to the executable program's symbols where
      they are then searched in loading order. We want reverse loading order.
      
      When libraries are loaded with local scope the dynamic linker
      cannot use symbols in that library when resolving the dependencies
      in another shared library. This changes the way files compiled to
      object code must be linked into temporary shared libraries. We link
      with the last temporary shared library created so far if it exists.
      Since each temporary shared library is linked to the previous temporary
      shared library the dynamic linker finds the latest definition of a
      symbol by following the dependency chain.
      
      See also Note [RTLD_LOCAL] for a summary of the problem and solution.
      
      Cherry-picked commit 2f8b4c
      
      Changed linker argument ordering
      
      On some ELF systems GNU ld (and others?) default to
      --as-needed and the order of libraries in the link
      matters.
      
      The last temporary shared library, must appear
      before all other libraries. Switching the position
      of extra_ld_inputs and lib_path_objs does that.
      
      Fixes #8935 and #9186
      
      Reviewers: austin, hvr, rwbarton, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: thomie, carter, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D349
      
      GHC Trac Issues: #8935, #9186, #9480
      383733b9
  11. 18 Nov, 2014 1 commit
  12. 01 Sep, 2014 1 commit
    • Sergei Trofimovich's avatar
      systools: fix gcc version detecton on non-english locale · 4d4d0770
      Sergei Trofimovich authored
      Summary:
      ghc runs 'gcc -v' to check if we run under vanilla gcc
      or disaguised clang by checking for string
      
          "gcc version <something>"
      
      But this check does not always work as gcc has that string
      localized via gettext mechanism:
      
          (some gcc's locale strings)
          be.po-msgstr "версія gcc %s\n"
          da.po-msgstr "GCC version %s\n"
          de.po-msgstr "gcc-Version %s %s\n"
          el.po-msgstr "έκδοση gcc %s\n"
          ...
      
      To ping gcc to English locale we now override environment
      variable with 'LANGUAGE=en' value.
      
      Fixes Issue #8825Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      
      Test Plan: validate
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: simonmar, ezyang, carter
      
      Differential Revision: https://phabricator.haskell.org/D185
      
      GHC Trac Issues: #8825
      4d4d0770
  13. 10 Aug, 2014 1 commit
  14. 31 Jul, 2014 1 commit
  15. 28 Jul, 2014 1 commit
    • kgardas's avatar
      add Solaris' linker warning messages filtering into link phase · 524f15de
      kgardas authored
      Summary:
      Solaris ld emits harmless warning messages about unresolved
      symbol in case of compiling into shared library when we do not
      link against all the required libs. That is the case of GHC which
      does not link against RTS library explicitly in order to be able to
      chose the library later based on binary application linking
      parameters. The warnings look like:
      
      Undefined                       first referenced
       symbol                             in file
      stg_ap_n_fast                       ./T2386_Lib.o
      stg_upd_frame_info                  ./T2386_Lib.o
      templatezmhaskell_LanguageziHaskellziTHziLib_litE_closure ./T2386_Lib.o
      templatezmhaskell_LanguageziHaskellziTHziLib_appE_closure ./T2386_Lib.o
      templatezmhaskell_LanguageziHaskellziTHziLib_conE_closure ./T2386_Lib.o
      templatezmhaskell_LanguageziHaskellziTHziSyntax_mkNameGzud_closure ./T2386_Lib.o
      newCAF                              ./T2386_Lib.o
      stg_bh_upd_frame_info               ./T2386_Lib.o
      stg_ap_ppp_fast                     ./T2386_Lib.o
      templatezmhaskell_LanguageziHaskellziTHziLib_stringL_closure ./T2386_Lib.o
      stg_ap_p_fast                       ./T2386_Lib.o
      stg_ap_pp_fast                      ./T2386_Lib.o
      ld: warning: symbol referencing errors
      
      this is actually coming from T2386 testcase. The emitting of those
      warnings is also a reason why so many TH testcases fail on Solaris.
      
      The patch provides filter which filters out only linker warnings.
      
      Test Plan: validate
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: phaskell, simonmar, relrod, carter
      
      Differential Revision: https://phabricator.haskell.org/D94
      524f15de
  16. 21 Jul, 2014 1 commit
    • Edward Z. Yang's avatar
      Rename PackageId to PackageKey, distinguishing it from Cabal's PackageId. · 4bebab25
      Edward Z. Yang authored
      Summary:
      Previously, both Cabal and GHC defined the type PackageId, and we expected
      them to be roughly equivalent (but represented differently).  This refactoring
      separates these two notions.
      
      A package ID is a user-visible identifier; it's the thing you write in a
      Cabal file, e.g. containers-0.9.  The components of this ID are semantically
      meaningful, and decompose into a package name and a package vrsion.
      
      A package key is an opaque identifier used by GHC to generate linking symbols.
      Presently, it just consists of a package name and a package version, but
      pursuant to #9265 we are planning to extend it to record other information.
      Within a single executable, it uniquely identifies a package.  It is *not* an
      InstalledPackageId, as the choice of a package key affects the ABI of a package
      (whereas an InstalledPackageId is computed after compilation.)  Cabal computes
      a package key for the package and passes it to GHC using -package-name (now
      *extremely* misnamed).
      
      As an added bonus, we don't have to worry about shadowing anymore.
      
      As a follow on, we should introduce -current-package-key having the same role as
      -package-name, and deprecate the old flag.  This commit is just renaming.
      
      The haddock submodule needed to be updated.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: simonpj, simonmar, hvr, austin
      
      Subscribers: simonmar, relrod, carter
      
      Differential Revision: https://phabricator.haskell.org/D79
      
      Conflicts:
      	compiler/main/HscTypes.lhs
      	compiler/main/Packages.lhs
      	utils/haddock
      4bebab25
  17. 02 Jul, 2014 1 commit
  18. 23 Jun, 2014 1 commit
  19. 15 May, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Add LANGUAGE pragmas to compiler/ source files · 23892440
      Herbert Valerio Riedel authored
      In some cases, the layout of the LANGUAGE/OPTIONS_GHC lines has been
      reorganized, while following the convention, to
      
      - place `{-# LANGUAGE #-}` pragmas at the top of the source file, before
        any `{-# OPTIONS_GHC #-}`-lines.
      
      - Moreover, if the list of language extensions fit into a single
        `{-# LANGUAGE ... -#}`-line (shorter than 80 characters), keep it on one
        line. Otherwise split into `{-# LANGUAGE ... -#}`-lines for each
        individual language extension. In both cases, try to keep the
        enumeration alphabetically ordered.
        (The latter layout is preferable as it's more diff-friendly)
      
      While at it, this also replaces obsolete `{-# OPTIONS ... #-}` pragma
      occurences by `{-# OPTIONS_GHC ... #-}` pragmas.
      23892440
  20. 04 Apr, 2014 1 commit
    • Austin Seipp's avatar
      windows: Fix #8870 · f0af58df
      Austin Seipp authored
      This bumps the amount of default reserved and committed stack for GHC
      executables to 8mb, to work around #8870. A proper fix should happen in
      7.8.2
      
      See note [Windows stack usage] in SysTools for the details.
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      f0af58df
  21. 28 Jan, 2014 1 commit
  22. 16 Jan, 2014 1 commit
  23. 14 Jan, 2014 2 commits
  24. 07 Jan, 2014 1 commit
  25. 08 Nov, 2013 1 commit
    • parcs's avatar
      SysTools.getTempDir: don't retry after catching a does-not-exist error · 12369d60
      parcs authored
      Previously, a command like
      
      $ ghc -tmpdir blah Foo
      
      where the directory blah/ does not exist, would loop forever: getTempDir
      would repeatedly try to create a temporary subdirectory inside blah/,
      catching the does-not-exist error thrown by createDirectory and
      retrying, in vain, with another suffix.
      
      Now instead the above compiler invocation will fail with an error:
      
      blah/ghc25781_0: createDirectory: does not exist (No such file or directory)
      12369d60
  26. 04 Sep, 2013 1 commit
  27. 28 Aug, 2013 1 commit
    • thoughtpolice's avatar
      Rework how iOS does linking (#8127) · 98b0d05d
      thoughtpolice authored
      iOS has some particular constraints about how applications can be built:
      
       * We must generate a static library (.a) since XCode does the final
         link.
       * We need to carefully give the right set of arguments to libtool in
         the case we're generating an archive.
       * Dynamic linking isn't supported.
       * It can only be done on OS X.
      
      This patch cleans up all of the above. We add a new flag `-staticlib`
      (only supported on Darwin) that allows us to produce archive files using
      libtool, and a -pgmlibtool flag to control which 'libtool' executable to
      use.
      
      This fixes #8127. I believe this is the last piece missing from the iOS
      cross compiler.
      Authored-by: lukexi's avatarLuke Iannini <lukexi@me.com>
      Authored-by: maxs's avatarMaxwell Swadling <maxwellswadling@gmail.com>
      Authored-by: default avatarStephen Blackheath <...@blacksapphire.com>
      Signed-off-by: thoughtpolice's avatarAustin Seipp <aseipp@pobox.com>
      98b0d05d
  28. 27 Aug, 2013 1 commit
  29. 17 Jun, 2013 1 commit
    • thoughtpolice's avatar
      Detect linker information at runtime. Fixes Trac #6063 · 71a194d8
      thoughtpolice authored
      Previously, we did ./configure time checks to see if 'GNU ld' supported
      certain options. If it does, we bake those options into the link step.
      See Trac #5240.
      
      Unfortunately, the linker we use at runtime can change for several
      reasons. One is that the user specifies -pgml 'foo'. The other is if
      /usr/bin/ld or whatnot changes from when GHC was built.  Those options
      mentioned earlier are specific to GNU ld, but many systems support GNU
      gold too. This is Trac #6063.
      
      So we need to check at runtime what linker we're using. This is actually
      a little bit complicated because we normally use the C compiler as our
      linker. Windows and OS X are also special here.
      
      Finally, this patch also unconditionally gives '--hash-size=31' and
      '--reduce-memory-overheads' to the system linker if it's GNU ld. These
      options have been supported for 8+ years from what I can see, and there
      are probably a lot of other reasons why GHC would not work with such an
      ancient binutils, all things considered.
      
      See Note [Run-time linker info] in SysTools for details. There are
      plenty of comments as well in the surrounding code.
      Signed-off-by: thoughtpolice's avatarAustin Seipp <aseipp@pobox.com>
      71a194d8
  30. 21 May, 2013 1 commit
  31. 15 May, 2013 1 commit
  32. 18 Mar, 2013 1 commit
  33. 25 Feb, 2013 1 commit
    • Gabor Greif's avatar
      Split SettingsCCompilerFlags into non-link and link portions · 890f4657
      Gabor Greif authored
      This fixes certain older GCCs which do not accept link options when assembling or compiling:
      
        ppc_85xx-gcc: --hash-size=31: linker input file unused because linking not done
        ppc_85xx-gcc: --reduce-memory-overheads: linker input file unused because linking not done
      
      and diagnose this to stderr.
      890f4657
  34. 30 Jan, 2013 2 commits
  35. 23 Jan, 2013 1 commit
  36. 29 Nov, 2012 1 commit
  37. 16 Oct, 2012 1 commit
    • ian@well-typed.com's avatar
      Some alpha renaming · cd33eefd
      ian@well-typed.com authored
      Mostly d -> g (matching DynFlag -> GeneralFlag).
      Also renamed if* to when*, matching the Haskell if/when names
      cd33eefd
  38. 13 Oct, 2012 1 commit