Skip to content
Snippets Groups Projects

Draft: CI: add cross compiling and testing for LoongArch64

Closed Ticat Fp requested to merge fp/ghc:ci-la64 into master
2 unresolved threads

Starting to implement CI pipelines for LoongArch64 cross compiling and testing.

Merge request reports

Merge request pipeline #108543 failed

Merge request pipeline failed for e1f54039

Approval is optional

Closed by Ticat FpTicat Fp 10 hours ago (Mar 29, 2025 2:29am UTC)

Merge details

  • The changes were not merged into master.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • You need to update DOCKER_REV in .gitlab-ci.yml.

    • Thanks, and I have changed the DOCKER_REV as per the output of lrzlin/ci-images, but the expected ‘x86_64-linux-ubuntu24_04-loongarch64-cross_loongarch64-linux-gnu-validate’ pipeline does not appear.

      Anything else?

    • you need to push to a wip/* branch under the ghc/ci-images repo directly and open an MR against the master branch. pipelines from forked repos cannot push the image to the registry and the built image can't be used here.

    • Got it, thanks.

      @lrzlin Maybe You need to resubmit it on your end.

    • @TerrorJack I've push the changes to wip/wasm-bump-toolchain, because I don't have write permission of the ci-images repo. Could you give a look and merge it first? then I could submit a MR to master branch.

      Edited by lrzlin
    • Please register or sign in to reply
  • Ticat Fp added 1 commit

    added 1 commit

    • 2eb4dcb9 - CI: add cross compiling and testing for LoongArch64

    Compare with previous version

  • Ticat Fp added 1 commit

    added 1 commit

    • e1f54039 - CI: add cross compiling and testing for LoongArch64

    Compare with previous version

  • Ticat Fp mentioned in merge request ci-images!165 (closed)

    mentioned in merge request ci-images!165 (closed)

  • We might need a LoongArch64 tag added to let the pipeline run correctly.

    • !14146 I temporary removed extra if conditions and the loongarch ci appears, let's see how's it going.

    • Here are the results, seems that there are similar issues with RISC-V (which is the LLVM assembler could not specify the asm code's target), How could we resolve this issue?

    • Turns out this should has been fixed !14025 (closed), but we're still encountering it.

    • Seems that was due to the CI still use the 9.10.1 as a bootstrap compiler, which didn't include the fix just merged last week.

    • I have started a build in a container to see more easily what is happening.

    • It seems that the problem with !14025 (closed) is that it didn't modify configure.ac as well.

      If you apply this patch then you get further.

      --- a/configure.ac
      +++ b/configure.ac
      @@ -556,6 +556,8 @@ FIND_LLVM_PROG([LLVMAS], [clang], [$LlvmMinVersion], [$LlvmMaxVersion])
       LlvmAsCmd="$LLVMAS"
       AC_SUBST([LlvmAsCmd])
       
      +
      +
       dnl --------------------------------------------------------------
       dnl End of configure script option section
       dnl --------------------------------------------------------------
      @@ -657,6 +659,13 @@ GHC_LLVM_TARGET_SET_VAR
       # The target is substituted into the distrib/configure.ac file
       AC_SUBST(LlvmTarget)
       
      +dnl We know that `clang` supports `--target` and it is necessary to pass it
      +dnl lest we see #25793.
      +if test -z "$LlvmAsFlags" ; then
      +    LlvmAsFlags="--target=$LlvmTarget"
      +fi
      +AC_SUBST([LlvmAsFlags])
      +
       dnl ** See whether cc supports --target=<triple> and set
       dnl CONF_CC_OPTS_STAGE[012] accordingly.
       FP_CC_SUPPORTS_TARGET([$CC_STAGE0], [CONF_CC_OPTS_STAGE0], [CONF_CXX_OPTS_STAGE0])
    • Yes, at least we've confirmed that the ubuntu's loongarch croos-toolchain & qemu is good to use, so maybe we should merge the loongarch NCG patch first and see how's it going on CI? (same as how RISC-V did), @fp is working on the final patchset, we can merge that MR first in a few days.

    • Please register or sign in to reply
  • closed

Please register or sign in to reply
Loading