linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Kees Cook <keescook@chromium.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH] fs: proc: move linux_proc_banner to where it is used
Date: Tue, 6 Nov 2018 02:28:20 +0900	[thread overview]
Message-ID: <CAK7LNASdTAjuBKsLTym0N34XDELQw4B4pDJBxQ=K7RYDqRJpbw@mail.gmail.com> (raw)
In-Reply-To: <408ef493-de1d-37bb-de66-69134c5a1aca@rasmusvillemoes.dk>

On Tue, Oct 30, 2018 at 5:18 PM Rasmus Villemoes
<linux@rasmusvillemoes.dk> wrote:
>
> On 2018-10-27 21:47, Alexey Dobriyan wrote:
> > On Fri, Oct 26, 2018 at 11:20:34PM +0200, Rasmus Villemoes wrote:
> >> +#include <generated/compile.h>
> >
> >> +#define linux_proc_banner \
> >> +    "%s version %s" \
> >> +    " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")" \
> >> +    " (" LINUX_COMPILER ") %s\n"
> >
> > Include doesn't work if compiling from scratch:
>
> Urgh, thanks. I assumed that all the include/generated/ stuff was always
> generated by the prepare steps in the top Makefile. But the logic for
> making compile.h is in init/Makefile.
>
> >       rm -rf ../obj
> >       mkdir ../obj
> >       make O=../obj defconfig
> >       make O=../obj fs/proc/version.o
> >
> >   CC      fs/proc/version.o
> > fs/proc/version.c:2:10: fatal error: generated/compile.h: No such file or directory
>
> The same happens in current mainline for arch/x86/boot/version.o:
>
> $ make arch/x86/boot/version.o
>   CALL    scripts/checksyscalls.sh
>   DESCEND  objtool
>   CC      arch/x86/boot/version.o
> arch/x86/boot/version.c:17:31: fatal error: generated/compile.h: No such
> file or directory
>
> Cc kbuild: Wouldn't it be a little nicer creating generated/compile.h
> along with the other files in generated/, so that everybody can rely on
> them being there instead of having the logic for compile.h hidden away
> in init/Makefile and listing it as an explicit dependency? Or is there
> some reason compile.h is special?
>
> Rasmus
>

I think the basic idea is,
the build version should not be incremented
if you do incremental build without touching any source file.

If you create/update <generated/compile.h> first,
you never know whether the .version should be incremented or not.



-- 
Best Regards
Masahiro Yamada

      reply	other threads:[~2018-11-05 17:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26 21:20 [PATCH] fs: proc: move linux_proc_banner to where it is used Rasmus Villemoes
2018-10-27 19:47 ` Alexey Dobriyan
2018-10-30  8:17   ` Rasmus Villemoes
2018-11-05 17:28     ` Masahiro Yamada [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='CAK7LNASdTAjuBKsLTym0N34XDELQw4B4pDJBxQ=K7RYDqRJpbw@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    /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).