Default GCC compiler options and how to change them
Hamish McIntyre-Bhatty
cygwin@hamishmb.com
Wed Jun 4 20:16:09 GMT 2025
On 13/05/2025 18:24, ASSI via Cygwin wrote:
> Hamish McIntyre-Bhatty via Cygwin writes:
>> I've run into a blocker when trying to build wxPython that wasn't a
>> problem when I last did it (which amittedly was over a year ago). Some
>> -werror flags are being passed to GCC, but I can't see where they're
>> coming from. Are there any defaults set for GCC that mean -werror
>> might be turned on?
>> No, that comes from the package. But a newer gcc might have more
> warnings that now turn into an error.
>>> When I build wxPython on my host (Linux) system, I don't get the same
>> issues, so I'm assuming there are defaults being set somewhere. If
>> anyone could offer some help I'd be very appreciative.
>> Pass 'Wno-error=…' into CCFLAGS or something like that or if it's just a
> handful of locations bracket them with
>> #pragma push
> #pragma GCC diagnostic ignored "-W…"
> /* offending code */
> #pragma pop
>>> Regards,
> Achim.
Cheers for the help. It turned out all I needed to do was patch a couple
of lines of source code, and now I'm on to the next problem to fix :)
I haven't a clue why -Wno-error=return-type didn't work, but that's
neither here nor there.
Hamish
More information about the Cygwin
mailing list