libimobiledevice / libplist

A library to handle Apple Property List format in binary or XML
https://libimobiledevice.org
GNU Lesser General Public License v2.1
528 stars 304 forks source link

libplist fails with newer gcc.exe as the -V switch is no longer available #213

Open rpayne381 opened 1 year ago

rpayne381 commented 1 year ago

Building libplist on windows with msys2 shows the following error. i beleive -V is now -v

gcc version = gcc version 9.3.0 (Rev2, Built by MSYS2 project)

# gcc -V
gcc.exe: error: unrecognized command line option '-V'
gcc.exe: fatal error: no input files
compilation terminated.
configure:4249: $? = 0
configure:4238: gcc -v >&5
Using built-in specs.
COLLECT_GCC=C:\msys32\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/msys32/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-12.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/include --libexecdir=/mingw64/lib --enable-bootstrap --enable-checking=release --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev1, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Rev1, Built by MSYS2 project) 
configure:4249: $? = 0
configure:4238: gcc -V >&5
gcc.exe: error: unrecognized command-line option '-V'
gcc.exe: fatal error: no input files
nikias commented 1 year ago

We don't specifically call gcc -v or -V, only when bulding with fuzzers we call $(CC) --version. I assume this comes from autotools (most likely autoconf) instead.