All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Dave Borowitz <dborowitz@google.com>
Cc: git <git@vger.kernel.org>
Subject: Re: [PATCH 1/2] Makefile: use curl-config to determine curl flags
Date: Tue, 15 Apr 2014 09:50:45 -0700	[thread overview]
Message-ID: <xmqqa9bmleoq.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAD0k6qQJE6a5DmRnpiFpOc_MFjSn9eFyiJ2nFaL63rctvxwt5Q@mail.gmail.com> (Dave Borowitz's message of "Tue, 15 Apr 2014 06:20:52 -0400")

Dave Borowitz <dborowitz@google.com> writes:

> My end goal is to statically link git on Mac OS X (10.9) against a
> newer version of libcurl than ships with the OS. The normal CURLDIR
> approach should work with system libcurl:
>
> $ /usr/bin/curl-config --libs
> -lcurl
>
> But it gets a bit more complicated with a recent curl version. This
> likely has to do with the set of enabled options; I passed flags to
> ./configure based on the build script "MacOSX-Framework" included in
> the curl distribution:
> $ ~/d/curl-out-7.36.0/bin/curl-config --libs
> -L/Users/dborowitz/d/curl-out-7.36.0/lib -lcurl -lgssapi_krb5 -lresolv
> -lldap -lz
>
> And with --static-libs there's just that much more:
> $ ~/d/curl-out-7.36.0/bin/curl-config --static-libs
> /Users/dborowitz/d/curl-out-7.36.0/lib/libcurl.a
> -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
> -arch x86_64 -Wl,-headerpad_max_install_names -framework
> CoreFoundation -framework Security -lgssapi_krb5 -lresolv -lldap -lz
>
> So I don't think specifying NEEDS_*_WITH_CURL scales to this use case.

Thanks.  As I said, the kosher way to learn how to link with libcURL
is by asking curl-config about the details of options to give to the
compiler and the linker, so I am all for this change.

> While writing this up I also noticed an issue with the second patch,
> namely that `curl-config --static-libs` is empty when curl is not
> built for static linking.
>
> I will reroll with a more detailed commit message and a fix to the second patch.

I love it whenever I see the contents of the patch improved after
spending a bit more time trying to describe the problem and the
solution (which is time worth spending).

Thanks.

      reply	other threads:[~2014-04-15 16:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-12 23:15 [PATCH 1/2] Makefile: use curl-config to determine curl flags Dave Borowitz
2014-04-12 23:15 ` [PATCH 2/2] Makefile: allow static linking against libcurl Dave Borowitz
2014-04-14 20:22 ` [PATCH 1/2] Makefile: use curl-config to determine curl flags Junio C Hamano
2014-04-15 10:20   ` Dave Borowitz
2014-04-15 16:50     ` Junio C Hamano [this message]

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=xmqqa9bmleoq.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=dborowitz@google.com \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.