commit 756b3f0a6f3dd6b0a6ce262528f027f79b1e3c07 Author: Georg Koppen gk@torproject.org Date: Wed Aug 12 08:32:50 2020 +0000
Bug 34359: Adapt abicheck.cc to deal with newer GCC version
ESR 78 compiled with GCC 9.3.0 requires GLIBCXX_3.4.28. --- projects/firefox/abicheck.cc | 29 +++++++++++++++-------------- projects/firefox/build | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/projects/firefox/abicheck.cc b/projects/firefox/abicheck.cc index ba5f858..53d1dcc 100644 --- a/projects/firefox/abicheck.cc +++ b/projects/firefox/abicheck.cc @@ -1,23 +1,24 @@ /* - * 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/co... + * We use std::pmr::monotonic_buffer_resource in order to require + * GLIBCXX_3.4.28: + * https://github.com/gcc-mirror/gcc/blob/9e4ebad20a064d10df451cfb2cea9853d339a... + * 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; } diff --git a/projects/firefox/build b/projects/firefox/build index 5ddd4de..ea03088 100644 --- a/projects/firefox/build +++ b/projects/firefox/build @@ -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', {
tbb-commits@lists.torproject.org