On Sun, Sep 13, 2015 at 10:52:36PM -0700, Junio C Hamano wrote: > On Sun, Sep 13, 2015 at 9:59 PM, Jeff King <peff@xxxxxxxx> wrote: > > > > My follow-up question was going to be: is this something we should be > > setting in config.mak.uname for appropriate versions of Darwin? It > > wasn't clear to me from Eric's description if this is something that > > particular versions need, or just something that people who want to > > build Universal binaries would choose to use. > > My preference is not to worry anything about config.mak.uname > ourselves, until somebody who does work on the ports proposes > to do something concrete. Normal 'ar' works for non-multi-architecture-binaries (MAB); 'libtool' is only needed when building Universal. Unfortunately, there probably isn't a reliable way to auto-detect a Universal build. Back in the NextStep days, projects would support MAB via a TARGET_ARCHS variable: make TARGET_ARCHS='m68k i386 sparc hppa' And, for project's which didn't understand that, you'd just have to specify build flags which the Makefile did understand: make CFLAGS='-arch ppc -arch i386' LDFLAGS='-arch ppc -arch i386' or, just make ad-hoc modifications to the Makefile if it didn't even respect those variables. So, I don't think there's really a good way to detect MAB builds. On the other hand, as far as I know, it's *always* safe to replace 'ar' with 'libtool' on this platform, so we could just do it unconditionally. --- 8< --- diff --git a/config.mak.uname b/config.mak.uname index be5cbec..e7970dd 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -88,6 +88,8 @@ ifeq ($(uname_S),SCO_SV) TAR = gtar endif ifeq ($(uname_S),Darwin) + AR = libtool + ARFLAGS = -static -o NEEDS_CRYPTO_WITH_SSL = YesPlease NEEDS_SSL_WITH_CRYPTO = YesPlease NEEDS_LIBICONV = YesPlease --- 8< --- I've tested this on modern Mac OS X, Yosemite 10.10.5 (x86_64), and ancient Snow Leopard 10.5.8 PowerPC (circa 2009), and it works fine in both cases, so perhaps that's the way to go. My one concern, however, would be people who've installed GNU libtool and have that in PATH before Apple's tools. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html