Skip to content
Snippets Groups Projects
  1. Mar 19, 2015
    • Erik de Castro Lopo's avatar
      Use the gold linker for linux/ARM and android/ARM targets. · a86fe8a4
      Erik de Castro Lopo authored and thoughtpolice's avatar thoughtpolice committed
      Fixes #8976 and #9873 by making use of the Binutils ld.gold
      linker explicit whenever the target is linux/ARM or android/ARM.
      This does not affect iOS where Apple provides its own linker.
      
      In order to achieve this, we need to add `-fuse-ld=gold` to
      the SettingsCCompilerLinkFlags setting and set
      SettingsLdCommand to `ld.gold` (or `${target}-ld.gold` when
      cross-compiling). In addition, simplifying the use of
      `$(CONF_GCC_LINKER_OPTS_STAGEn)`.
      
      This patch was tested by ensuring that the following worked
      as expected:
      
        * Native builds on linux/x86_64 (nothing changed).
        * Native builds on linux/arm (and uses the gold linker).
        * Linux to linux/arm cross compiles (and uses the cross
          gold linker).
      
      Contributions by Ben Gamari, Joachim Breitner and Reid Barton.
      
      Reviewers: nomeata, bgamari, austin, rwbarton
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D715
      
      GHC Trac Issues: #8976 #9873
      
      (cherry picked from commit 71fcc4c0)
      a86fe8a4
  2. Feb 23, 2015
    • PHO's avatar
      Make top-level "configure" accept and propagate --with-curses-{includes,libraries} to libraries · d9e24f4e
      PHO authored and thoughtpolice's avatar thoughtpolice committed
      Summary:
      If curses is installed into some non-standard path, we currently have
      to say something like the following in mk/build.mk:
      
        libraries/terminfo_CONFIGURE_OPTS += \
            --configure-option=--with-curses-includes=/somewhere/include \
            --configure-option=--with-curses-libraries=/somewhere/lib
      
      This is because the top-level configure does not accept nor propagate
      --with-curses-{includes,libraries} to libraries while it does so for
      iconv, gmp and libffi. It would be nice if curses were handled in the
      same manner.
      
      Test Plan: Install curses into some non-standard path. Then run the top-level "configure" script with options "--with-curses-includes=/path/to/curses/include" and "--with-curses-libraries=/path/to/curses/lib".
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: thomie, PHO
      
      Differential Revision: https://phabricator.haskell.org/D665
      
      GHC Trac Issues: #10096
      
      (cherry picked from commit bbb57a6b)
      d9e24f4e
  3. Jan 16, 2015
  4. Dec 01, 2014
  5. Nov 27, 2014
    • Herbert Valerio Riedel's avatar
      Embed Git commit id into `ghc --info` output · 73e5e2f8
      Herbert Valerio Riedel authored
      Since we switched to a Git submodule based GHC Git repo, `ghc.git`'s
      commit id uniquely identifies the state of the GHC source-tree. So
      having that information embedded into the `ghc` executable provides
      valuable information to track accurately (especially when created by
      buildbots) from which source-tree-state a given `ghc` snapshot
      (distribution) was generated.
      
      So this commit adds a new field `"Project Git commit id"` to the
      `ghc --info` meta-data containing the `./configure`-time Git commit id
      as reported by `git rev-parse HEAD`.
      
      This field can also be queried with `ghc --print-project-git-commit-id`.
      
      For source distributions, the file `GIT_COMMIT_ID` is created (with some
      sanity checking to detect stale commit ids, as that would render this
      information rather useless)
      
      Reviewed By: austin
      
      Differential Revision: https://phabricator.haskell.org/D528
      73e5e2f8
  6. Nov 19, 2014
  7. Nov 18, 2014
  8. Oct 05, 2014
    • Sergei Trofimovich's avatar
      rts: unrust 'libbfd' debug symbols parser · cb0a503a
      Sergei Trofimovich authored
      
      Summary:
      Patch does the following:
      - fixes detection of working libbfd on modern linux
        platforms (where bfd_uncompress_section_contents is a macro)
      - disables 'bfd' by default and adds '--enable-bfd-debug'
        configure option. As bfd's ABI is unstable
        the feature is primarily useful by ghc hackers.
      
      Not done (subject for another patch):
      - one-time bfd object memory leak in DEBUG_LoadSymbols
      - in '-dynamic' mode debugging symbols are loaded only for
        current executable, not all libraries it is linked against.
      
      Fixes Issue #8790
      
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      
      Test Plan: built unregisterised ghc on amd64 and ran './hello +RTS -Di' there
      
      Reviewers: simonmar, austin
      
      Reviewed By: simonmar, austin
      
      Subscribers: thomie, simonmar, ezyang, carter
      
      Differential Revision: https://phabricator.haskell.org/D193
      
      GHC Trac Issues: #8790
      cb0a503a
    • Herbert Valerio Riedel's avatar
      Implement `MIN_VERSION_GLASGOW_HASKELL()` macro · 3549c952
      Herbert Valerio Riedel authored
      This exposes the `cProjectPatchLevel{1,2}` value at the CPP level to
      allow it to be used in CPP conditionals. Concretely, GHC 7.10.2.20150623
      would result in
      
        #define __GLASGOW_HASKELL__             710
        #define __GLASGOW_HASKELL_PATCHLEVEL1__ 2
        #define __GLASGOW_HASKELL_PATCHLEVEL2__ 20150623
      
      while GHC 7.10.3 results in
      
        #define __GLASGOW_HASKELL__             710
        #define __GLASGOW_HASKELL_PATCHLEVEL1__ 3
      
      and finally GHC 7.9.20141009 results in
      
        #define __GLASGOW_HASKELL__             709
        #define __GLASGOW_HASKELL_PATCHLEVEL1__ 20141009
      
      As it's error-prone to properly express CPP conditionals for testing GHC
      multi-component versions, a new macro `MIN_VERSION_GLASGOW_HASKELL()` is
      provided (also via the new CPP include file `ghcversion.h`)
      
      Finally, in order to make it easier to define the new CPP macro
      `MIN_VERSION_GLASGOW_HASKELL()`, a new default-included
      `include/ghcversion.h` is used for the new CPP definitions.
      
      Reviewed By: ekmett, austin, #ghc
      
      Differential Revision: https://phabricator.haskell.org/D66
      3549c952
  9. Sep 16, 2014
    • rwbarton's avatar
      Find the target gcc when cross-compiling · cfd8c7dd
      rwbarton authored
      Summary:
      "./configure --target=TARGET" was broken; it would use the host gcc.
      (So you had to explicitly specify "--with-gcc=TARGET-gcc" also,
      as a workaround.)
      
      This was broken by commit fc4856f9
      for #8148. A comment claimed that FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL
      was the same as FP_ARG_WITH_PATH_GNU_PROG except for not raising
      an error when the program isn't found; but that wasn't true --
      the former didn't prepend the target name when cross-compiling.
      
      We actually need three versions of FP_ARG_WITH_PATH_GNU_PROG since
      the LLVM tools are usually not prefixed with the target name even
      when cross-compiling. So I generalized the logic in a single macro.
      
      Test Plan:
      Built with "./configure --target=i386-unknown-linux"
      and BuildFlavour=quick, successfully
      
      Reviewers: ezyang, austin
      
      Reviewed By: ezyang, austin
      
      Subscribers: simonmar, ezyang, carter
      
      Differential Revision: https://phabricator.haskell.org/D204
      cfd8c7dd
  10. Sep 09, 2014
    • Austin Seipp's avatar
      Make Applicative a superclass of Monad · d94de872
      Austin Seipp authored
      
      Summary:
      This includes pretty much all the changes needed to make `Applicative`
      a superclass of `Monad` finally. There's mostly reshuffling in the
      interests of avoid orphans and boot files, but luckily we can resolve
      all of them, pretty much. The only catch was that
      Alternative/MonadPlus also had to go into Prelude to avoid this.
      
      As a result, we must update the hsc2hs and haddock submodules.
      
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      
      Test Plan: Build things, they might not explode horribly.
      
      Reviewers: hvr, simonmar
      
      Subscribers: simonmar
      
      Differential Revision: https://phabricator.haskell.org/D13
      d94de872
  11. Sep 01, 2014
    • Austin Seipp's avatar
      Set llc and opt commands on all platforms · 918719b9
      Austin Seipp authored
      Summary:
      LLVM llc and opt commands should be set on all platforms, including
      Windows. If they're not, GHC tries to execute an unnamed executable,
      resulting in error messages such as:
      
          Error (figuring out LLVM version): : runInteractiveProcess: invalid argument (Invalid argument)
          <no location info>:
              Warning: Couldn't figure out LLVM version!
                       Make sure you have installed LLVM
      
      This regression was introduced in e6bfc596.
      
      Test Plan: Build GHC and test if --info shows sensible values of "LLVM llc command" and "LLVM opt command"
      
      Reviewers: austin, #ghc
      
      Reviewed By: austin, #ghc
      
      Subscribers: austin
      
      Projects: #ghc
      
      Differential Revision: https://phabricator.haskell.org/D190
      
      GHC Trac Issues: #7143
      918719b9
  12. Aug 22, 2014
    • pali.gabor@gmail.com's avatar
      Fix #9465. · 030549a1
      pali.gabor@gmail.com authored
      It turned out the sed(1) expressions are not fully portable.  So revist my
      earlier attempt for getting GHC_LDFLAGS in the configure script and rewrite
      it in Perl instead.
      030549a1
  13. Aug 17, 2014
    • kgardas's avatar
      workaround Solaris 11 GNU C CPP issue by using GNU C 3.4 as CPP · 2d42564a
      kgardas authored
      Summary:
      Solaris 11 distributed GNU C 4.5.x is configured in a way that its
      CPP is not working well while invoked from GHC. GHC runs it with
      -x assembler-with-cpp and in this particular configuration GNU C CPP
      does not provide any line-markers so GHC's output of errors or warnings
      is confusing since it points to preprocessed file in /tmp and not
      to the original Haskell file. Fortunately old GNU C 3.4.x is still
      provided by the OS and when installed it'll be used automatically
      as GHC CPP which is whole logic of this patch. So although we use modern
      GCC as a C compiler and assembler we use old GCC as a C preprocessor.
      
      Test Plan: validate
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: phaskell, simonmar, relrod, ezyang, carter
      
      Differential Revision: https://phabricator.haskell.org/D151
      2d42564a
  14. Aug 15, 2014
  15. Jul 28, 2014
  16. Jul 21, 2014
  17. Jul 18, 2014
  18. Jul 14, 2014
    • kgardas's avatar
      add support for x86_64-solaris2 platform · 6da60321
      kgardas authored
      Summary:
      this set of patches adds support for x86_64-solaris2 platform
      Solaris is multi-lib platform which means it provides 32bit user-land together
      with 32bit and 64bit libraries. The 32bit libraries are located in <somewhere>/lib
      directories while 64bit libraries are located in <somewhere>/lib/64 directories.
      This is why GHCi required the fix since otherwise it'll attempt to load
      /usr/lib/libgmp.so which is 32bit library into 64bit binary process space (GHCi).
      This of course fails with wrong ELFCLASS32 error message.
      Another issue was that by default GNU C distributed with Solaris compiles
      into 32bit binary. We need to enforce compilation to 64bit binary
      by adding appropriate -m64 option.
      
      Test Plan: already built on x86_64-solaris2
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: phaskell, simonmar, relrod, carter
      
      Differential Revision: https://phabricator.haskell.org/D68
      6da60321
  19. Jul 04, 2014
  20. Jul 02, 2014
  21. May 03, 2014
  22. Apr 22, 2014
  23. Mar 28, 2014
  24. Mar 27, 2014
  25. Feb 19, 2014
  26. Jan 17, 2014
  27. Oct 15, 2013
  28. Sep 18, 2013
    • Jan Stolarek's avatar
      Restore old names of comparison primops · 53948f91
      Jan Stolarek authored
      In 6579a6c7 we removed existing comparison primops and introduced new ones
      returning Int# instead of Bool. This commit (and associated commits in
      array, base, dph, ghc-prim, integer-gmp, integer-simple, primitive, testsuite and
      template-haskell) restores old names of primops. This allows us to keep
      our API cleaner at the price of not having backwards compatibility.
      
      This patch also temporalily disables fix for #8317 (optimization of
      tagToEnum# at Core level). We need to fix #8326 first, otherwise
      our primops code will be very slow.
      53948f91
    • Jan Stolarek's avatar
      Limit upper versions of Alex and Happy · b6bc3263
      Jan Stolarek authored
      This is temporary until new bool primops have been pushed.
      b6bc3263
  29. Sep 04, 2013
  30. Aug 28, 2013
  31. Aug 24, 2013
  32. Aug 14, 2013
  33. Jul 03, 2013
    • Ian Lynagh's avatar
      Change the ranlib detection · c548fec4
      Ian Lynagh authored
      On Windows, the ranlib in the path may not be the right ranlib (it may
      be the 32bit ranlib when we are making a Win64 compiler, or vice-versa).
      Therefore we can't leave it up to libffi to detect the right ranlib, but
      need to tell it which ranlib to use. This means that we need to find
      ranlib even if we don't actually need it ourselves.
      c548fec4
  34. Jun 20, 2013
Loading