[Bug driver/98943] New: gcc driver does not fail on unknown files: tricks configure scripts to recognize /W4 and -diag-disable 1,2,3,4 options

slyfox at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 2 20:18:56 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98943

            Bug ID: 98943
           Summary: gcc driver does not fail on unknown files: tricks
                    configure scripts to recognize /W4 and -diag-disable
                    1,2,3,4 options
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
  Target Milestone: ---

Example failures are extracted from Gentoo downstream:
- https://bugs.gentoo.org/768399: gdal build failure (-diag-disable)
- https://bugs.gentoo.org/768222: lz4 build failure (/W4 option)

$ gcc-11.0.0 /W4 -c -x c /dev/null
gcc-11.0.0: warning: /W4: linker input file unused because linking not done

$ gcc-10.2.0 /W4 -c -x c /dev/null
gcc-10.2.0: error: /W4: No such file or directory

$ gcc-11.0.0 -diag-disable 188,1684,2259,2304,3280,11074,11076 -c -x c
/dev/null
cc1: warning: unrecognized gcc debugging option: i
cc1: warning: unrecognized gcc debugging option: g
cc1: warning: unrecognized gcc debugging option: -
cc1: warning: unrecognized gcc debugging option: d
cc1: warning: unrecognized gcc debugging option: i
cc1: warning: unrecognized gcc debugging option: s
cc1: warning: unrecognized gcc debugging option: b
cc1: warning: unrecognized gcc debugging option: l
cc1: warning: unrecognized gcc debugging option: e
gcc-11.0.0: warning: 188,1684,2259,2304,3280,11074,11076: linker input file
unused because linking not done

$ gcc-10.2.0 -diag-disable 188,1684,2259,2304,3280,11074,11076 -c -x c
/dev/null
gcc-10.2.0: error: 188,1684,2259,2304,3280,11074,11076: No such file or
directory

Was gcc change intentional and upstream packages should try harder to test
flags against linker as well? Or it's an unintentional gcc change?

Thanks!

$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-11.0.0_pre9999/work/gcc-11.0.0_pre9999/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/11.0.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.0.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.0.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.0.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include/g++-v11
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/11.0.0/python
--enable-languages=c,c++,go,jit,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--enable-checking=release --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 11.0.0_pre9999 p6, commit
33a1e511b57465d898429740377466894a0b247d' --disable-esp --enable-libstdcxx-time
--enable-host-shared --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --enable-multilib
--with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all
--enable-libgomp --disable-libssp --disable-libada --disable-systemtap
--enable-valgrind-annotations --enable-vtable-verify --with-zstd --enable-lto
--with-isl --disable-isl-version-check --enable-default-pie
--enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.0.0 20210201 (experimental) (Gentoo 11.0.0_pre9999 p6, commit
33a1e511b57465d898429740377466894a0b247d)


More information about the Gcc-bugs mailing list