Skip to content

Commit 8b6ecf8

Browse files
committed
osxkeychain: always apply required build flags
Starting with upstream commit 4580bcd ("osxkeychain: avoid incorrectly skipping store operation", 2025-11-14), the osxkeychain credential helper includes git-compat-util.h and links against libgit.a. The osxkeychain Makefile has: CFLAGS ?= -g -O2 -Wall -I../../.. $(BASIC_CFLAGS) The ?= operator means "set only if not already set". When building via a parent Makefile that passes CFLAGS on the command line, this entire assignment is ignored - including the -I../../.. needed to find git-compat-util.h and the $(BASIC_CFLAGS) needed for -DNO_OPENSSL: git-credential-osxkeychain.c:5:10: fatal error: 'git-compat-util.h' file not found Using += instead of ?= is not sufficient either, because command-line variables in Make override even += assignments. We need to use "override CFLAGS +=" to force these flags to be appended regardless of how CFLAGS was set. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
1 parent 1e62bbc commit 8b6ecf8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/credential/osxkeychain/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ prefix ?= /usr/local
4141
gitexecdir ?= $(prefix)/libexec/git-core
4242

4343
CC ?= gcc
44-
CFLAGS ?= -g -O2 -Wall -I../../.. $(BASIC_CFLAGS)
45-
LDFLAGS ?= $(BASIC_LDFLAGS) $(EXTLIBS)
44+
override CFLAGS += -g -O2 -Wall -I../../.. $(BASIC_CFLAGS)
45+
override LDFLAGS += $(BASIC_LDFLAGS) $(EXTLIBS)
4646
INSTALL ?= install
4747
RM ?= rm -f
4848

0 commit comments

Comments
 (0)