dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Should the sim compile cleanly in Cygwin using i686-w64-mingw32-gcc?

Re: Should the sim compile cleanly in Cygwin using i686-w64-mingw32-gcc?

From: Boris Gjenero <>
Date: Mon, 05 Dec 2011 16:50:15 -0500

On 05/12/2011 12:53 PM, Rafaël Carré wrote:
> Le Mon, 05 Dec 2011 12:37:20 -0500,
> Boris Gjenero<> a écrit :
>> Some other warnings are due to use of z in format specifiers, for
>> printing size_t data. This warning is false for things displayed on the
>> simulated device (eg. panicf()), but z really does not work when
>> printing directly to standard output (eg. DEBUGF()).
> if you define __USE_MINGW_ANSI_STDIO then the unix format specifiers
> should be used instead of incompatible microsoft format (and %zu should work)

Yes, that makes DEBUGF() work. However, the resulting #define for printf
breaks ATTRIBUTE_PRINTF, like you reported here:
It doesn't seem like MinGW-64 will be using the patch you posted.

I just tried i686-pc-mingw32-gcc because of the other response by Magnus
Holmgren. It works much better. The only warnings relate to format
specifiers, and z in DEBUGF() works without any additional defines. I
guess the best course of action is to use i686-pc-mingw32-gcc and not
bother fixing stuff for i686-w64-mingw32-gcc.

There doesn't seem to be any way to tell gcc that some printf-like
function supports a different set of format specifiers. Those warnings
can only be turned off completely via -Wno-format. Configure should add
that option that when Windows sim. Those warnings aren't very useful
anyways, because gcc doesn't know what Rockbox format() supports.


Received on 2011-12-05

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy