Skip to content
Snippets Groups Projects
  1. Feb 08, 2024
    • Matthew Pickering's avatar
      Use specific clang assembler when compiling with -fllvm · ab533e71
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      There are situations where LLVM will produce assembly which older gcc
      toolchains can't handle. For example on Deb10, it seems that LLVM >= 13
      produces assembly which the default gcc doesn't support.
      
      A more robust solution in the long term is to require a specific LLVM
      compatible assembler when using -fllvm.
      
      Fixes #16354
      ab533e71
  2. Feb 03, 2024
    • Rodrigo Mesquita's avatar
      Work around autotools setting C11 standard in CC/CXX · cdddeb0f
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot 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
      cdddeb0f
  3. Jan 20, 2024
  4. Jan 04, 2024
  5. Dec 21, 2023
    • Matthew Pickering's avatar
      hadrian: Build all executables in bin/ folder · f7e21fab
      Matthew Pickering authored
      In the end the bindist creation logic copies them all into the bin
      folder. There is no benefit to building a specific few binaries in the
      lib/bin folder anymore.
      
      This also removes the ad-hoc logic to copy the touchy and unlit
      executables from stage0 into stage1. It takes <1s to build so we might
      as well just build it.
      f7e21fab
  6. Dec 13, 2023
    • Moritz Angermann's avatar
      Drop hard Xcode dependency · a3ee3b99
      Moritz Angermann authored and Marge Bot's avatar Marge Bot 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.
      a3ee3b99
  7. Nov 15, 2023
    • Rodrigo Mesquita's avatar
      configure: check target (not build) understands -no_compact_unwind · af261ccd
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      Previously, we were branching on whether the build system was darwin to
      shortcut this check, but we really want to branch on whether the target
      system (which is what we are configuring ld_prog for) is darwin.
      af261ccd
    • Rodrigo Mesquita's avatar
      darwin: Fix single_module is obsolete warning · e6c803f7
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot 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
      e6c803f7
    • Rodrigo Mesquita's avatar
      Suppress duplicate librares linker warning of new macOS linker · e98051a5
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot 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.
      e98051a5
  8. Oct 31, 2023
  9. Oct 22, 2023
  10. Oct 12, 2023
    • John Ericson's avatar
      Split BFD support to RTS configure · f399812c
      John Ericson authored and Marge Bot's avatar Marge Bot committed
      The flag is still in the top-level configure, but the other checks
      (which define various macros --- important) are in the RTS configure.
      f399812c
    • John Ericson's avatar
      Adjust `FP_FIND_LIBFFI` · ea7a1447
      John Ericson authored and Marge Bot's avatar Marge Bot committed
      Just set vars, and `AC_SUBST` in top-level configure.
      
      Don't define `HAVE_SYSTEM_LIBFFI` because nothing is using it. It hasn't
      be in used since 36093407 (part of the
      make build system).
      ea7a1447
  11. Oct 11, 2023
  12. Oct 10, 2023
    • Ben Gamari's avatar
      configure: Probe stage0 link flags · c00a4bd6
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      For consistency with later stages and CC.
      c00a4bd6
    • Ben Gamari's avatar
      toolchain: Don't pass --target to emscripten toolchain · 0720fde7
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      As noted in `Note [Don't pass --target to emscripten toolchain]`,
      emscripten's `emcc` is rather inconsistent with respect to its treatment
      of the `--target` flag. Avoid this by special-casing this toolchain
      in the `configure` script and `ghc-toolchain`.
      
      Fixes on aspect of #23744.
      0720fde7
    • Matthew Pickering's avatar
      configure: Check whether -no-pie works when the C compiler is used as a linker · 1f0de49a
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      `-no-pie` is a flag we pass when using the C compiler as a linker (see
      pieCCLDOpts in GHC.Driver.Session) so we should test whether the C
      compiler used as a linker supports the flag, rather than just the C
      compiler.
      1f0de49a
    • Matthew Pickering's avatar
      configure: Error when ghc-toolchain fails to compile · 9b2dfd21
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This is a small QOL change as if you are working on ghc-toolchain and it
      fails to compile then configure will continue and can give you outdated
      results.
      9b2dfd21
    • Matthew Pickering's avatar
      Check for --target linker flag separately to C compiler · 89a0918d
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      There are situations where the C compiler doesn't accept `--target` but
      when used as a linker it does (but doesn't do anything most likely)
      
      In particular with old gcc toolchains, the C compiler doesn't support
      --target but when used as a linker it does.
      89a0918d
    • Matthew Pickering's avatar
      configure: AC_PATH_TARGET_TOOL for LD · d8da73cd
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      We want to make sure that LD is set to an absolute path in order to be
      consistent with the `LD=$(command -v ld)` call. The AC_PATH_TARGET_TOOL
      macro uses the absolute path rather than AC_CHECK_TARGET_TOOL which
      might use a relative path.
      d8da73cd
    • Matthew Pickering's avatar
      Add same LD hack to ghc-toolchain · 1a5bc0b5
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      In the ./configure script, if you pass the `LD` variable then this has
      the effect of stopping use searching for a linker and hence passing
      `-fuse-ld=...`.
      
      We want to emulate this logic in ghc-toolchain, if a use explicilty
      specifies `LD` variable then don't add `-fuse-ld=..` with the goal of
      making ./configure and ghc-toolchain agree on which flags to use when
      using the C compiler as a linker.
      
      This is quite unsavoury as we don't bake the choice of LD into the
      configuration anywhere but what's important for now is making
      ghc-toolchain and ./configure agree as much as possible.
      
      See #23857 for more discussion
      1a5bc0b5
  13. Oct 04, 2023
    • Ben Gamari's avatar
      configure: Fix #21712 again · f6b2751f
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      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.
      f6b2751f
  14. Sep 30, 2023
  15. Sep 23, 2023
  16. Sep 19, 2023
  17. Sep 13, 2023
  18. Sep 08, 2023
  19. Aug 23, 2023
    • sheaf's avatar
      Apply shellcheck suggestion to SUBST_TOOLDIR · c82770f5
      sheaf authored and Marge Bot's avatar Marge Bot committed
      c82770f5
    • Matthew Pickering's avatar
      configure: Set WindresCmd directly and removed unused variables · 03fad42e
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      For some reason there was an indirection via the Windres variable before
      setting WindresCmd. That indirection led to #23855.
      
      I then also noticed that these other variables were just not used
      anywhere when trying to work out what the correct condition was for this
      bit of the configure script.
      03fad42e
    • Matthew Pickering's avatar
      Abstract windows toolchain setup · 9cac8f11
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This commit splits up the windows toolchain setup logic into two
      functions.
      
      * FP_INSTALL_WINDOWS_TOOLCHAIN - deals with downloading the toolchain if
        it isn't already downloaded
      * FP_SETUP_WINDOWS_TOOLCHAIN - sets the environment variables to point
        to the correct place
      
      FP_SETUP_WINDOWS_TOOLCHAIN is abstracted from the location of the mingw
      toolchain and also the eventual location where we will install the
      toolchain in the installed bindist.
      
      This is the first step towards #23608
      9cac8f11
  20. Aug 16, 2023
Loading