lkml.org 
[lkml]   [2017]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] kbuild, LLVMLinux: Add -Werror to cc-option to support clang
Hi Arnd,

2017-04-03 6:46 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> Hi Arnd,
>
>
> 2017-04-01 5:38 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
>> From: Mark Charlebois <charlebm@gmail.com>
>>
>> Clang will warn about unknown warnings but will not return false
>> unless -Werror is set. GCC will return false if an unknown
>> warning is passed.
>>
>> Adding -Werror make both compiler behave the same.
>>
>> [arnd: it turns out we need the same patch for testing whether -ffunction-sections
>> works right with gcc. I've build tested extensively with this patch
>> applied, so let's just merge this one now.]
>>
>> Signed-off-by: Mark Charlebois <charlebm@gmail.com>
>> Signed-off-by: Behan Webster <behanw@converseincode.com>
>> Reviewed-by: Jan-Simon Möller <dl9pf@gmx.de>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
>
> Thank you for forwarding this patch.
>
>
> The code diff looks good to me,
> but I'd like to be sure about git-log before applying it.
>
>
> As far as I tested, the statement
> "Clang will warn about unknown warnings but will not
> return false unless -Werror is set." does not seem true
> on recent versions.
>
>
>
> [1] When I use version 3.3
>
> masahiro@grover:~$ clang --version
> clang version 3.3 (tags/RELEASE_33/final)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
> masahiro@grover:~$ clang -foobar -c -x c /dev/null
> clang: warning: argument unused during compilation: '-foobar'
> masahiro@grover:~$ echo $?
> 0
>
>
> [2] When I use version 3.4
>
> masahiro@grover:~$ clang --version
> clang version 3.4 (tags/RELEASE_34/final)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
> masahiro@grover:~$ clang -foobar -c -x c /dev/null
> clang: error: unknown argument: '-foobar'
> masahiro@grover:~$ echo $?
> 1
>
>
>
>
> I agree we can apply this patch anyway
> even if the original motivation is not true anymore.
>
>
> Can you check it out,
> and add a little more comments if you agree?


Sorry. This was my misunderstanding.
You do not have to answer my question.

I found this patch is still useful for recent clang versions.

I will apply this patch shortly. Thanks!




--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2017-04-05 19:12    [W:0.054 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site