Skip to content
Snippets Groups Projects
  1. Feb 06, 2025
    • Cheng Shao's avatar
      Remove obsolete cross-port script · 4e326aba
      Cheng Shao authored
      This patch removes the obsolete cross-port script in the tree. The
      script was based on the legacy Make build system which has been pruned
      from the tree long ago. For hadrian, proper support for two-stage
      bootstrapping onto a new unsupported platform is a work in progress in
      !11444.
      
      (cherry picked from commit 00d551bf)
      (cherry picked from commit 329a26da)
      (cherry picked from commit 3f3be277)
      4e326aba
  2. Feb 22, 2024
    • Ben Gamari's avatar
      hadrian: Generate HSC2HS_EXTRAS variable in bindist installation · 2eca9c7a
      Ben Gamari authored and Zubin's avatar Zubin committed
      We must generate the hsc2hs wrapper at bindist installation time since
      it must contain `--lflag` and `--cflag` arguments which depend upon the
      installation path.
      
      The solution here is to substitute these variables in the configure
      script (see mk/hsc2hs.in). This is then copied over a dummy wrapper in
      the install rules.
      
      Fixes #24050.
      
      (cherry picked from commit efcbad2d)
      2eca9c7a
  3. Feb 09, 2024
    • Rodrigo Mesquita's avatar
      darwin: Fix single_module is obsolete warning · b746f8a8
      Rodrigo Mesquita authored and Zubin's avatar Zubin committed
      In XCode 15's linker, -single_module is the default and otherwise
      passing it as a flag results in a warning being raised:
      
          ld: warning: -single_module is obsolete
      
      This patch fixes this warning by, at configure time, determining whether
      the linker supports -single_module (which is likely false for all
      non-darwin linkers, and true for darwin linkers in previous versions of
      macOS), and using that information at runtime to decide to pass or not
      the flag in the invocation.
      
      Fixes #24168
      
      (cherry picked from commit e6c803f7)
      (cherry picked from commit 273f5a3f)
      b746f8a8
    • Rodrigo Mesquita's avatar
      Suppress duplicate librares linker warning of new macOS linker · 55bbea03
      Rodrigo Mesquita authored and Zubin's avatar Zubin committed
      Fixes #24167
      
      XCode 15 introduced a new linker which warns on duplicate libraries being
      linked. To disable this warning, we pass -Wl,-no_warn_duplicate_libraries as
      suggested by Brad King in CMake issue #25297.
      
      This flag isn't necessarily available to other linkers on darwin, so we must
      only configure it into the CC linker arguments if valid.
      
      (cherry picked from commit e98051a5)
      55bbea03
  4. Feb 08, 2024
  5. Jan 30, 2024
    • Ben Gamari's avatar
      distrib: Rediscover otool and install_name_tool on Darwin · 1b7b1345
      Ben Gamari authored and Zubin's avatar Zubin committed
      In the bindist configure script we must rediscover the `otool` and
      `install_name_tool`s since they may be different from the build
      environment.
      
      Fixes #24211.
      
      (cherry picked from commit 292983c8)
      1b7b1345
    • Moritz Angermann's avatar
      Drop hard Xcode dependency · 38cb7fb4
      Moritz Angermann authored and Zubin's avatar Zubin committed
      XCODE_VERSION calls out to `xcodebuild`, which is only available
      when having `Xcode` installed. The CommandLineTools are not
      sufficient. To install Xcode, you must have an apple id to download
      the Xcode.xip from apple.
      
      We do not use xcodebuild anywhere in our build explicilty. At best
      it appears to be a proxy for checking the linker or the compiler.
      These should rather be done with
      ```
      xcrun ld -version
      ```
      or similar, and not by proxy through Xcode. The CLR should be
      sufficient for building software on macOS.
      
      (cherry picked from commit a3ee3b99)
      38cb7fb4
  6. Aug 08, 2023
    • Luite Stegeman's avatar
      JS: Improve compatibility with recent emsdk · 14ed9727
      Luite Stegeman authored and Ben Gamari's avatar Ben Gamari committed
      The JavaScript code in libraries/base/jsbits/base.js had some
      hardcoded offsets for fields in structs, because we expected
      the layout of the data structures to remain unchanged. Emsdk
      3.1.42 changed the layout of the stat struct, breaking this
      assumption, and causing code in .hsc files accessing the
      stat struct to fail.
      
      This patch improves compatibility with recent emsdk by
      removing the assumption that data layouts stay unchanged:
      
          1. offsets of fields in structs used by JavaScript code are
             now computed by the configure script, so both the .js and
             .hsc files will automatically use the new layout if anything
             changes.
          2. the distrib/configure script checks that the emsdk version
             on a user's system is the same version that a bindist was
             booted with, to avoid data layout inconsistencies
      
      See #23641
      
      (cherry picked from commit aa07402e)
      14ed9727
  7. Jun 13, 2023
    • Rodrigo Mesquita's avatar
      Configure -Qunused-arguments instead of hardcoding it · c6741e72
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      When GHC invokes clang, it currently passes -Qunused-arguments to
      discard warnings resulting from GHC using multiple options that aren't
      used.
      
      In this commit, we configure -Qunused-arguments into the Cc options
      instead of checking if the compiler is clang at runtime and hardcoding
      the flag into GHC.
      
      This is part of the effort to centralise toolchain information in
      toolchain target files at configure time with the end goal of a runtime
      retargetable GHC.
      
      This also means we don't need to call getCompilerInfo ever, which
      improves performance considerably (see !10589).
      
      Metric Decrease:
          PmSeriesG
          T10421
          T11303b
          T12150
          T12227
          T12234
          T12425
          T13035
          T13253-spj
          T13386
          T15703
          T16875
          T17836b
          T17977
          T17977b
          T18140
          T18282
          T18304
          T18698a
          T18698b
          T18923
          T20049
          T21839c
          T3064
          T5030
          T5321FD
          T5321Fun
          T5837
          T6048
          T9020
          T9198
          T9872d
          T9961
      c6741e72
  8. May 30, 2023
    • Ben Gamari's avatar
      Move via-C flags into GHC · 6629f1c5
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      These were previously hardcoded in configure (with no option for
      overriding them) and simply passed onto ghc through the settings file.
      
      Since configure already guarantees gcc supports those flags, we simply
      move them into GHC.
      6629f1c5
  9. May 11, 2023
    • Rodrigo Mesquita's avatar
      Move "target has RTS linker" out of settings · c17bb82f
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      We move the "target has RTS linker" information out of configure into a
      predicate in GHC, and remove this option from the settings file where it
      is unnecessary -- it's information statically known from the platform.
      
      Note that previously we would consider `powerpc`s and `s390x`s other
      than `powerpc-ibm-aix*` and `s390x-ibm-linux` to have an RTS linker,
      but the RTS linker supports neither platform.
      
      Closes #23361
      c17bb82f
  10. Mar 06, 2023
  11. Jan 28, 2023
  12. Jan 10, 2023
  13. Jan 06, 2023
  14. Dec 21, 2022
  15. Nov 11, 2022
  16. Aug 26, 2022
  17. Aug 07, 2022
    • Ben Gamari's avatar
      hadrian: Don't use mk/config.mk.in · afa584a3
      Ben Gamari authored
      Ultimately we want to drop mk/config.mk so here I extract the bits
      needed by the Hadrian bindist installation logic into a Hadrian-specific
      file. While doing this I fixed binary distribution installation, #21901.
      afa584a3
    • Ben Gamari's avatar
      hadrian: Fix binary distribution install attributes · 09bca1de
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Previously we would use plain `cp` to install various parts of the
      binary distribution. However, `cp`'s behavior w.r.t. file attributes is
      quite unclear; for this reason it is much better to rather use
      `install`.
      
      Fixes #21965.
      09bca1de
  18. Jul 18, 2022
  19. Jul 04, 2022
    • Matthew Pickering's avatar
      hadrian: Add --haddock-base-url option for specifying base-url when generating docs · d002c6e0
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      The motiviation for this flag is to be able to produce documentation
      which is suitable for uploading for hackage, ie, the cross-package links
      work correctly.
      
      There are basically three values you want to set this to:
      
      * off - default, base_url = ../%pkg% which works for local browsing
      * on - no argument , base_url = https:://hackage.haskell.org/package/%pkg%/docs - for hackage docs upload
      * on - argument, for example, base_url = http://localhost:8080/package/%pkg%/docs for testing the documentation.
      
      The `%pkg%` string is a template variable which is replaced with the
      package identifier for the relevant package.
      
      This is one step towards fixing #21749
      d002c6e0
  20. May 26, 2022
  21. May 19, 2022
    • Ben Gamari's avatar
      configure: Check CC_STAGE0 for --target support · 35bdab1c
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      We previously only checked the stage 1/2 compiler
      for --target support. We got away with this for quite a while but it
      eventually caught up with us in #21579, where `bytestring`'s new NEON
      implementation was unbuildable on Darwin due to Rosetta's seemingly
      random logic for determining which executable image to execute. This
      lead to a confusing failure to build `bytestring`'s cbits, when `clang`
      tried to compile NEON builtins while targetting x86-64.
      
      Fix this by checking CC_STAGE0 for --target support.
      
      Fixes #21579.
      35bdab1c
  22. May 17, 2022
    • Ben Gamari's avatar
      Introduce package to capture dependency on C++ stdlib · 0ef249aa
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Here we introduce a new "virtual" package into the initial package
      database, `system-cxx-std-lib`. This gives users a convenient, platform
      agnostic way to link against C++ libraries, addressing #20010.
      
      Fixes #20010.
      0ef249aa
    • Ben Gamari's avatar
      driver: Introduce pgmcxx · fb579e15
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Here we introduce proper support for compilation of C++ objects. This
      includes:
      
       * logic in `configure` to detect the C++ toolchain and propagating this
         information into the `settings` file
       * logic in the driver to use the C++ toolchain when compiling C++
         sources
      fb579e15
  23. May 11, 2022
  24. Apr 06, 2022
  25. Mar 07, 2022
  26. Nov 27, 2021
  27. Oct 31, 2021
  28. Oct 20, 2021
    • Ben Gamari's avatar
      hadrian: Fix binary-dist support for cross-compilers · 5f274fbf
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Previously the logic which called ghc-pkg failed to account for the fact
      that the executable name may be prefixed with a triple. Moreover, the
      call must occur before we delete the settings file as ghc-pkg needs the
      latter.
      
      Fixes #20267.
      5f274fbf
  29. Oct 13, 2021
  30. Sep 23, 2021
  31. Sep 22, 2021
  32. Sep 11, 2021
  33. Jul 27, 2021
Loading