How can I change the target Arch when I porting ghc to an unknow Arch?
As the title, I am trying to porting ghc to a unsupported arch. But I don`t know how to change target arch when I complie the source code on x86 for the target arch. My host respond to me that:
checking for gfind... no checking for find... /usr/bin/find checking for sort... /usr/bin/sort checking for GHC version date... inferred 9.3.20220420 checking for GHC Git commit id... inferred 0c02c919 checking for ghc... /home/hiropoi/.ghcup/bin/ghc checking version of ghc... 8.10.7 checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... loongarch64-unknow-linux-gnu build platform inferred as: x86_64-unknown-linux host platform inferred as: x86_64-unknown-linux Unknown CPU loongarch64
On the cross compiling page I saw:
If configure complains that your arch, vendor or OS is unknown, then you will need to modify the checkArch(), checkVendor() or checkOS() function in aclocal.m4
I really want to figure out how to porting ghc to a new unknow arch. Appreciate for sharing any experience.