lkml.org 
[lkml]   [2016]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] kbuild: fix if_change and friends to consider argument order
From
Hi David,


2016-05-05 17:08 GMT+09:00 Woodhouse, David <david.woodhouse@intel.com>:
> On Thu, 2016-05-05 at 16:45 +0900, Masahiro Yamada wrote:
>>
>> This commit fixes arg-check to compare two strings as a whole.
>> $(strip ...) is important because we want to ignore the difference
>> that comes from white-spaces.
>
> Do we?
>
> I can construct a hypothetical situation in which whitespace differs
> and we *do* want it to make a difference (for example I used to sign
> with a key called 'My Signing Key.pem' and now I've changed to use
> 'My Signing Key.pem'. (OK, it's a *stupid* example but still...)
>

Have you ever succeeded in passing such a string in Kbuild in the first place?

For example, I added the following line into init/Makefile

CFLAGS_main.o += -DHELLO_WORLD='"hello world!"'


and

printk("%s\n", HELLO_WORLD);

to start_kernel().



But, I got the console log

[ 0.001639] hello world!




The root cause of this problem is the following line

_c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags))


$(filter-out ) strips extra spaces, so Kbuild can not keep
white-spaces as they are.


Maybe, we can fix this problem. (This is another problem, though)

Thank you for spotting this.



--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2016-05-06 04:41    [W:0.069 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site