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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 14 Feb 2021 19:49:22 +0800
From:   Stephen Zhang <>
To:     Masahiro Yamada <>
Cc:     Nathan Chancellor <>,
        Nick Desaulniers <>,
        Nathan Chancellor <>,
        clang-built-linux <>,
        LKML <>,
        Tom Roeder <>,
        Linux Kbuild mailing list <>
Subject: Re: [PATCH v1] clang_tools:gen_compile_commands: Change the default
 source directory

Masahiro Yamada <> 于2021年2月13日周六 下午8:46写道:
> This is the steps I tested.
>$ make O=build  defconfig all -j24
>   [ snip ]
> ./scripts/clang-tools/  -d build
>$ grep '"file":' compile_commands.json |
> grep scripts/ | head -n5
>     "file": "/home/masahiro/ref/linux/scripts/mod/empty.c"
>     "file": "/home/masahiro/ref/linux/scripts/mod/sumversion.c"
>     "file": "/home/masahiro/ref/linux/scripts/mod/file2alias.c"
>     "file": "/home/masahiro/ref/linux/scripts/mod/modpost.c"
>     "file": "/home/masahiro/ref/linux/build/scripts/kconfig/"
> --
> Best Regards
> Masahiro Yamada

Thanks. Nathan had a detailed description about  this:

> $ make O=build
> will work with '-d .' because the .cmd files are in '.' and the source
> files will be placed relative to '.', which is correct. Your command
> does not work for two reasons:
> 1. You are using a build directory that is not a subpath of the source
> directory. In other words, this script would not work for
> $ make O=/tmp/build
> because '-d /tmp/build' needs to be used to find the .cmd files but then
> the relative path of the source files is messed up, as you point out.

This may help you reproduce the problem. So you shoud try:

>$ make O=/tmp/build  defconfig all -j24

where the build directory  is not a subpath of the source directory.

Best Regards
Stephen Zhang

Powered by blists - more mailing lists