Thread (43 messages) 43 messages, 7 authors, 4d ago

Re: [PATCH v5 1/2] Makefile: add $(GITLIBS) prerequisite to osxkeychain

From: Shnatu <hidden>
Date: 2026-07-07 16:51:14

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.
You are completely right, and I missed that altogether!!

In v6, I have reverted Patch 1 back to depending explicitly on
$(LIB_FILE) $(RUST_LIB) rather than $(GITLIBS) so that common-main.o is
excluded from the link step.

To ensure that linking errors in osxkeychain are caught automatically in
future CI runs, I have also added a third patch to the series:
"contrib: wire up osxkeychain in contrib/Makefile on macOS". This adds a
"test" target to contrib/credential/osxkeychain/Makefile and wires it
into contrib/Makefile under "all", "test", and "clean" whenever running
on macOS (Darwin). Now, when CI runs "make test" with TEST_CONTRIB_TOO=yes
on macOS runners, osxkeychain will always be compiled and linked.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help