Zubin pushed to branch wip/26296 at Glasgow Haskell Compiler / GHC

Commits:

3 changed files:

Changes:

  • .gitlab/ci.sh
    ... ... @@ -197,9 +197,6 @@ function set_toolchain_paths() {
    197 197
           CABAL="$toolchain/bin/cabal$exe"
    
    198 198
           HAPPY="$toolchain/bin/happy$exe"
    
    199 199
           ALEX="$toolchain/bin/alex$exe"
    
    200
    -      if [ "$(uname)" = "FreeBSD" ]; then
    
    201
    -        GHC=/usr/local/bin/ghc
    
    202
    -      fi
    
    203 200
           ;;
    
    204 201
         nix)
    
    205 202
           if [[ ! -f toolchain.sh ]]; then
    
    ... ... @@ -275,14 +272,38 @@ function setup() {
    275 272
     }
    
    276 273
     
    
    277 274
     function fetch_ghc() {
    
    275
    +  local should_fetch=false
    
    276
    +  
    
    278 277
       if [ ! -e "$GHC" ]; then
    
    278
    +    should_fetch=true
    
    279
    +  elif [ -n "${GHC_VERSION:-}" ]; then
    
    280
    +    local current_version
    
    281
    +    if current_version=$($GHC --numeric-version 2>/dev/null); then
    
    282
    +      if [ "$current_version" != "$GHC_VERSION" ]; then
    
    283
    +        info "GHC version mismatch: found $current_version, expected $GHC_VERSION"
    
    284
    +        should_fetch=true
    
    285
    +      fi
    
    286
    +    else
    
    287
    +      info "Could not determine GHC version, will fetch"
    
    288
    +      should_fetch=true
    
    289
    +    fi
    
    290
    +  fi
    
    291
    +  
    
    292
    +  if [ "$should_fetch" = true ]; then
    
    279 293
           local v="$GHC_VERSION"
    
    280 294
           if [[ -z "$v" ]]; then
    
    281 295
               fail "neither GHC nor GHC_VERSION are not set"
    
    282 296
           fi
    
    283 297
     
    
    284 298
           start_section fetch-ghc "Fetch GHC"
    
    285
    -      url="https://downloads.haskell.org/~ghc/${GHC_VERSION}/ghc-${GHC_VERSION}-${boot_triple}.tar.xz"
    
    299
    +      case "$(uname)" in
    
    300
    +        FreeBSD)
    
    301
    +          url="https://downloads.haskell.org/ghcup/unofficial-bindists/ghc/${GHC_VERSION}/ghc-${GHC_VERSION}-${boot_triple}.tar.xz"
    
    302
    +          ;;
    
    303
    +        *)
    
    304
    +          url="https://downloads.haskell.org/~ghc/${GHC_VERSION}/ghc-${GHC_VERSION}-${boot_triple}.tar.xz"
    
    305
    +          ;;
    
    306
    +      esac
    
    286 307
           info "Fetching GHC binary distribution from $url..."
    
    287 308
           curl "$url" > ghc.tar.xz || fail "failed to fetch GHC binary distribution"
    
    288 309
           $TAR -xJf ghc.tar.xz || fail "failed to extract GHC binary distribution"
    

  • .gitlab/generate-ci/gen_ci.hs
    ... ... @@ -446,7 +446,7 @@ opsysVariables _ FreeBSD14 = mconcat
    446 446
         -- Prefer to use the system's clang-based toolchain and not gcc
    
    447 447
       , "CC" =: "cc"
    
    448 448
       , "CXX" =: "c++"
    
    449
    -  , "GHC_VERSION" =: "9.6.4"
    
    449
    +  , "GHC_VERSION" =: "9.10.1"
    
    450 450
       , "CABAL_INSTALL_VERSION" =: "3.10.3.0"
    
    451 451
       ]
    
    452 452
     opsysVariables arch (Linux distro) = distroVariables arch distro
    

  • .gitlab/jobs.yaml
    ... ... @@ -1467,7 +1467,7 @@
    1467 1467
           "CC": "cc",
    
    1468 1468
           "CONFIGURE_ARGS": "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check",
    
    1469 1469
           "CXX": "c++",
    
    1470
    -      "GHC_VERSION": "9.6.4",
    
    1470
    +      "GHC_VERSION": "9.10.1",
    
    1471 1471
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    1472 1472
           "RUNTEST_ARGS": "",
    
    1473 1473
           "TEST_ENV": "x86_64-freebsd14-validate",
    
    ... ... @@ -4355,7 +4355,7 @@
    4355 4355
           "CC": "cc",
    
    4356 4356
           "CONFIGURE_ARGS": "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check",
    
    4357 4357
           "CXX": "c++",
    
    4358
    -      "GHC_VERSION": "9.6.4",
    
    4358
    +      "GHC_VERSION": "9.10.1",
    
    4359 4359
           "IGNORE_PERF_FAILURES": "all",
    
    4360 4360
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    4361 4361
           "RUNTEST_ARGS": "",
    
    ... ... @@ -5782,7 +5782,7 @@
    5782 5782
           "CC": "cc",
    
    5783 5783
           "CONFIGURE_ARGS": "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check",
    
    5784 5784
           "CXX": "c++",
    
    5785
    -      "GHC_VERSION": "9.6.4",
    
    5785
    +      "GHC_VERSION": "9.10.1",
    
    5786 5786
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    5787 5787
           "RUNTEST_ARGS": "",
    
    5788 5788
           "TEST_ENV": "x86_64-freebsd14-validate"