[5.15-rc1][PPC][bisected 6d2ef226] mainline build breaks at ./include/linux/compiler_attributes.h:62:5: warning: "__has_attribute"

3 messages, 3 authors, 2021-09-14 · open the first message on its own page

[5.15-rc1][PPC][bisected 6d2ef226] mainline build breaks at ./include/linux/compiler_attributes.h:62:5: warning: "__has_attribute"

From: Abdul Haleem <hidden>
Date: 2021-09-14 06:12:37

Greeting's

Today's mainline kernel fails to compile on my powerpc box with below errors

././include/linux/compiler_attributes.h:62:5: warning: "__has_attribute" 
is not defined, evaluates to 0 [-Wundef]
  #if __has_attribute(__assume_aligned__)
      ^~~~~~~~~~~~~~~
././include/linux/compiler_attributes.h:62:20: error: missing binary 
operator before token "("
  #if __has_attribute(__assume_aligned__)
                     ^
././include/linux/compiler_attributes.h:88:5: warning: "__has_attribute" 
is not defined, evaluates to 0 [-Wundef]
  #if __has_attribute(__copy__)
      ^~~~~~~~~~~~~~~
././include/linux/compiler_attributes.h:88:20: error: missing binary 
operator before token "("
  #if __has_attribute(__copy__)

Kernel builds fine when below patch is reverted

commit 6d2ef22 : compiler_attributes.h: drop __has_attribute() support 
for gcc4

-- 
Regard's

Abdul Haleem
IBM Linux Technology Center

Re: [5.15-rc1][PPC][bisected 6d2ef226] mainline build breaks at ./include/linux/compiler_attributes.h:62:5: warning: "__has_attribute"

From: Stephen Rothwell <hidden>
Date: 2021-09-14 06:22:32

Hi Abdul,

On Tue, 14 Sep 2021 11:39:44 +0530 Abdul Haleem [off-list ref] wrote:
Today's mainline kernel fails to compile on my powerpc box with below errors

././include/linux/compiler_attributes.h:62:5: warning: "__has_attribute" is not defined, evaluates to 0 [-Wundef]
  #if __has_attribute(__assume_aligned__)
      ^~~~~~~~~~~~~~~
././include/linux/compiler_attributes.h:62:20: error: missing binary operator before token "("
  #if __has_attribute(__assume_aligned__)
                     ^
././include/linux/compiler_attributes.h:88:5: warning: "__has_attribute" is not defined, evaluates to 0 [-Wundef]
  #if __has_attribute(__copy__)
      ^~~~~~~~~~~~~~~
././include/linux/compiler_attributes.h:88:20: error: missing binary operator before token "("
  #if __has_attribute(__copy__)

Kernel builds fine when below patch is reverted

commit 6d2ef22 : compiler_attributes.h: drop __has_attribute() support for gcc4
Thanks for your report.

This is known and being addressed.

-- 
Cheers,
Stephen Rothwell

Re: [5.15-rc1][PPC][bisected 6d2ef226] mainline build breaks at ./include/linux/compiler_attributes.h:62:5: warning: "__has_attribute"

From: Nick Desaulniers <ndesaulniers@google.com>
Date: 2021-09-14 15:06:39

On Mon, Sep 13, 2021 at 11:22 PM Stephen Rothwell [off-list ref] wrote:
Hi Abdul,

On Tue, 14 Sep 2021 11:39:44 +0530 Abdul Haleem [off-list ref] wrote:
quoted
Today's mainline kernel fails to compile on my powerpc box with below errors

././include/linux/compiler_attributes.h:62:5: warning: "__has_attribute" is not defined, evaluates to 0 [-Wundef]
  #if __has_attribute(__assume_aligned__)
      ^~~~~~~~~~~~~~~
././include/linux/compiler_attributes.h:62:20: error: missing binary operator before token "("
  #if __has_attribute(__assume_aligned__)
                     ^
././include/linux/compiler_attributes.h:88:5: warning: "__has_attribute" is not defined, evaluates to 0 [-Wundef]
  #if __has_attribute(__copy__)
      ^~~~~~~~~~~~~~~
././include/linux/compiler_attributes.h:88:20: error: missing binary operator before token "("
  #if __has_attribute(__copy__)

Kernel builds fine when below patch is reverted

commit 6d2ef22 : compiler_attributes.h: drop __has_attribute() support for gcc4
Thanks for your report.

This is known and being addressed.
Thanks for the report. Support for GCC 4.X has been dropped.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76ae847497bc5207c479de5e2ac487270008b19b
-- 
Thanks,
~Nick Desaulniers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help