Skip to content
Snippets Groups Projects
  1. Feb 06, 2025
  2. Dec 20, 2024
  3. Nov 13, 2024
  4. Oct 15, 2024
  5. Feb 20, 2024
  6. 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
  7. Feb 08, 2024
  8. Jan 30, 2024
    • 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
  9. Oct 07, 2023
  10. Sep 27, 2023
  11. Sep 15, 2023
  12. Aug 08, 2023
    • Ben Gamari's avatar
      configure: Derive library version from ghc-prim.cabal.in · d3e3e708
      Ben Gamari authored
      Since ghc-prim.cabal is now generated by Hadrian, we cannot depend upon
      it.
      
      Closes #23726.
      
      (cherry picked from commit 01961be3)
      d3e3e708
    • 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
  13. Jul 21, 2023
  14. Jul 07, 2023
  15. Jun 21, 2023
  16. 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
  17. 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
  18. Jun 09, 2023
    • Ryan Scott's avatar
      Restore mingwex dependency on Windows · 2b1a4abe
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      This partially reverts some of the changes in !9475 to make `base` and
      `ghc-prim` depend on the `mingwex` library on Windows. It also restores the
      RTS's stubs for `mingwex`-specific symbols such as `_lock_file`.
      
      This is done because the C runtime provides `libmingwex` nowadays, and
      moreoever, not linking against `mingwex` requires downstream users to link
      against it explicitly in difficult-to-predict circumstances. Better to always
      link against `mingwex` and prevent users from having to do the guesswork
      themselves.
      
      See ghc/ghc!10360 (comment 495873) for
      the discussion that led to this.
      2b1a4abe
  19. Jun 07, 2023
  20. Jun 01, 2023
  21. 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
  22. May 16, 2023
    • Rodrigo Mesquita's avatar
      configure: Drop unused AC_PROG_CPP · d986c98e
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      In configure, we were calling `AC_PROG_CPP` but never making use of the
      $CPP variable it sets or reads.
      
      The issue is $CPP will show up in the --help output of configure,
      falsely advertising a configuration option that does nothing.
      
      The reason we don't use the $CPP variable is because HS_CPP_CMD is
      expected to be a single command (without flags), but AC_PROG_CPP, when
      CPP is unset, will set said variable to something like `/usr/bin/gcc -E`.
      Instead, we configure HS_CPP_CMD through $CC.
      d986c98e
  23. 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
  24. Apr 24, 2023
    • Cheng Shao's avatar
      rts: always build 64-bit atomic ops · 87095f6a
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      This patch does a few things:
      
      - Always build 64-bit atomic ops in rts/ghc-prim, even on 32-bit
        platforms
      - Remove legacy "64bit" cabal flag of rts package
      - Fix hs_xchg64 function prototype for 32-bit platforms
      - Fix AtomicFetch test for wasm32
      87095f6a
  25. Mar 06, 2023
  26. 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
  27. Feb 03, 2023
    • Ryan Scott's avatar
      Windows: Remove mingwex dependency · de1d1512
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      The clang based toolchain uses ucrt as its math library
      and so mingwex is no longer needed.  In fact using mingwex
      will cause incompatibilities as the default routines in both
      have differing ULPs and string formatting modifiers.
      
      ```
      $ LIBRARY_PATH=/mingw64/lib ghc/_build/stage1/bin/ghc Bug.hs -fforce-recomp && ./Bug.exe
      [1 of 2] Compiling Main             ( Bug.hs, Bug.o )
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `__imp___p__environ'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `__hscore_get_errno'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_ForeignziCziError_errnoToIOError_info'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziWindows_failIf2_closure'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncodingziCodePageziAPI_mkCodePageEncoding_info'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncodingziCodePage_currentCodePage_closure'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncoding_getForeignEncoding_closure'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_ForeignziCziString_withCStringLen1_info'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziHandleziInternals_zdwflushCharReadBuffer_info'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziHandleziText_hGetBuf1_info'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziFingerprint_fingerprintString_closure'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_DataziTypeableziInternal_mkTrCon_closure'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziException_errorCallWithCallStackException_closure'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziErr_error_info'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\template-haskell-2.19.0.0\libHStemplate-haskell-2.19.0.0.a: unknown symbol `base_DataziMaybe_fromJust1_info'
      ghc.exe:  | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\template-haskell-2.19.0.0\libHStemplate-haskell-2.19.0.0.a: unknown symbol `templatezmhaskell_LanguageziHaskellziTHziSyntax_IntPrimL_con_info'
      ghc.exe: ^^ Could not load 'templatezmhaskell_LanguageziHaskellziTHziLibziInternal_stringL_closure', dependency unresolved. See top entry above.
      
      <no location info>: error:
      
      GHC.ByteCode.Linker.lookupCE
      During interactive linking, GHCi couldn't find the following symbol:
        templatezmhaskell_LanguageziHaskellziTHziLibziInternal_stringL_closure
      This may be due to you not asking GHCi to load extra object files,
      archives or DLLs needed by your current session.  Restart GHCi, specifying
      the missing library using the -L/path/to/object/dir and -lmissinglibname
      flags, or simply by naming the relevant files on the GHCi command line.
      Alternatively, this link failure might indicate a bug in GHCi.
      If you suspect the latter, please report this as a GHC bug:
        https://www.haskell.org/ghc/reportabug
      ```
      de1d1512
  28. Feb 01, 2023
    • Matthew Pickering's avatar
      Bump supported LLVM range from 10 through 15 to 11 through 16 · 0cc16aaf
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      LLVM 15 turns on the new pass manager by default, which we have yet to
      migrate to so for new we pass the `-enable-new-pm-0` flag in our
      llvm-passes flag.
      
      LLVM 11 was the first version to support the `-enable-new-pm` flag so we
      bump the lowest supported version to 11.
      
      Our CI jobs are using LLVM 12 so they should continue to work despite
      this bump to the lower bound.
      
      Fixes #21936
      0cc16aaf
  29. Jan 31, 2023
  30. Jan 10, 2023
  31. Jan 07, 2023
  32. Jan 06, 2023
Loading