[coreboot] [help]build cbfstool fail with cygwin64

Julius Werner jwerner at chromium.org
Tue Oct 20 00:57:54 CEST 2015

> is there anyway to dynamic define std to gnu99 when detect build with cygwin?

cbfstool is already defining -std=c99. I don't see a strong reason why
we shouldn't just change that to gnu99 globally.

>>> 2. default build will error as below,
>>> HOSTCC     cbfstool/cbfstool.o
>>> /cygdrive/d/FW/coreboot/util/cbfstool/cbfstool.c: In function 'main':
>>> /cygdrive/d/FW/coreboot/util/cbfstool/cbfstool.c:1075:5: error: array
>>> subscript has type 'char' [-Werror=char-subscripts]
>>>      if (tolower(suffix[0])=='k') {
>>>      ^

This sounds like an bug in cygwin and you should file it with them.
They're probably implementing tolower() in their standard header as a
macro which directly indexes an array with an argument. They should at
least be casting the argument inside that macro or they are not

More information about the coreboot mailing list