Skip to content
Snippets Groups Projects
  1. Feb 06, 2025
  2. Sep 30, 2024
    • Rodrigo Mesquita's avatar
      configure: Do not override existing linker flags in FP_LD_NO_FIXUP_CHAINS · 894710fb
      Rodrigo Mesquita authored and Ben Gamari's avatar Ben Gamari committed
      (cherry picked from commit 9460d504)
      894710fb
    • Rodrigo Mesquita's avatar
      configure: Use LDFLAGS when trying linkers · 10a6aa18
      Rodrigo Mesquita authored and Ben Gamari's avatar Ben Gamari committed
      A user may configure `LDFLAGS` but not `LD`. When choosing a linker, we
      will prefer `ldd`, then `ld.gold`, then `ld.bfd` -- however, we have to
      check for a working linker. If either of these fail, we try the next in
      line.
      
      However, we were not considering the `$LDFLAGS` when checking if these
      linkers worked. So we would pick a linker that does not support the
      current $LDFLAGS and fail further down the line when we used that linker
      with those flags.
      
      Fixes #24565, where `LDFLAGS=-Wl,-z,pack-relative-relocs` is not
      supported by `ld.gold` but that was being picked still.
      
      (cherry picked from commit 32a8103f)
      10a6aa18
  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
    • Rodrigo Mesquita's avatar
      Work around autotools setting C11 standard in CC/CXX · 81cb68aa
      Rodrigo Mesquita authored and Zubin's avatar Zubin committed
      In autoconf >=2.70, C11 is set by default for $CC and $CXX via the
      -std=...11 flag. In this patch, we split the "-std" flag out of the $CC
      and $CXX variables, which we traditionally assume to be just the
      executable name/path, and move it to $CFLAGS/$CXXFLAGS instead.
      
      Fixes #24324
      
      (cherry picked from commit cdddeb0f)
      81cb68aa
  5. Jan 30, 2024
    • mmzk1526's avatar
      Use "-V" for alex version check for better backward compatibility · 28fff112
      mmzk1526 authored and Zubin's avatar Zubin committed
      Fixes #24302.
      In recent versions of alex, "-v" is used for "--verbose" instead of "-version".
      
      (cherry picked from commit c7be0c68)
      28fff112
    • 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. Oct 05, 2023
    • Ben Gamari's avatar
      configure: Fix #21712 again · 2a51d113
      Ben Gamari authored
      This is a bit of a shot in the dark to fix #24033, which appears to be
      another instance of #21712. For some reason the ld-override logic
      *still* appears to be active on Darwin targets (or at least one).
      Consequently, on misconfigured systems we may choose a non-`ld64`
      linker.
      
      It's a bit unclear exactly what happened in #24033 but ultimately the
      check added for #21712 was not quite right, checking for the
      `ghc_host_os` (the value of which depends upon the bootstrap compiler)
      instead of the target platform. Fix this.
      
      Fixes #24033.
      
      (cherry picked from commit f6b2751f)
      2a51d113
  7. Sep 27, 2023
  8. Sep 15, 2023
  9. 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
  10. Jun 19, 2023
    • Finley McIlwaine's avatar
      IPE data compression · cb9e1ce4
      Finley McIlwaine authored
      IPE data resulting from the `-finfo-table-map` flag may now be
      compressed by configuring the GHC build with the
      `--enable-ipe-data-compression` flag. This results in about a 20%
      reduction in the size of IPE-enabled build results.
      
      The compression library, zstd, may optionally be statically linked by
      configuring with the `--enabled-static-libzstd` flag (on non-darwin
      platforms)
      
      libzstd version 1.4.0 or greater is required.
      cb9e1ce4
  11. 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
  12. Jun 07, 2023
  13. Jun 01, 2023
  14. 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
  15. May 24, 2023
    • Rodrigo Mesquita's avatar
      configure: Fix support check for response files. · a320ca76
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      In failing to escape the '-o' in '-o\nconftest\nconftest.o\n' argument
      to printf, the writing of the arguments response file always failed.
      
      The fix is to pass the arguments after `--` so that they are treated
      positional arguments rather than flags to printf.
      
      Closes #23435
      a320ca76
  16. May 18, 2023
  17. May 15, 2023
  18. Mar 16, 2023
    • Ben Gamari's avatar
      configure: Fix FIND_CXX_STD_LIB test on Darwin · 6e3ce9a4
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Annoyingly, Darwin's <cstddef> includes <version> and APFS is
      case-insensitive. Consequently, it will end up #including the
      `VERSION` file generated by the `configure` script on the second
      and subsequent runs of the `configure` script.
      
      See #23116.
      6e3ce9a4
  19. Mar 06, 2023
  20. Feb 06, 2023
    • Sylvain Henry's avatar
      JS: replace "js" architecture with "javascript" · 6636b670
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      
      Despite Cabal supporting any architecture name, `cabal --check` only
      supports a few built-in ones. Sadly `cabal --check` is used by Hackage
      hence using any non built-in name in a package (e.g. `arch(js)`) is
      rejected and the package is prevented from being uploaded on Hackage.
      
      Luckily built-in support for the `javascript` architecture was added for
      GHCJS a while ago. In order to allow newer `base` to be uploaded on
      Hackage we make the switch from `js` to `javascript` architecture.
      
      Fixes #22740.
      
      Co-authored-by: default avatarBen Gamari <ben@smart-cactus.org>
      6636b670
  21. Feb 03, 2023
  22. Jan 25, 2023
  23. Jan 19, 2023
    • John Ericson's avatar
      Give the RTS it's own configure script · eb5a6b91
      John Ericson authored and Marge Bot's avatar Marge Bot committed
      Currently it doesn't do much anything, we are just trying to introduce
      it without breaking the build. Later, we will move functionality from
      the top-level configure script over to it.
      
      We need to bump Cabal for https://github.com/haskell/cabal/pull/8649; to
      facilitate and existing hack of skipping some configure checks for the
      RTS we now need to skip just *part* not *all* of the "post configure"
      hook, as running the configure script (which we definitely want to do)
      is also implemented as part of the "post configure" hook. But doing this
      requires exposing functionality that wasn't exposed before.
      eb5a6b91
  24. Jan 12, 2023
  25. Jan 11, 2023
  26. Jan 10, 2023
  27. Jan 07, 2023
  28. Jan 06, 2023
Loading