Building on Mac with --enable-tls

Jonathan Wakely jwakely.gcc@gmail.com
Wed Mar 18 23:05:19 GMT 2020


On Wed, 18 Mar 2020 at 19:15, Tom N <nospam@codesniffer.com> wrote:
>
> I'm trying to build GCC from source on Mac (darwin) and keep getting this error when --enable-tls is specified:
>
>
> /var/folders/cq/wx4ff_gd0xncqh9qnbzmt2w40000gp/T//ccS0vBm1.s:9:2: error: unsupported symbol modifier
> in relocation
> leaq __ZN3GTM12_gtm_thr_tlsE@tlsgd(%rip), %rdi
> ^
> make[5]: *** [alloc_cpp.lo] Error 1
>
>
> If I either omit --enable-tls or specify --disable-tls the build succeeds,

I would expect the default to be correct for the target i.e.
--disable-tls. If enabling it worked correctly, it would be the
default.

> but then I get synchronization problems in my code which uses std::unique_lock<std::mutex>  (namely it seems the synchronization isn't performed).

That makes no sense, neither std::mutex nor std::unique_lock uses TLS.



More information about the Gcc-help mailing list