From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14356 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Fangrui Song Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] configure: make AR and RANLIB customizable Date: Thu, 4 Jul 2019 04:38:44 +0000 Message-ID: <20190704043844.bcvxupoy27k3j4k3@gmail.com> References: <20190517153537.teffxwvopvhs36fe@gmail.com> <20190517164342.GB23599@brightrain.aerifal.cx> <20190703085312.oxm3kiqjx4dmid3o@gmail.com> <20190703203715.GA20298@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="117245"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180223-112-0c5bf3 Cc: musl@lists.openwall.com To: Rich Felker Original-X-From: musl-return-14372-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jul 04 06:39:04 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 1hitWS-000UN3-7h for gllmg-musl@m.gmane.org; Thu, 04 Jul 2019 06:39:04 +0200 Original-Received: (qmail 31873 invoked by uid 550); 4 Jul 2019 04:39:01 -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 31849 invoked from network); 4 Jul 2019 04:39:00 -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:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=M+woW76hoT9NdAo5z7B4Q4kMGH+UbvcFv7srzxMr2Fw=; b=qLOfwoymioMDLy+uLuLqacy42BuHqRfOwC+2eCsNoGE6SBOC942Q8mMsrCt8kNDXa3 hK/i/6xepSRn7yrwVTDUp+Pi34Hr5cRL0rDLgYq8oGQE59FTSFKRofqVKhSzgzlA2p2i 6Hrb6XFLl6ENUE9FaPj2tU6MBSjOzOZ3uqZ5vwASmVJQxQO3NhTdoXFnzMT0OO5wdaLw APiuDY0TvyCZjzcF3yGbpqA0YBONQPgLs4FQ6lrLyJd4/KPP9ghivBqdqyyLqhIvAC7v ksklINzEb7bK+QKQ4JTt5jyFhQnljBB3G2OXTOZvXFnAgDCsitZxlAP+lmeGT+4q5DGg hCpA== X-Gm-Message-State: APjAAAXM0hKgkBX05wH+NkFpWDKybYWWP1eMk2FUIcvWcIKVtMbJz/93 FRDGTcNN3ocYTxS5fuF8O2Y= X-Google-Smtp-Source: APXvYqxgEqxtEG52CBQcnSGAK4AnFy3gDVwwbJyPwgM0GoYmgBAUB2fTuJwhPfqT8Rj2MsXV+5a2CQ== X-Received: by 2002:a63:6c7:: with SMTP id 190mr38642380pgg.7.1562215128779; Wed, 03 Jul 2019 21:38:48 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20190703203715.GA20298@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:14356 Archived-At: On 2019-07-03, Rich Felker wrote: >On Wed, Jul 03, 2019 at 08:53:12AM +0000, Fangrui Song wrote: >> New patch attached. >> >> >> With 2 local llvm/clang patches, I am able to build musl powerpc64le with the following command: >> >> .../configure --target=powerpc64le AR=~/llvm/Release/bin/llvm-ar RANLIB=true CC=~/llvm/Release/bin/clang CFLAGS='-target powerpc64le-linux -mlong-double-64' LDFLAGS=-fuse-ld=lld --enable-debug >> >> # "-linux" in "powerpc64le-linux" is important. >> # If -target powerpc64le is used instead, clang will invoke gcc instead of itself in the linker stage, which will not work. > >> >From 4415adea632ca0fee80e10b6cd73b590417a2266 Mon Sep 17 00:00:00 2001 >> From: Fangrui Song >> Date: Thu, 27 Jun 2019 08:10:04 +0000 >> Subject: [PATCH] configure: make AR and RANLIB customizable >> >> --- >> Makefile | 2 -- >> configure | 4 ++++ >> 2 files changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/Makefile b/Makefile >> index b46f8ca4..6842983b 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -51,8 +51,6 @@ CFLAGS_ALL += $(CPPFLAGS) $(CFLAGS_AUTO) $(CFLAGS) >> >> LDFLAGS_ALL = $(LDFLAGS_AUTO) $(LDFLAGS) >> >> -AR = $(CROSS_COMPILE)ar >> -RANLIB = $(CROSS_COMPILE)ranlib >> INSTALL = $(srcdir)/tools/install.sh > >I think you can omit the changes to Makefile. They break running make >with an existing config.mak not updated by new configure, and since >the assignments are before "include config.mak", the ones from >config.mak will override if present. > >> ARCH_INCLUDES = $(wildcard $(srcdir)/arch/$(ARCH)/bits/*.h) >> diff --git a/configure b/configure >> index 60e0b1fc..86801281 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#*=} ;; >> @@ -734,6 +736,8 @@ 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:-\$(CROSS_COMPILE)ar} >> +RANLIB = ${RANLIB:-\$(CROSS_COMPILE)ranlib} >> ARCH = $ARCH >> SUBARCH = $SUBARCH >> ASMSUBARCH = $ASMSUBARCH >> -- >> 2.22.0 >> > >Looks ok otherwise. Would you like me to apply with the above change? Sure. Thanks!