Exchange "ar" prefix in ghc build

Marius Melzer marius.melzer at kernkonzept.com
Mon Sep 14 15:26:36 UTC 2020


Hi,

I'm trying to add L4Re as a new OS to GHC and I'm already struggling a
bit with the setup. I added l4re to a few places that seem to make sense
(in aclocal.m4:296/2165, in config.sub:1371, in
compiler/GHC/Platform.hs:132 and in
libraries/ghc-boot/GHC/Platform/ArchOS.hs:99/156). Now I wanted to try
to build it to see where it fails to continue, but I'm failing on the
configure step, I have so far:

./configure --target=aarch64-unknown-l4re CC=aarch64-linux-gnu-gcc

Which fails when it looks for ar (with the prefix aarch64-unknown-l4re
instead of aarch64-linux-gnu):

checking for aarch64-unknown-l4re-ar... no
configure: error: cannot find ar in your PATH, no idea how to make a library

Can I somehow tell configure to use the aarch64-linux-gnu prefix for ALL
tools (nm, ar, gcc, etc.) even though I build for aarch64-unknown-l4re?
Or if not, is there a way to set the ar tool in the same way as I did
for gcc with CC=...?

Thanks in advance,
Marius


More information about the Glasgow-haskell-users mailing list