Which version gets used depends on their ordering in the link line. When -fvtable-verify=std or -fvtable-verify=preinit is used, the gcc driver inserts -lvtv very early into the link line (earlier than -lstdc++), so this happens "automatically".
-- Caroline cmt...@google.com On Thu, Aug 8, 2013 at 4:33 PM, Jason Merrill <ja...@redhat.com> wrote: > On 08/08/2013 06:34 PM, Caroline Tice wrote: >> >> Actually if you ever want to use the feature with your compiler you >> should build your compiler with --enable-vtable-verify. This will, as >> you noted, insert calls in libstdc++ to build the verification data >> structures and to verify the virtual calls in libstdc++ itself. >> However libstdc++ itself contains 'stub' (do-nothing) versions of the >> functions that build the data structures and perform the verification. > > > How do you ensure that the libvtv versions get used rather than the stubs in > libstdc++? > > Jason >