lkml.org 
[lkml]   [2012]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rcu: avoid checking for constant
On Thursday 2012-01-12 16:29, Paul E. McKenney wrote:

>On Thu, Jan 12, 2012 at 11:57:10AM +0100, Jan Engelhardt wrote:
>> On Thursday 2012-01-12 11:54, Eric Dumazet wrote:
>>
>> >Le jeudi 12 janvier 2012 à 11:34 +0100, Jan Engelhardt a écrit :
>> >
>> >> When compiling kernel or module code with -O0, "offset" is no longer
>> >> considered a constant, and therefore always triggers the build error
>> >> that BUILD_BUG_ON is defined to yield.
>> >
>> >Why compiling kernel with -O0 is even considered ?
>>
>> The compile error was observed when trying to compile an out-of-tree
>> module with -O0.
>
>Hmmm... Why not have a glue .c file in your out-of-tree module
>that contains function like[...]

Maybe, maybe naah. The kernel relying on gcc's -O2 mode to do constant
value analysis through and into inline functions does not sound too
great. The compiler could change on the next moonphase. In fact, one
can't use clang -O2 because of this. With my patch, one can again use
clang -O2 [with respect to kfree_rcu].
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-01-12 17:11    [W:0.049 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site