[Bug target/87199] Thread local storage dynamic initialization behaviour differs Linux vs macOS
drikosev at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Feb 26 23:29:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87199
--- Comment #5 from Ev Drikos <drikosev at gmail dot com> ---
Hello,
At first, I'd like to note that these 2 options are also ok in MacOS-10.13:
(a) g++8 -g -std=c++11 lib.cpp main.c -o main && ./main
(b) g++8 -g -std=c++11 -I . main.c -S
g++8 -g -std=c++11 -I . lib.cpp -S
g++8 -g -std=c++11 -I . lib.s main.s -o main && ./main
Just for the record, a fresh built gcc-4.8.5~36 in OS X Yosemite (10.10)
doesn't have this problem but I just faced it in OS X Mavericks (10.9),
where I had to properly comment the stmt "ld_uses_coal_sects = true" in
file "darwin.c", added by an unofficial backport of PR/71767.
Hope this helps,
Ev. Drikos
More information about the Gcc-bugs
mailing list