0

I have devtoolset7 packages installed in my machine

devtoolset-7-binutils-devel-2.28-11.el7.x86_64
devtoolset-7-runtime-7.1-4.el7.x86_64
devtoolset-7-binutils-2.28-11.el7.x86_64
devtoolset-7-gdb-8.0.1-36.el7.x86_64
devtoolset-7-libasan-devel-7.3.1-5.13.el7.x86_64
devtoolset-7-gcc-c++-7.3.1-5.13.el7.x86_64
devtoolset-7-libstdc++-devel-7.3.1-5.13.el7.x86_64
devtoolset-7-valgrind-3.13.0-11.el7.x86_64
devtoolset-7-gcc-7.3.1-5.13.el7.x86_64

I am trying to build a binary with -fvtable-verify=std

Unfortunately, the gcc provided with devtoolset 7 is not built with --enable-vtable-verify

How can I rebuild devtoolset 7 gcc with --enable-vtable-verify with similar configuration as used by devtoolset 7.

curiousguy
  • 8,038
  • 2
  • 40
  • 58
user1918858
  • 1,202
  • 1
  • 20
  • 29

1 Answers1

1

The whole point of the devtoolset is to remain backwards compatible with the system compiler and its older libstdc++.so.6 library. The --enable-vtable-verify option creates an incompatible C++ runtime with a different ABI, which cannot be used with any existing libraries that weren't compiled with VTV enabled.

There is no point creating a devtoolset compiler (intended to be compatible with the system compiler) that is explicitly incompatible with the system compiler.

If you want to use VTV then just build your own GCC from source and enable VTV, but be aware that code compiled by that GCC will not be compatible with code compiled with the system compiler or the devtoolset compiler.

Jonathan Wakely
  • 166,810
  • 27
  • 341
  • 521