help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make 4.3 rebuilds .o files when unnecessary


From: Kaz Kylheku (gmake)
Subject: Re: Make 4.3 rebuilds .o files when unnecessary
Date: Wed, 25 Nov 2020 08:18:11 -0800
User-agent: Roundcube Webmail/0.9.2

 

On 2020-11-25 02:28, Tommaso Fonda wrote: 

> Thank you for the small tutorial. I've managed to find the commit that 
> introduces the issue! It's this one: 
> https://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b576b907b06aea5f4
>  [1] 
> What happens now?

Thus, it looks like the kernel 3.x build system is sensitive to the
issue of # characters in function or macro invocations. 

Ideas: 

- Since the build system is old, is search the kernel archives to see if
they patched the problem already in a newer kernel. (Trying this: not
easy!) 

- Look for any situations in the Makefile or any included makefiles
where a # character occurs in a function or macro invocation. See what
those situations look like in a newer or current kernel tree, and use
git blame to find where those lines have been touched.

- Patch Make to print a diagnostic when the input triggers the
sensitivity. 

The last idea seems like it could pinpoint the problem pretty fast. So
that is to say, basically, the crux of the Make patch is this change in
remove_comments function: 

- comment = find_char_unquote (line, MAP_COMMENT); 
+ comment = find_char_unquote (line, MAP_COMMENT|MAP_VARIABLE); 

The other code changes are a renaming of a parameter, and some block
comment rewrites, which do nothing. 

So, since the change is a one-liner, we can do something like this: 

 char *comment_old_way = find_char_unquote (line, MAP_COMMENT); 
 char *comment_new_way = find_char_unquote (line,
MAP_COMMENT|MAP_VARIABLE); 

 if (comment_new_way != comment_old_way) { 
 /* behavior change! */ 
 /* Log useful information here (what makefile, and linenumber), or
raise(SIGTRAP) for a gdb breakpoint ... */ 
 } 

- Insert other debugging idea here ... :) 
 

Links:
------
[1]
https://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b576b907b06aea5f4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]