public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v3 00/12] Improvements to static checker invocation
Date: Wed, 20 May 2026 12:01:33 +1000	[thread overview]
Message-ID: <ag0V_RkopAlxygoD@zatzit> (raw)
In-Reply-To: <20260516174557.007a0d7b@elisabeth>

[-- Attachment #1: Type: text/plain, Size: 2993 bytes --]

On Sat, May 16, 2026 at 05:45:58PM +0200, Stefano Brivio wrote:
> On Tue, 12 May 2026 15:52:44 +1000
> David Gibson <david@gibson.dropbear.id.au> wrote:
> 
> > While working on pesto, I ran into a number of awkward errors with the
> > static checkers.  This series reworks the invocation of the checkers
> > in a way that will let us deal with that.  As a bonus, it also gives
> > us static checking for passt-repair.  It also a number of other
> > cleanups to the Makefile that seemed natural along the way.
> > 
> > v3:
> >  - Rework changes to $(FLAGS) so they're much less likely to have
> >    side effects we're not ready for.
> > v2:
> >  - Fixed nasty test failure in test/build/build.py
> 
> Tested with current packaging rules / build scripts on Alpine, Debian,
> Fedora, openSUSE, and applied (dropping extra whitespace in 4/12 as
> noted).
> 
> I think it would be nice, as a follow-up, to drop the comments that 4/12
> introduced:
> 
> +# Mandatory preprocessor flags that won't be overridden with $(CFLAGS)
> +# FIXME: Could some of these be default, rather than required?
> 
> (same for CPPFLAGS), because, as we discussed, those are all default,
> can actually be overridden as distribution packages already do (so this
> is misleading for distribution maintainers), and I don't see a
> particular value in distinguishing what flags *could* be perhaps
> dropped to have something strictly building. They are all useful for a
> reason or another.
> 
> But I didn't touch those, I didn't feel like sneaking in a substantial
> change like that and I didn't want to delay this series further, either.

Fair enough.  Follow up sent.

> 
> I had a quick look at package recipes of Chimera, PLD, and Void Linux,
> I didn't test things there but I don't see any way this series could
> cause issues there.
> 
> Somewhat interestingly, I came across many different ways to override
> flags, taking -D_FORTIFY_SOURCE as example:
> 
> - Alpine doesn't override / set it at all, the test in our Makefile
>   doesn't set it there, either. Notably, this test was added in commit
>   38363964fc96 ("Makefile: Enable _FORTIFY_SOURCE iff needed"),
>   specifically for Gentoo
> 
> - Debian and Void Linux append -D_FORTIFY_SOURCE=2, that is, they
>   duplicate our flag, in CFLAGS
> 
> - Fedora (with my spec file, where I didn't set any %_fortify_level)
>   overrides it with -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 in CFLAGS
> 
> - openSUSE used to append -D_FORTIFY_SOURCE=3 (similar to Debian and
>   Void Linux), but now uses -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
> 
> - PLD Linux appends -Wp,-D_FORTIFY_SOURCE=2
> 
> I found a rather impressive summary here:
> 
>   https://www.anthes.is/nix-internals-cflags.html

Gosh.

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2026-05-20  2:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12  5:52 David Gibson
2026-05-12  5:52 ` [PATCH v3 01/12] Makefile: Use make variables for static checker configuration David Gibson
2026-05-12  5:52 ` [PATCH v3 02/12] Makefile: Make conditional definition of $(BIN) clearer David Gibson
2026-05-12  5:52 ` [PATCH v3 03/12] Makefile: Use common binary compilation rule David Gibson
2026-05-12  5:52 ` [PATCH v3 04/12] Makefile: Remove unhelpful $(HEADERS) variable David Gibson
2026-05-12  5:52 ` [PATCH v3 05/12] Makefile: Add header dependencies for secondary binaries David Gibson
2026-05-12  5:52 ` [PATCH v3 06/12] Makefile: Split $(FLAGS) into cpp and cc components David Gibson
2026-05-13  7:11   ` Stefano Brivio
2026-05-14  2:01     ` David Gibson
2026-05-14  9:41       ` Stefano Brivio
2026-05-15  0:59         ` David Gibson
2026-05-16 15:45   ` Stefano Brivio
2026-05-17  0:48     ` David Gibson
2026-05-12  5:52 ` [PATCH v3 07/12] cppcheck, clang-tidy: Static checkers don't need non-preprocessor flags David Gibson
2026-05-12  5:52 ` [PATCH v3 08/12] Makefile: Split static checker targets David Gibson
2026-05-12  5:52 ` [PATCH v3 09/12] passt-repair: Split out inotify handling to its own function David Gibson
2026-05-12  5:52 ` [PATCH v3 10/12] passt-repair: Simplify construction of Unix path from inotify David Gibson
2026-05-12  5:52 ` [PATCH v3 11/12] passt-repair: Run static checkers David Gibson
2026-05-12  5:52 ` [PATCH v3 12/12] pesto: Run static checkers on pesto sources David Gibson
2026-05-16 15:45 ` [PATCH v3 00/12] Improvements to static checker invocation Stefano Brivio
2026-05-20  2:01   ` David Gibson [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=ag0V_RkopAlxygoD@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.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.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).