From: Tom Rini Date: Thu, 25 Sep 2014 10:46:21 -0400 Subject: [U-Boot] [U-Boot, v2, 1/3] compiler_gcc: prevent redefining attributes In-Reply-To: <1411063827-10068-1-git-send-email-jeroen@myspectrum.nl> References: <1411063827-10068-1-git-send-email-jeroen@myspectrum.nl> Message-ID: <20140925144621.GL25506@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Sep 18, 2014 at 08:10:27PM +0200, Jeroen Hofstee wrote: > The libc headers on FreeBSD and likely related projects as well contain an > header file, cdefs.h which provides similiar functionality as linux/compiler.h. > It provides compiler independent defines like __weak __packed, to allow > compiling with multiple compilers which might have a different syntax for such > extension. > > Since that header file is included in multiple standard headers, like stddef.h > and stdarg.h, multiple definitions of those defines will be present if both are > included. When compiling u-boot the compiler will warn about it hundreds of > times since e.g. common.h will include both files indirectly. > > commit 7ea50d52849fe8ffa5b5b74c979b60b1045d6fc9 "compiler_gcc: do not redefine > __gnu_attributes" prevented such redefinitions, but this was undone by commit > fb8ffd7cfc68b3dc44e182356a207d784cb30b34 "compiler*.h: sync > include/linux/compiler*.h with Linux 3.16". > > Add the checks back where necessary to prevent such warnings. > > As the original patch this checkpatch warning is ignored: > "WARNING: Adding new packed members is to be done with care" > > Cc: Masahiro Yamada > Cc: Tom Rini > Signed-off-by: Jeroen Hofstee > Acked-by: Masahiro Yamada Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: