lkml.org 
[lkml]   [2017]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: special handle of scripts/kconfig/zconf.tab.o
Hi Masahiro

On Sat, Aug 19, 2017 at 09:42:40PM +0900, Masahiro Yamada wrote:
> Hi.
> (+CC Sam)
>
> 2017-08-15 20:02 GMT+09:00 Cao jin <caoj.fnst@cn.fujitsu.com>:
> > Masahiro-san,
> >
> > I have a question about make *config. In scripts/kconfig/Makefile, there
> > is following statement:
> >
> > $(obj)/zconf.tab.o: $(obj)/zconf.lex.c $(obj)/zconf.hash.c
> >
> > and the $(obj)/zconf.{tab,hash,lex}.c match the rule in Makefile.lib:
> >
> > $(obj)/%: $(src)/%_shipped
> > $(call cmd,shipped)
> >
> > and cmd_shipped just transform the _shipped file to .c via `cat`.
> >
> > And zconf.tab.c includes several *other* .c files which make the whole
> > process a little obscure, because there are not corresponding .o files
> > for the *other* .c files.
> >
> > My questions is: Does this special handling has other meanings that I
> > may miss? Or just legacy.
>
>
> This convention had existed before I joined the kernel development,
> so I am not sure about the historical background.
>
> The following is my understanding.
> (I hope Sam and Michal will correct me if I am wrong.)
>
>
> The difference between with/without _shipped is,
> zconf.{tab,hash,lex}.c_shipped reside under $(srctree),
> whereas zconf.{tab,hash,lex}.c under $(objtree).

The whole idea behind the *_shipped file was to have less dependencies
on the host system buildign the kernel.
So we did not rely on users having all of flex, bison, gperf
installed in the right versions.

So this is all about less dependencies on the build host,
and we did not back then consider so much $(srctree) versus $(objtree).
I think that support for _shipped predates when we added support for
"make O=..." - but I may be wrong - did not check the history.

I recall we have had to updated support for _shipped a few times
due to some smaller issues, and maybe we never got around to actually
document this in Documentation/kbuild/

Sam

\
 
 \ /
  Last update: 2017-08-19 16:55    [W:0.101 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site