From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axsj6-00006b-Bn for qemu-devel@nongnu.org; Wed, 04 May 2016 05:04:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axsio-0004dZ-Qg for qemu-devel@nongnu.org; Wed, 04 May 2016 05:04:06 -0400 Received: from mail-yw0-x232.google.com ([2607:f8b0:4002:c05::232]:36608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axsin-0004Wk-KI for qemu-devel@nongnu.org; Wed, 04 May 2016 05:03:54 -0400 Received: by mail-yw0-x232.google.com with SMTP id o66so75410810ywc.3 for ; Wed, 04 May 2016 02:03:35 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1462237852-61856-1-git-send-email-chrisfriedt@gmail.com> <0b165339-9dde-57f8-959d-22122390ca0b@twiddle.net> From: Peter Maydell Date: Wed, 4 May 2016 10:03:12 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 1/2v2] [RESENT-INLINE] Use libtool instead of ar to create static libraries on Darwin. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christopher Friedt Cc: Richard Henderson , QEMU Trivial , Fam Zheng , QEMU Developers , "Michael S. Tsirkin" On 4 May 2016 at 01:07, Christopher Friedt wrote: > > On May 3, 2016 9:50 AM, "Christopher Friedt" wrote: >> >> On Tue, May 3, 2016 at 3:06 AM, Richard Henderson wrote: >> > On 05/02/2016 03:10 PM, Christopher Friedt wrote: >> >> >> >> %.a: >> >> +ifdef CONFIG_DARWIN >> >> + $(call quiet-command,rm -f $@ && libtool -static -o $@ $^," >> >> libtool $(TARGET_DIR)$@") >> >> +else >> >> $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR >> >> $(TARGET_DIR)$@") >> >> +endif >> >> >> > >> > Does it work to use libtool -static everywhere? > > One possibility for future-proofing the link stage that applies to most > (all?) platforms that Qemu runs on would be to switch to libtool for all > arch's and just adjust the "libtool flags" as necessary. > > Would require checking for libtool. This is more complicated than we need. OSX "libtool" and GNU "libtool" are really completely different things. We don't (these days) do anything that we need GNU libtool for, so there's no need to depend on it or use it optionally -- we should just use "ar". If we need to special case the "program for creating static libraries" for OSX that's annoying but we can do that. thanks -- PMM