Git development
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2 4/4] Makefile: precompile "git-compat-util.h"
Date: Thu, 24 Sep 2026 19:52:16 -0400	[thread overview]
Message-ID: <20260924235216.GA837070@coredump.intra.peff.net> (raw)
In-Reply-To: <20260915060952.569535-5-szeder.dev@gmail.com>

On Tue, Sep 15, 2026 at 08:09:52AM +0200, SZEDER Gábor wrote:

> This patch follows the idea of 671df48df8 (meson: precompile
> "git-compat-util.h", 2026-03-19) to make it faster to build Git using
> "make".  The notable differences are the boilerplate needed to wire up
> the precompiled header with "make", and the selection of object files
> that are built using the precompiled header:

I got an interesting error message from this today:

  $ make imap-send.o
      * new build flags
      CC tools/precompiled.h.gch
      CC imap-send.o
  cc1: warning: ./tools/precompiled.h.gch: not used because ‘NO_OPENSSL’ is defined [-Winvalid-pch]

You won't see it with:

  make NO_OPENSSL=1 imap-send.o

The culprit is that I have this in my config.mak:

  imap-send.o: EXTRA_CPPFLAGS += -DNO_OPENSSL

so the build options for the precompiled header and imap-send.c are not
the same. So now of course you are asking why I would have such a weird
line in my config.mak.

The answer is that I want to disable openssl for old builds, because I
am often building historical versions which use openssl constructs that
are deprecated or removed. So naturally you are now asking why it does
not just say:

  NO_OPENSSL = BrokenOnOldVersions

or similar. But that breaks _some_ old versions which really do need
openssl for various things.

The good-ish news is that it's mostly cosmetic for me. I also loosen
-Werror for old builds, for obvious reasons. So it's not breaking any
build.

I don't know if my use case is too crazy to care about, but I thought
I'd mention it in case there are other less-crazy related cases we might
run into.

And yes, obviously old versions will not have the precompiled header,
either, but my logic for "loosen compilation" is mostly "we are not on a
branch nor rebasing", so a sight-seeing trip to "git checkout
origin/seen" puts me in the same mode. And eventually it _will_ be old,
too. ;)

-Peff

  reply	other threads:[~2026-09-24 23:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09 19:50 [PATCH 0/4] make: precompile "git-compat-util.h" SZEDER Gábor
2026-09-09 19:50 ` [PATCH 1/4] Makefile: remove XDIFF_OBJS initialization SZEDER Gábor
2026-09-09 19:50 ` [PATCH 2/4] cmake: remove any "$(*_OBJS)" variables when parsing Makefile for sources SZEDER Gábor
2026-09-09 19:50 ` [PATCH 3/4] Makefile: reintroduce REFTABLE_OBJS SZEDER Gábor
2026-09-09 21:07   ` Junio C Hamano
2026-09-09 19:50 ` [PATCH 4/4] Makefile: precompile "git-compat-util.h" SZEDER Gábor
2026-09-09 19:57   ` SZEDER Gábor
2026-09-15  6:09 ` [PATCH v2 0/4] make: " SZEDER Gábor
2026-09-15  6:09   ` [PATCH v2 1/4] Makefile: remove XDIFF_OBJS initialization SZEDER Gábor
2026-09-15  6:09   ` [PATCH v2 2/4] cmake: remove any "$(*_OBJS)" variables when parsing Makefile for sources SZEDER Gábor
2026-09-15  6:09   ` [PATCH v2 3/4] Makefile: reintroduce REFTABLE_OBJS SZEDER Gábor
2026-09-15  6:09   ` [PATCH v2 4/4] Makefile: precompile "git-compat-util.h" SZEDER Gábor
2026-09-24 23:52     ` Jeff King [this message]
2026-09-25  9:25       ` SZEDER Gábor
2026-10-03 19:00     ` SZEDER Gábor

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=20260924235216.GA837070@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=szeder.dev@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox