https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91396
Bug ID: 91396 Summary: Link error when I use -fvtable-verify=std and -static Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: niva at niisi dot msk.ru Target Milestone: --- I have built gcc-7.4.0 with --enable-vtable-verify for x86_64 under Fedora 27: $HOME/src/gcc-7.4.0/configure --srcdir=$HOME/src/gcc-7.4.0 --verbose --enable-vtable-verify --enable-languages=c,c++,fortran --enable-lto --prefix=$HOME/local-gcc When I run: $ ~/local-gcc/bin/g++ -fvtable-verify=std -O2 -static t.C -o t.exe the following error occurs: ~/local-gcc/lib/gcc/x86_64-pc-linux-gnu/7.4.0/vtv_end.o: In function `__VLTprotect': vtv_end.c:(.text.startup+0x0): multiple definition of `__VLTprotect' ~/local-gcc/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../lib64/libvtv.a(vtv_end.o):~/build/native-gcc/x86_64-pc-linux-gnu/libvtv/vtv_end.c:59: first defined here $ cat t.C int main () {return 0;} I have fixed the problem by deleting vtv_end.o from ~/local-gcc/lib64/libvtv.a but I'm not sure it's OK.