dmd (v2.075.0): fully static linking: undefined reference to `__tls_get_addr'

kdevel via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 19 07:07:49 PDT 2017


test.d
---
void main ()
{
}
---

$ dmd -c test.d
$ cc -o test test.o -L/[...]/dmd2/linux/lib64 -lphobos2 -static 
-lpthread -lrt
/[...]/dmd2/linux/lib64/libphobos2.a(sections_elf_shared_774_420.o): In function `_D2rt19sections_elf_shared11getTLSRangeFNbNimmZAv':
src/rt/sections_elf_shared.d:(.text._D2rt19sections_elf_shared11getTLSRangeFNbNimmZAv[_D2rt19sections_elf_shared11getTLSRangeFNbNimmZAv]+0x38): undefined reference to `__tls_get_addr'
collect2: error: ld returned 1 exit status

Found that on the net but no solution:
http://www.digitalmars.com/d/archives/digitalmars/D/learn/Static_linking_on_Linux_with_dmd_or_gcc_74954.html

Any hints?


More information about the Digitalmars-d-learn mailing list