compiler_gcc: do not redefine __gnu_attributes 75/104275/1
authorJeroen Hofstee <jeroen@myspectrum.nl>
Sat, 10 Aug 2013 15:16:50 +0000 (17:16 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 13 Dec 2016 02:15:58 +0000 (11:15 +0900)
commit6fc7a1b006773ee1c06dc191a60e0bff4fb1a626
tree21c44381e24f0bb73b0d1582ea5e48bd6b7ccadd
parent538685b81c66c81b14f1c09c398fa1e32f331142
compiler_gcc: do not redefine __gnu_attributes

gcc allows extensions to be non compiler specific by defining
__* macros for the attributes supported by gcc. Having a
different definition causes many warnings during the build
(cdefs.h on FreeBSD uses __attribute((__pure__)) where u-boot
uses __attribute__((pure)) for example). Do not redefine
these macros to suppress these warnings.

This patch ignores the checkpatch warning:
WARNING: __packed is preferred over __attribute__((packed))

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
[backport from u-boot mainline for gcc6]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I3ee9aa3b3732cc97b4b3305908fcf62ee86e2964
include/linux/compiler-gcc.h
include/linux/compiler-gcc4.h