lrzlin ./configure --target=loongarch64-unknown-linux-gnu CC=/home/loongson/czw/cross-tools/bin/loongarch64-unknown-linux-gnu-gcc CXX=loongarch64-unknown-linux-gnu-g++
```
Configure completed successfully.
Building GHC version : 9.7.20230201
Git commit id : 8ce50c12561856411ea4647fb2d9d1be31c092a4
Build platform : x86_64-unknown-linux
Host platform : x86_64-unknown-linux
Target platform : loongarch64-unknown-linux
Bootstrapping using : /home/loongson/.ghcup/bin/ghc
which is version : 9.2.8
with threaded RTS? : YES
Using (for bootstrapping) : gcc
Using gcc : /home/loongson/czw/cross-tools/bin/loongarch64-unknown-linux-gnu-gcc
which is version : 13.0.1
linker options : -fuse-ld=bfd
Building a cross compiler : YES
Unregisterised : YES
TablesNextToCode : NO
Build GMP in tree : NO
hs-cpp : /home/loongson/czw/cross-tools/bin/loongarch64-unknown-linux-gnu-gcc
hs-cpp-flags : -E -undef -traditional
ar : /home/loongson/czw/cross-tools/bin/loongarch64-unknown-linux-gnu-ar
ld : loongarch64-unknown-linux-gnu-ld
nm : /home/loongson/czw/cross-tools/bin/loongarch64-unknown-linux-gnu-nm
objdump : /home/loongson/czw/cross-tools/bin/loongarch64-unknown-linux-gnu-objdump
ranlib : /home/loongson/czw/cross-tools/bin/loongarch64-unknown-linux-gnu-ranlib
otool : otool
install_name_tool : install_name_tool
windres :
dllwrap :
genlib :
Happy : /home/loongson/.cabal/bin/happy (1.20.1.1)
Alex : /home/loongson/.cabal/bin/alex (3.4.0.0)
sphinx-build :
xelatex :
makeinfo :
git : /usr/bin/git
cabal-install : /home/loongson/.ghcup/bin/cabal
Using LLVM tools
clang : clang
llc : llc
opt : opt
HsColour was not found; documentation will not contain source links
Tools to build Sphinx HTML documentation available: NO
Tools to build Sphinx PDF documentation available: NO
Tools to build Sphinx INFO documentation available: NO
```
./hadrian/build :(有尝试更改primops.txt.pp文件的编码格式解决i问题,但没能解决。)
```
......
#_build/stage0/compiler/build/GHC/Utils/GlobalVars.o
#_build/stage0/compiler/build/GHC/CmmToAsm/Reg/Graph/X86.o
#_build/stage0/compiler/build/GHC/CmmToAsm/Wasm/Utils.o
#_build/stage0/compiler/build/GHC/CmmToAsm/CFG/Dominators.o
Error when running Shake build system:
at action, called at src/Rules.hs:38:19 in main:Rules
at need, called at src/Rules.hs:60:5 in main:Rules
* Depends on: _build/stage0/lib/package.conf.d/ghc-9.7.conf
at need, called at src/Rules/Register.hs:140:5 in main:Rules.Register
* Depends on: _build/stage0/compiler/build/stamp-ghc-9.7
at need, called at src/Rules/Library.hs:144:3 in main:Rules.Library
* Depends on: _build/stage0/compiler/build/primop-docs.hs-incl
* Raised the exception:
_build/stage0/compiler/build/primops.txt: hGetContents: invalid argument (invalid byte sequence)
Build failed.
```