Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 17 May 2019 23:35:37 +0800
From: Fangrui Song <>
Subject: [PATCH] config.mak: add AR/RANLIB and delete ASMSUBARCH

By default, if I specify --target=aarch64, AR=aarch64-ar is used, which is apparently not available.

With this patch, I am able to build an aarch64 musl with:

  ../configure --target=aarch64 AR=llvm-ar RANLIB=true CC=clang CFLAGS=--target=aarch64-linux-musl LDFLAGS="-fuse-ld=lld -L/path/to/aarch64/libgcc.a/and/libgcc_eh.a" --enable-debug

ASMSUBARCH is no longer in use as of commit 0f814a4e57e80d2512934820b878211e9d71c93e.

You may also delete the following line

  test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt

because compiler-rt (part of which is nearly a replacement of libgcc) is something like:


not libcompiler_rt.a

  % clang -print-resource-dir
  % clang -rtlib=compiler-rt -print-libgcc-file-name

BTW, I am not sure if libgcc_eh.a is needed.

View attachment "musl.patch" of type "text/x-diff" (1338 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.