git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Jeff King <peff@peff.net>
Cc: Jeffrey Walton <noloader@gmail.com>, Git List <git@vger.kernel.org>
Subject: Re: Git configure/make does not honor ARFLAGS
Date: Sun, 13 Sep 2015 13:11:46 -0400	[thread overview]
Message-ID: <CAPig+cQV-kaDDdBH+QZXsSjDHjP2CUYDXp3WKSBtgguVmLvofg@mail.gmail.com> (raw)
In-Reply-To: <20150913101727.GB26562@sigill.intra.peff.net>

On Sun, Sep 13, 2015 at 6:17 AM, Jeff King <peff@peff.net> wrote:
> On Sun, Aug 30, 2015 at 05:34:59PM -0400, Jeffrey Walton wrote:
>> I'm working on an old OS X machine. I needed to perform:
>>
>>   AR=libtool
>>   ARFLAGS="-static -o"
>>   ...
>>   make configure
>>   ./configure ...
>>   make
>
> Hrm. Your "$(AR)" is not really "ar" then, is it? It has been a long
> time since I played with libtool, but what is the reason that you are
> calling libtool and not "ar" in the first place. Is it that you do not
> have "ar" at all, and libtool performs some other procedure? If so, is
> there a more ar-compatible wrapper that can be used?

This isn't GNU's libtool. It's Apple's libtool, an entirely different
beast, which is an 'ar' replacement and is needed when linking
Universal binaries containing code for more than one architecture,
such as 'ppc' and 'i386', so the same executable can run on multiple
architectures. This tool dates all the way back to at least NextStep
3.1 when NeXT ported NextStep to Intel hardware (i486) from NeXT
computers (m68k). The name "Universal" is an Apple invention, but back
in the NeXT days, they were called Multi-Architecture Binaries (MAB)
or, colloquially, just FAT (for "fat"); there was a corresponding
"lipo" command (short for "liposuction") to "thin" out "fat" binaries.
NeXT's libtool predates GNU's libtool by a few years: May 1993 vs.
July 1997, respectively. When an attempt is made to use 'ar' on
Universal object files, it errors out saying that it can't be used
with such files and recommends 'libtool' instead.

>> The Makefile might benefit from the following for users who need to
>> tweak things:
>>
>>     ARFLAGS ?= rcs
>>     ...
>>
>>     $(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
>>     ...
>
> Yeah, that does sound reasonable (even if one does not set $(AR) to
> something completely different, they might need slightly different
> flags).

  reply	other threads:[~2015-09-13 17:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-30 21:34 Git configure/make does not honor ARFLAGS Jeffrey Walton
2015-09-13 10:17 ` Jeff King
2015-09-13 17:11   ` Eric Sunshine [this message]
2015-09-13 18:37     ` Jeffrey Walton
2015-09-14  4:30     ` Jeff King
2015-09-14  4:57       ` Junio C Hamano
2015-09-14  4:59         ` Jeff King
2015-09-14  5:52           ` Junio C Hamano
2015-09-16 19:38             ` Eric Sunshine
2015-09-16 19:45               ` Eric Sunshine
2015-09-14 23:14           ` Jeffrey Walton
2015-09-15  4:56             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPig+cQV-kaDDdBH+QZXsSjDHjP2CUYDXp3WKSBtgguVmLvofg@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=noloader@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).