linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Kees Cook <keescook@chromium.org>
Cc: Patrick McLean <chutzpah@gentoo.org>,
	"Maciej S. Szmigiero" <mail@maciej.szmigiero.name>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] kconfig.h: Include compiler types to avoid missed struct attributes
Date: Thu, 22 Feb 2018 22:07:35 +0100	[thread overview]
Message-ID: <66556bf7-3e67-5793-081e-76a01f598374@prevas.dk> (raw)
In-Reply-To: <CA+55aFxDh-69p0Lr52icct6-3PGcsHaZmMqHwks8HptdmdxvTg@mail.gmail.com>

On 2018-02-22 19:04, Linus Torvalds wrote:
> 
> Lookie here (in a fully built tree):
> 
>     find . -name '*.o.cmd' |
>         xargs grep -L linux/compiler_types.h |
>         xargs grep -l linux/kconfig.h |
>         while read i; do
>             j=$(echo $i | sed 's/\.o.cmd$/\.c/' | sed 's:/\.:/:');
>             test -f $j && echo $j;
>         done
> 
> shows that a number of files don't end up depending on that header
> file, even though it's included (that "grep -l linux/kconfig,h"
> triggers on the command itself having that "-include linux/kconfig.h"
> line).
> 
> It looks like "gcc -M" just doesn't list any files that get included
> on the command line with "-include".

It does, both per the documentation and testing it. But fixdep
explicitly removes include/linux/kconfig.h along with
include/generated/autoconf.h and a few others. So when you rebuilt after
adding the #include to kconfig.h, I think nothing actually got built,
and no new .o.cmd files got generated.

Doing a clean build does make include/linux/compiler_{types,gcc}.h and
the various fake include/config/.... they "depend" on appear in e.g.
lib/.clz_tab.o.cmd.

The whole point of fixdep and the include/config hierarchy is to be able
to remove the dependency on autoconf.h, but I'm not sure I understand
why kconfig.h itself is also forcibly removed.

Rasmus

  parent reply	other threads:[~2018-02-22 21:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 17:41 [PATCH v3] kconfig.h: Include compiler types to avoid missed struct attributes Kees Cook
2018-02-22 18:04 ` Linus Torvalds
2018-02-22 19:57   ` Kees Cook
2018-02-22 20:17     ` Linus Torvalds
2018-02-22 21:07   ` Rasmus Villemoes [this message]
2018-02-22 21:22     ` Kees Cook
2018-02-22 21:23     ` Linus Torvalds
2018-02-22 21:54       ` Linus Torvalds
2018-02-22 21:34     ` Rasmus Villemoes
2018-02-22 21:56       ` Linus Torvalds
2018-02-28 19:17         ` [PATCH 1/3] fixdep: remove stale references to uml-config.h Rasmus Villemoes
2018-02-28 19:17           ` [PATCH 2/3] fixdep: remove some false CONFIG_ matches Rasmus Villemoes
2018-02-28 19:17           ` [PATCH 3/3] fixdep: do not ignore kconfig.h Rasmus Villemoes
2018-03-05  4:52             ` Masahiro Yamada
2018-03-05  8:15               ` Rasmus Villemoes
2018-03-05  9:38                 ` Masahiro Yamada
2018-03-05 14:49             ` Masahiro Yamada

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=66556bf7-3e67-5793-081e-76a01f598374@prevas.dk \
    --to=rasmus.villemoes@prevas.dk \
    --cc=chutzpah@gentoo.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@maciej.szmigiero.name \
    --cc=torvalds@linux-foundation.org \
    /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;
as well as URLs for NNTP newsgroup(s).