--disable-tls does not limit functionality, it only determines how std::call_once works

Jeffrey Walton noloader at gmail.com
Mon Mar 16 20:49:12 UTC 2020

Hi Everyone/Ken,

I was looking through
and noticed this comment:

# see https://lists.macports.org/pipermail/macports-dev/2017-August/036209.html
# --disable-tls does not limit functionality
# it only determines how std::call_once works

Based on my testing of i686, x86_64, ARM-32, Aarch64 and PowerPC,
std::call_once is completely broken everywhere except x86_64. When I
tired to use std::call_once in my programs I had truckloads of
unexplained crashes everywhere except x86_64. There's GCC bug report
that details the same.

If possible, GCC should be built without std::call_once. Or
std::call_once should throw std::runtime_error("Not implemented!"). I
don't know if GCC ever fixed std::call_once on non-Intel platforms,
but you should avoid std::call_once. Treat it like the coronavirus.

Off topic, here's some interesting reading on coronavirus and its
origins in horseshoe bats in southern asia:


More information about the macports-users mailing list