All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Shardul Natu via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,
	Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>,
	Shardul Natu <snatu@google.com>,
	Koji Nakamaru <koji.nakamaru@gree.net>,
	Patrick Steinhardt <ps@pks.im>,
	Shardul Natu <shardul.27591@gmail.com>,
	Ben Knoble <ben.knoble@gmail.com>
Subject: Re: [PATCH v5 1/2] Makefile: add $(GITLIBS) prerequisite to osxkeychain
Date: Mon, 06 Jul 2026 12:52:27 -0700	[thread overview]
Message-ID: <xmqqmrw3aoas.fsf@gitster.g> (raw)
In-Reply-To: <e0bb18ff0191de384ea3c947bf26ee07834782cb.1783358097.git.gitgitgadget@gmail.com> (Shardul Natu via GitGitGadget's message of "Mon, 06 Jul 2026 17:14:56 +0000")

"Shardul Natu via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Shardul Natu <snatu@google.com>
>
> When Rust is enabled, the git-credential-osxkeychain helper depends on
> Rust symbols compiled into $(RUST_LIB). While commit 522ea8ef7d
> ("osxkeychain: fix build with Rust") updated the linker command line to
> use $(LIBS), it omitted $(RUST_LIB) from the target prerequisite list.
> Without this prerequisite, running a parallel build ("make -j") from a
> clean working tree can fail because Make does not know to invoke Cargo
> to build libgitcore.a before linking git-credential-osxkeychain.
>
> All other core Git targets that link $(LIBS) already depend on
> $(GITLIBS), which bundles common-main.o, $(LIB_FILE), and $(RUST_LIB)
> when Rust is enabled. Add $(GITLIBS) as a prerequisite dependency to the
> git-credential-osxkeychain target to make it consistent with the rest of
> the codebase.

I do not work with macOS but doesn't this change introduce a
build/link failure?

Sorry if I am mistaken, but as far as I can see, $(GITLIBS) includes
common-main.o (and it being .o, not .a, it is always included in the
result), and git-credential-osxkeychain.c comes with its own main()
function.  

Using a list of things to link that contains common-main.o does not
sound like a right thing to do; in other words, linking too many is
just as bad as linking too little.

  reply	other threads:[~2026-07-06 19:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05 17:26 [PATCH] Makefile: link osxkeychain helper against Rust Shardul Natu via GitGitGadget
2026-05-05 19:08 ` Kristoffer Haugsbakk
2026-05-07  0:39   ` Shnatu
2026-05-08  2:54 ` Junio C Hamano
2026-05-08  9:33   ` Koji Nakamaru
2026-05-08 17:44     ` Shnatu
2026-07-01 22:01 ` [PATCH v2] Makefile: link osxkeychain & support universal Rust Shardul Natu via GitGitGadget
2026-07-02  1:35   ` Junio C Hamano
2026-07-02 11:50   ` Patrick Steinhardt
2026-07-02 22:30     ` Shardul Natu
2026-07-03  5:15       ` Patrick Steinhardt
2026-07-03 12:02     ` lipo availability [was: [PATCH v2] Makefile: link osxkeychain & support universal Rust] Ben Knoble
2026-07-02 22:22   ` [PATCH v3 0/2] Makefile: link osxkeychain helper against Rust Shardul Natu via GitGitGadget
2026-07-02 22:22     ` [PATCH v3 1/2] Makefile: add $(RUST_LIB) prerequisite to osxkeychain Shardul Natu via GitGitGadget
2026-07-02 22:22     ` [PATCH v3 2/2] Makefile: support universal macOS builds via RUST_TARGETS Shardul Natu via GitGitGadget
2026-07-03  5:36       ` Junio C Hamano
2026-07-03 17:37         ` Shardul Natu
2026-07-04 18:05     ` [PATCH v4 0/2] Makefile: link osxkeychain helper against Rust Shardul Natu via GitGitGadget
2026-07-04 18:05       ` [PATCH v4 1/2] Makefile: add $(RUST_LIB) prerequisite to osxkeychain Shardul Natu via GitGitGadget
2026-07-06 10:49         ` Patrick Steinhardt
2026-07-04 18:05       ` [PATCH v4 2/2] Makefile: support universal macOS builds via RUST_TARGETS Shardul Natu via GitGitGadget
2026-07-06 10:49         ` Patrick Steinhardt
2026-07-05  4:08       ` [PATCH v4 0/2] Makefile: link osxkeychain helper against Rust Junio C Hamano
2026-07-05 17:38         ` Shardul Natu
2026-07-06 17:14       ` [PATCH v5 " Shardul Natu via GitGitGadget
2026-07-06 17:14         ` [PATCH v5 1/2] Makefile: add $(GITLIBS) prerequisite to osxkeychain Shardul Natu via GitGitGadget
2026-07-06 19:52           ` Junio C Hamano [this message]
2026-07-06 17:14         ` [PATCH v5 2/2] Makefile: support universal macOS builds via RUST_TARGETS Shardul Natu via GitGitGadget

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=xmqqmrw3aoas.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=koji.nakamaru@gree.net \
    --cc=kristofferhaugsbakk@fastmail.com \
    --cc=ps@pks.im \
    --cc=shardul.27591@gmail.com \
    --cc=snatu@google.com \
    /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.