Skip to content
Snippets Groups Projects
Unverified Commit b16662aa authored by boklm's avatar boklm
Browse files

Bug 31646: Update abicheck to require GLIBCXX_3.4.25

This is also fixing bug 31380.
parent 3b899b76
No related branches found
No related tags found
No related merge requests found
/* /*
* Bug 25485: Browser/TorBrowser/Tor/libstdc++.so.6: version `CXXABI_1.3.11' not found * Bug 25485: Browser/TorBrowser/Tor/libstdc++.so.6: version `CXXABI_1.3.11' not found
* This program is borrowed from * Bug 31646: Update abicheck to require newer libstdc++.so.6
* https://en.cppreference.com/w/cpp/error/uncaught_exception and is useful in * This program is useful in determining if the libstdc++.so.6 installed
* determining the latest C++ ABI. Specifically this program requires * on the system is recent enough. Specifically this program requires
* `GLIBCXX_3.4.22` which we use to compare the version of the installed * `GLIBCXX_3.4.25` which should be provided by libstdc++.so.6 from
* libstdc++.so.6 and the bundled version. If the program executes * gcc >= 8.0.0. If the program executes successfully, that means we
* successfully, that means we should use the system version of libstdc++.so.6 * should use the system version of libstdc++.so.6 and if not, that means
* and if not, that means we should use the bundled version. * we should use the bundled version.
*
* We use std::random_device::entropy() in order to require GLIBCXX_3.4.25:
* https://github.com/gcc-mirror/gcc/blob/gcc-8_3_0-release/libstdc%2B%2B-v3/config/abi/pre/gnu.ver#L1978
*/ */
#include <iostream> #include <iostream>
#include <exception> #include <random>
#include <stdexcept>
struct Foo {
int count = std::uncaught_exceptions();
~Foo() {
std::cout << (count == std::uncaught_exceptions()
? "~Foo() called normally\n"
: "~Foo() called during stack unwinding\n");
}
};
int main() int main()
{ {
Foo f; std::random_device rd;
try { std::cout << "entropy: " << rd.entropy() << std::endl;
Foo f; return 0;
std::cout << "Exception thrown\n";
throw std::runtime_error("test exception");
} catch (const std::exception& e) {
std::cout << "Exception caught: " << e.what() << '\n';
}
} }
# vim: filetype=yaml sw=2 # vim: filetype=yaml sw=2
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz' filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
# Note: When updating the gcc version, if this includes a libstdc++
# ABI change we should also update projects/firefox/abicheck.cc to
# require the new version.
version: 8.3.0 version: 8.3.0
var: var:
container: container:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment