lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 13 Aug 2020 02:47:52 +0900
From:   Masahiro Yamada <>
To:     Nathan Huckleberry <>
Cc:     Michal Marek <>,
        Linux Kbuild mailing list <>,
        Linux Kernel Mailing List <>,
        clang-built-linux <>,
        Pirama Arumuga Nainar <>,
        Bill Wendling <>
Subject: Re: [PATCH v7] Makefile: Add clang-tidy and static analyzer support
 to makefile

On Wed, Aug 12, 2020 at 10:24 AM 'Nathan Huckleberry' via Clang Built
Linux <> wrote:
> Sounds good. Do you think this patch is ready to land then?

I do not think so.

I pointed out the CC=clang check was not working.
I see false positive errors from GCC commands.

This patch does not use the benefit of Makefile.

Makefile is used to describe the dependency
between a target and its prerequisites,
and how to update the target.

Make compares the timestamps between the
targets and prerequisites, then determines
which targets need updating.

See your code.

       $(PYTHON3) scripts/clang-tools/
       $(PYTHON3) scripts/clang-tools/ clang-tidy
       $(error clang-tidy requires CC=clang)

This always runs two commands sequentially.
It rebuilds compile_commands.json even if
nothing in the source tree has been changed.

If you do this, there is no strong reason to use Make,
and actually you can rewrite it in a shell script:

clang_tidy () {
  if [ "$CONFIG_CC_IS_CLANG = "y" ]; then
    $PYTHON3 scripts/clang-tools/
    $PYTHON3 scripts/clang-tools/ clang-tidy
    echo "clang-tidy requires CC=clang"
    exit 1

I changed the rules to Makefile-ish style.

I will wait for comments for the new version.

Best Regards
Masahiro Yamada

Powered by blists - more mailing lists