Default GCC compiler options and how to change them
Hamish McIntyre-Bhatty
cygwin@hamishmb.com
Sat May 10 19:23:19 GMT 2025
On 08/05/2025 20:59, Brian Inglis via Cygwin wrote:
> On 2025-05-08 13:25, Hamish McIntyre-Bhatty via Cygwin wrote:
>> 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?
>>
>> 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.
>
> Try gcc -v and gcc -###:
>
> $ gcc -v
> Using built-in specs.
> COLLECT_GCC=/usr/bin/gcc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/12/lto-wrapper.exe
> Target: x86_64-pc-cygwin
> Configured with: /mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-12.4.0/
> configure --srcdir=/mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-12.4.0 --
> prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --
> docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --
> build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin
> --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib
> --with-gcc-major-version-only --enable-shared --enable-shared-libgcc --
> enable-static --enable-version-specific-runtime-libs --enable-bootstrap
> --enable-__cxa_atexit --enable-clocale=newlib --with-dwarf2 --with-
> tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++,jit
> --enable-graphite --enable-threads=posix --enable-libatomic --enable-
> libgomp --enable-libquadmath --enable-libquadmath-support --disable-
> libssp --enable-libada --disable-symvers --disable-multilib --with-gnu-
> ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-
> libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-
> linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-
> libstdcxx-filesystem-ts
> Thread model: posix
> Supported LTO compression algorithms: zlib zstd
> gcc version 12.4.0 (GCC)
>
> $ gcc -###
> Using built-in specs.
> COLLECT_GCC=/usr/bin/gcc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/12/lto-wrapper.exe
> Target: x86_64-pc-cygwin
> Configured with: /mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-12.4.0/
> configure --srcdir=/mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-12.4.0 --
> prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --
> docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --
> build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin
> --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib
> --with-gcc-major-version-only --enable-shared --enable-shared-libgcc --
> enable-static --enable-version-specific-runtime-libs --enable-bootstrap
> --enable-__cxa_atexit --enable-clocale=newlib --with-dwarf2 --with-
> tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++,jit
> --enable-graphite --enable-threads=posix --enable-libatomic --enable-
> libgomp --enable-libquadmath --enable-libquadmath-support --disable-
> libssp --enable-libada --disable-symvers --disable-multilib --with-gnu-
> ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-
> libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-
> linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-
> libstdcxx-filesystem-ts
> Thread model: posix
> Supported LTO compression algorithms: zlib zstd
> gcc version 12.4.0 (GCC)
>
Thanks for the reply, but that doesn't seem to be quite what I'm looking
for, unless I missed something in the output on your Cygwin install.
Perhaps I need to look in the spec files mentioned in the output?
Re the gold stars thing, I reckon you deserve one too, you always seem
to be popping in with helpful answers to queries.
Best,
Hamish
More information about the Cygwin
mailing list