Hello Jeff, Thanks! But when I update the config as you suggest: AR=/usr/local/bin/llvm-ar \ RANLIB=/usr/local/bin/llvm-ranlib \ CC=/usr/local/bin/clang \ CFLAGS="--rtlib=compiler-rt --target=aarch64" \ ASFLAGS="-Wa,--noexecstack" \ LDFLAGS="-Wl,-fuse-ld=/usr/local/bin/ld.lld --rtlib=compiler-rt --target=aarch64" \ LIBCC=-lcompiler_rt \ ./configure --target=aarch64 \ && make It still reports the error as below: [cid:919d9698-56e2-49d2-85c5-8b12ac33e65f] Another question, if I want to use LLVM tool chain instead of GCC, how should I config? Acutally I don't understand why there is gcc error, because I have specify to use clang and ld.lld. Thanks, Simon ________________________________ 发件人: Jeffrey Walton 发送时间: 2021年10月25日 16:44 收件人: musl@lists.openwall.com 抄送: nullplan@gmx.net 主题: Re: [musl] Failed to build musl 1.2.2 by using clang cross compiler On Mon, Oct 25, 2021 at 1:04 AM Zhu Chunlin > wrote: Hello Markus, Thanks! AR=/usr/local/bin/llvm-ar \ RANLIB=/usr/local/bin/llvm-ranlib \ CC=/usr/local/bin/clang \ CFLAGS="-fuse-ld=/usr/local/bin/ld.lld --rtlib=compiler-rt --target=aarch64" \ LIBCC=-lcompiler_rt \ ./configure --target=aarch64 \ && make But when I use the above config, it reports the below error, but I don't understand why there are gcc error, I have explict specify to use clang and ld.lld [cid:17cb69be492cb971f161] -fuse-ld=/usr/local/bin/ld.lld is a LDFLAG. Since you are using GCC to drive link, set: LDFLAGS = "-Wl,-fuse-ld=/usr/local/bin/ld.lld " --rtlib=compiler-rt and --target=aarch64may need to go into LDFLAGS, too. --noexecstack is a ASFLAG. Use: ASFLAGS = "-Wa,--noexecstack" Jeff