From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14138 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Fangrui Song Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH] config.mak: add AR/RANLIB and delete ASMSUBARCH Date: Fri, 17 May 2019 23:35:37 +0800 Message-ID: <20190517153537.teffxwvopvhs36fe@gmail.com> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="vns6szyk7duezh4v" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="49837"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180223-112-0c5bf3 To: musl@lists.openwall.com Original-X-From: musl-return-14154-gllmg-musl=m.gmane.org@lists.openwall.com Fri May 17 17:36:06 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hRety-000Ckj-3U for gllmg-musl@m.gmane.org; Fri, 17 May 2019 17:36:06 +0200 Original-Received: (qmail 17441 invoked by uid 550); 17 May 2019 15:36:00 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 16378 invoked from network); 17 May 2019 15:35:59 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=LelJ5vC8jXhrEtQJ60IMvKhkyjesIRhDgwoL0G3QhHU=; b=dxK3f+xQ71+yVY7oioV8pgBx3ptXMv2EVcUKPm/9Z5H1kw0YZem4v3/llw1v78537l 5CCHqKgdZrS7YCxsPrZ9mmy0dHBmHDv/fAeIQOI5k9VRPtzwp1kxHAu+C6kn0tz8TT78 YBeZUbgtohLOjvbsyAqNGFsX1+bzpDH1CepBIyH63PO05+O4Z6q+oxgo9uoFWqFTfOvB l9KmmL0Iir3S4THIKIQ63ydP/zAshtgGSJbp31Tyb57sz/TUG1eTYB8lnt9gHxCChweE eUMUbp+x+ynjOtuK9uAnHv+WCWlUY8UbVq2wE/IO7iggmUNiBBtbPOkhQzPbKLSNCzcK VUHQ== X-Gm-Message-State: APjAAAXBhor2HEt02piRbz6kU6+LuSCiXgEB/w+oEs3OFCARc98mBb8L X1t4NtsLuSpp4OXznuwMb8Q6cV8Qx2c= X-Google-Smtp-Source: APXvYqwhH5hqD8Bu5maaj1qNFEB2RwzKKqJb0ubaRbfdlWDow9XCgiXP7a8OndOYFG4SKrUrfciIhg== X-Received: by 2002:aa7:92da:: with SMTP id k26mr16580938pfa.70.1558107347147; Fri, 17 May 2019 08:35:47 -0700 (PDT) Content-Disposition: inline Xref: news.gmane.org gmane.linux.lib.musl.general:14138 Archived-At: --vns6szyk7duezh4v Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline 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: /home/ray/llvm/Release/lib/clang/9.0.0/lib/linux/libclang_rt.builtins-x86_64.a not libcompiler_rt.a % clang -print-resource-dir /home/ray/llvm/Release/lib/clang/9.0.0 % clang -rtlib=compiler-rt -print-libgcc-file-name /home/ray/llvm/Release/lib/clang/9.0.0/lib/linux/libclang_rt.builtins-x86_64.a BTW, I am not sure if libgcc_eh.a is needed. --vns6szyk7duezh4v Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="musl.patch" >From 1a9f27d0a311210829a021384eb36332bc7456d0 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 17 May 2019 08:15:52 -0700 Subject: [PATCH] config.mak: add AR/RANLIB and delete ASMSUBARCH --- configure | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 2123ddce..2c866955 100755 --- a/configure +++ b/configure @@ -172,6 +172,8 @@ case "$arg" in --host=*|--target=*) target=${arg#*=} ;; --build=*) build=${arg#*=} ;; -* ) echo "$0: unknown option $arg" ;; +AR=*) AR=${arg#*=} ;; +RANLIB=*) RANLIB=${arg#*=} ;; CC=*) CC=${arg#*=} ;; CFLAGS=*) CFLAGS=${arg#*=} ;; CPPFLAGS=*) CPPFLAGS=${arg#*=} ;; @@ -680,11 +682,6 @@ fi test "$SUBARCH" \ && printf "configured for %s variant: %s\n" "$ARCH" "$ARCH$SUBARCH" -case "$ARCH$SUBARCH" in -arm) ASMSUBARCH=el ;; -*) ASMSUBARCH=$SUBARCH ;; -esac - # # Some archs (powerpc) have different possible long double formats # that the compiler can be configured for. The logic for whether this @@ -728,9 +725,10 @@ cat << EOF # This version of config.mak was generated by: # $cmdline # Any changes made here will be lost if configure is re-run +AR = $AR +RANLIB = $RANLIB ARCH = $ARCH SUBARCH = $SUBARCH -ASMSUBARCH = $ASMSUBARCH srcdir = $srcdir prefix = $prefix exec_prefix = $exec_prefix -- 2.21.0 --vns6szyk7duezh4v--