From: Tom Rini Date: Wed, 3 Apr 2019 13:23:21 -0400 Subject: [U-Boot] tools/Makefile: build host tools with -std=gnu99 In-Reply-To: <20190330142923.18385-1-thomas.petazzoni@bootlin.com> References: <20190330142923.18385-1-thomas.petazzoni@bootlin.com> Message-ID: <20190403172321.GL4664@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 Sat, Mar 30, 2019 at 03:29:23PM +0100, Thomas Petazzoni wrote: > Parts of the code are using C99 constructs (such as variables declared > inside loops), but also GNU extensions (such as typeof), so using > -std=gnu99 is necessary to build with older versions of gcc that don't > default to building with gnu99. > > It fixes the following build failure: > > ./tools/../lib/crc16.c: In function "crc16_ccitt": > ./tools/../lib/crc16.c:70:2: error: "for" loop initial declarations are only allowed in C99 mode > for (int i = 0; i < len; i++) > ^ > ./tools/../lib/crc16.c:70:2: note: use option -std=c99 or -std=gnu99 to compile your code > > when building the host tools with gcc 4.7. > > Signed-off-by: Thomas Petazzoni > Reviewed-by: Philipp Tomsich Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: