From: Masahiro Yamada Date: Thu, 18 Sep 2014 11:13:20 +0900 Subject: [U-Boot] [PATCH 1/3] compiler_gcc: do not redefine __gnu_attributes In-Reply-To: <1410978828-20292-2-git-send-email-jeroen@myspectrum.nl> References: <1410978828-20292-1-git-send-email-jeroen@myspectrum.nl> <1410978828-20292-2-git-send-email-jeroen@myspectrum.nl> Message-ID: <20140918111319.70CB.AA925319@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Jeroen, > commit fb8ffd7cfc68b3dc44e182356a207d784cb30b34 "compiler*.h: > sync include/linux/compiler*.h with Linux 3.16" undid the changes > of 7ea50d52849fe8ffa5b5b74c979b60b1045d6fc9 "compiler_gcc: do > not redefine __gnu_attributes". Add the checks back whether these > macro's are already defined (as it causes a lot of noise on e.g. > FreeBSD where these defines are already in cdefs.h) > > As the original patch this checkpatch warning is ignored: > "WARNING: Adding new packed members is to be done with care" Strange. Which source files include cdefs.h? For building u-boot images, sources should only include headers in the u-boot source tree. The standard system headers should not be used except only a few files such as . This is the same as Linux Kernel. On the contrary, host programs are allowed to use standard system headers such as , etc, where should not be included. The root cause of warnings is _not_ that __packed and __weak are always defined in compiler-gcc.h. I believe the real problem is there are some source files include both system headers and at the same time. Best Regards Masahiro Yamada