From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axajm-0002l3-4L for qemu-devel@nongnu.org; Tue, 03 May 2016 09:51:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axaja-0003hi-DZ for qemu-devel@nongnu.org; Tue, 03 May 2016 09:51:36 -0400 MIME-Version: 1.0 In-Reply-To: <0b165339-9dde-57f8-959d-22122390ca0b@twiddle.net> References: <1462237852-61856-1-git-send-email-chrisfriedt@gmail.com> <0b165339-9dde-57f8-959d-22122390ca0b@twiddle.net> From: Christopher Friedt Date: Tue, 3 May 2016 09:50:15 -0400 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: Richard Henderson Cc: famz@redhat.com, mst@redhat.com, qemu-trivial@nongnu.org, QEMU Developers 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? That *would* be nice... yeah, it would be nice if Apple's tools could work the same as *all* of the other unices out there. Unfortunately, that's not the case, since at least GNU libtool does *not* accept the "-static" argument. To be honest, if it weren't for the man page for libtool on Mac OS X [1] dating all the way back to Snow Leopard saying that libtool is the preferred tool on Mac for creating static archives, I'm left wondering if this is just a massive oversight / bug in Apple's ld64. [1] http://www.unix.com/man-page/osx/1/libtool/