abicheck.cc 888 B

123456789101112131415161718192021222324
  1. /*
  2. * Bug 25485: Browser/TorBrowser/Tor/libstdc++.so.6: version `CXXABI_1.3.11' not found
  3. * Bug 31646: Update abicheck to require newer libstdc++.so.6
  4. * This program is useful in determining if the libstdc++.so.6 installed
  5. * on the system is recent enough. Specifically this program requires
  6. * `GLIBCXX_3.4.25` which should be provided by libstdc++.so.6 from
  7. * gcc >= 8.0.0. If the program executes successfully, that means we
  8. * should use the system version of libstdc++.so.6 and if not, that means
  9. * we should use the bundled version.
  10. *
  11. * We use std::random_device::entropy() in order to require GLIBCXX_3.4.25:
  12. * https://github.com/gcc-mirror/gcc/blob/gcc-8_3_0-release/libstdc%2B%2B-v3/config/abi/pre/gnu.ver#L1978
  13. */
  14. #include <iostream>
  15. #include <random>
  16. int main()
  17. {
  18. std::random_device rd;
  19. std::cout << "entropy: " << rd.entropy() << std::endl;
  20. return 0;
  21. }