Unverified Commit 756b3f0a authored by Georg Koppen's avatar Georg Koppen Committed by Matthew Finkel
Browse files

Bug 34359: Adapt abicheck.cc to deal with newer GCC version

ESR 78 compiled with GCC 9.3.0 requires GLIBCXX_3.4.28.
parent e7d0ada8
/*
* Bug 25485: Browser/TorBrowser/Tor/libstdc++.so.6: version `CXXABI_1.3.11' not found
* Bug 31646: Update abicheck to require newer libstdc++.so.6
* Bug 34359: Update abicheck to require newer libstdc++.so.6
* This program is useful in determining if the libstdc++.so.6 installed
* on the system is recent enough. Specifically this program requires
* `GLIBCXX_3.4.25` which should be provided by libstdc++.so.6 from
* gcc >= 8.0.0. If the program executes successfully, that means we
* on the system is recent enough. Specifically, this program requires
* `GLIBCXX_3.4.28` which should be provided by libstdc++.so.6 from
* gcc >= 9.3.0. If the program executes successfully, that means we
* should use the system version of libstdc++.so.6 and if not, that means
* 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
* We use std::pmr::monotonic_buffer_resource in order to require
* GLIBCXX_3.4.28:
* https://github.com/gcc-mirror/gcc/blob/9e4ebad20a064d10df451cfb2cea9853d339a898/libstdc%2B%2B-v3/config/abi/pre/gnu.ver#L2303
* The example below got inspired by
* https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg227964.html.
*/
#include <iostream>
#include <random>
#include <memory_resource>
int main()
{
std::random_device rd;
std::cout << "entropy: " << rd.entropy() << std::endl;
return 0;
int main () {
std::pmr::monotonic_buffer_resource res;
void* a = res.allocate(1);
res.release();
return 0;
}
......@@ -277,7 +277,7 @@ END;
%]
[% IF c("var/linux") %]
/var/tmp/dist/gcc/bin/g++ $rootdir/abicheck.cc -o Browser/abicheck
/var/tmp/dist/gcc/bin/g++ $rootdir/abicheck.cc -o Browser/abicheck -std=c++17
[% END %]
[% c('tar', {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment