[linux-next][bisected c7c133f3][gcc 4.8.5] build fail with error: first argument to‘__builtin_choose_expr’ not a constant

3 messages, 2 authors, 2018-03-14 · open the first message on its own page

[linux-next][bisected c7c133f3][gcc 4.8.5] build fail with error: first argument to‘__builtin_choose_expr’ not a constant

From: Abdul Haleem <hidden>
Date: 2018-03-14 08:30:05

Greetings,

Today's next kernel fails to build with gcc 4.8.5 on powerpc machine.


./include/linux/jiffies.h: In function ‘jiffies_delta_to_clock_t’:
./include/linux/kernel.h:855:2: error: first argument to ‘__builtin_choose_expr’ not a constant
  __builtin_choose_expr(__builtin_constant_p(x) &&  \
  ^
./include/linux/kernel.h:867:19: note: in expansion of macro ‘__max’
 #define max(x, y) __max(typeof(x), typeof(y), x, y)

Machine Type: Power8 Baremetal
gcc: 4.8.5


Builds fine when below patch is reverted
c7c133f3 kernel.h: skip single-eval logic on literals in min()/max()

-- 
Regard's

Abdul Haleem
IBM Linux Technology Centre

Re: [linux-next][bisected c7c133f3][gcc 4.8.5] build fail with error: first argument to ‘__builtin_choose_expr’not a constant

From: Stephen Rothwell <hidden>
Date: 2018-03-14 08:40:28

Hi Abdul,

On Wed, 14 Mar 2018 13:59:54 +0530 Abdul Haleem [off-list ref] wrote:
Today's next kernel fails to build with gcc 4.8.5 on powerpc machine.
Thanks for the report.  Just for the future, please include  the
next-XXXXXXXX tag when making reports about linux-next.
./include/linux/jiffies.h: In function ‘jiffies_delta_to_clock_t’:
./include/linux/kernel.h:855:2: error: first argument to ‘__builtin_choose_expr’ not a constant
  __builtin_choose_expr(__builtin_constant_p(x) &&  \
  ^
./include/linux/kernel.h:867:19: note: in expansion of macro ‘__max’
 #define max(x, y) __max(typeof(x), typeof(y), x, y)

Machine Type: Power8 Baremetal
gcc: 4.8.5


Builds fine when below patch is reverted
c7c133f3 kernel.h: skip single-eval logic on literals in min()/max()
Those patches have been removed from today's linux-next (next-20180314).

-- 
Cheers,
Stephen Rothwell

Re: [linux-next][bisected c7c133f3][gcc 4.8.5] build fail with error: first argument to‘__builtin_choose_expr’ not a constant

From: Abdul Haleem <hidden>
Date: 2018-03-14 09:59:18

On Wed, 2018-03-14 at 19:39 +1100, Stephen Rothwell wrote:
Hi Abdul,

On Wed, 14 Mar 2018 13:59:54 +0530 Abdul Haleem [off-list ref] wrote:
quoted
Today's next kernel fails to build with gcc 4.8.5 on powerpc machine.
Thanks for the report.  Just for the future, please include  the
next-XXXXXXXX tag when making reports about linux-next.
Sure, I will. next-20180313 is the bad tag
quoted
./include/linux/jiffies.h: In function ‘jiffies_delta_to_clock_t’:
./include/linux/kernel.h:855:2: error: first argument to ‘__builtin_choose_expr’ not a constant
  __builtin_choose_expr(__builtin_constant_p(x) &&  \
  ^
./include/linux/kernel.h:867:19: note: in expansion of macro ‘__max’
 #define max(x, y) __max(typeof(x), typeof(y), x, y)

Machine Type: Power8 Baremetal
gcc: 4.8.5


Builds fine when below patch is reverted
c7c133f3 kernel.h: skip single-eval logic on literals in min()/max()
Those patches have been removed from today's linux-next (next-20180314).
-- 
Regard's

Abdul Haleem
IBM Linux Technology Centre
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help